public class ProcessingData
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ProcessingData.Type
Enumeration indicating the source of the file submition.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
Constructor and Description |
---|
ProcessingData(Repository repository,
DirectoryScanner scanner) |
ProcessingData(Repository repository,
java.io.File file,
FileActionComponent.Operation operation) |
ProcessingData(Repository repository,
java.util.Set<java.io.File> fileSet,
FileActionComponent.Operation operation) |
Modifier and Type | Method and Description |
---|---|
void |
addFile(java.io.File file)
Add a file to process
|
void |
addFileIgnored(java.io.File file)
Add a file that was ignored
|
void |
addFilePostponed(java.io.File file)
Add a file that was postponed
|
void |
addFileProcessed(java.io.File file)
Add a file that was processed
|
java.util.Date |
getCreationDate()
Retrieve the Date this ProcessingData was created
|
java.io.File |
getCurrentFile()
Retrieve the current File being processed if any.
|
int |
getFileCount()
Retrieve the number of files to be processed.
|
int |
getFileIgnoredCount()
Retrieve the number of files that were ignored.
|
java.util.Set<java.io.File> |
getFileIgnoredSet()
Retrieve the Set of files that were ignored
|
int |
getFilePostponedCount()
Retrieve the number of files that were postponed.
|
java.util.Set<java.io.File> |
getFilePostponedSet()
Retrieve the Set of files that were postponed
|
int |
getFileProcessedCount()
Retrieve the number of files that were processed.
|
java.util.Set<java.io.File> |
getFileProcessedSet()
Retrieve the Set of files that were processed
|
java.util.Set<java.io.File> |
getFileSet()
Retrieve the Set of files to be processed
|
FileActionComponent.Operation |
getOperation()
Retrieve the kind of Operation for which the file have been detected (create, update, delete, ...
|
java.util.Date |
getProcessingEndDate()
Retrieve the date at which the processing of this Data was finished.
|
java.util.Date |
getProcessingStartDate()
Retrieve the date at which the processing of this Data was started.
|
Repository |
getRepository()
Retrieve the repository concerned by this Processing
|
ProcessingData.Type |
getType()
Retrieve the type of processing concerned by this Processing
|
boolean |
isFinished()
Check if the processing for this ProcessingData is finished.
|
boolean |
isInterrupted()
Check if the processing for this ProcessingData was interrupted manually.
|
boolean |
isPartialScan()
Check if a new scan of this repository should be invoked
after all data of this ProcessingData have been processed.
|
boolean |
isStarted()
Check if the processing for this ProcessingData was started.
|
void |
setCurrentFile(java.io.File currentFile) |
void |
setFinished()
Indicate that the processing for this ProcessingData is finished.
|
void |
setInterrupted()
Indicate that the processing for this ProcessingData was interrupted manually.
|
void |
setPartialScan()
Indicate a new scan of this repository should be invoked
after all data of this ProcessingData have been processed.
|
void |
setStarted()
Indicate that the processing for this ProcessingData has started.
|
void |
waitFinished()
Wait for processing of this data to be finished.
|
public static final java.lang.String REVISION
public ProcessingData(Repository repository, DirectoryScanner scanner)
public ProcessingData(Repository repository, java.util.Set<java.io.File> fileSet, FileActionComponent.Operation operation)
public ProcessingData(Repository repository, java.io.File file, FileActionComponent.Operation operation)
public Repository getRepository()
public ProcessingData.Type getType()
public java.util.Date getCreationDate()
public FileActionComponent.Operation getOperation()
public void addFile(java.io.File file)
file
- any File, must no be nullpublic java.util.Set<java.io.File> getFileSet()
public int getFileCount()
public void addFileProcessed(java.io.File file)
file
- any File, must no be nullpublic java.util.Set<java.io.File> getFileProcessedSet()
public int getFileProcessedCount()
public void addFileIgnored(java.io.File file)
file
- any File, must no be nullpublic java.util.Set<java.io.File> getFileIgnoredSet()
public int getFileIgnoredCount()
public void addFilePostponed(java.io.File file)
file
- any File, must no be nullpublic java.util.Set<java.io.File> getFilePostponedSet()
public int getFilePostponedCount()
public java.util.Date getProcessingStartDate()
public java.util.Date getProcessingEndDate()
public java.io.File getCurrentFile()
public void setCurrentFile(java.io.File currentFile)
public boolean isInterrupted()
public void setInterrupted()
This methods invokes setFinished()
to mark this data as finished and notify all waiters.
public boolean isStarted()
public void setStarted()
Fill the processing start date.
getProcessingStartDate()
public boolean isFinished()
getProcessingEndDate()
public void setFinished()
Also notify all waiters of this object
waitFinished()
public void waitFinished() throws java.lang.InterruptedException
java.lang.InterruptedException
Object.wait()
public void setPartialScan()
This methods is invoked if the Directory Scanning which created this processing Data was interrupted because the maximum number of files per scan was reached.
public boolean isPartialScan()
Copyright © 2001-2017 Jalios SA. All Rights Reserved.