public abstract class AbstractPersistentAcceptOnceFileListFilter<F> extends AbstractFileListFilter<F> implements ReversibleFileListFilter<F>
| Modifier and Type | Field and Description |
|---|---|
protected String |
prefix |
protected ConcurrentMetadataStore |
store |
| Constructor and Description |
|---|
AbstractPersistentAcceptOnceFileListFilter(ConcurrentMetadataStore store,
String prefix) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
accept(F file)
Subclasses must implement this method.
|
protected String |
buildKey(F file)
The default key is the
prefix plus the full filename. |
protected abstract String |
fileName(F file) |
protected boolean |
isEqual(F file,
String value)
Override this method if you wish to use something other than the
modified timestamp to determine equality.
|
protected abstract long |
modified(F file) |
void |
rollback(F file,
List<F> files)
Indicate that not all files previously passed by this filter (in
FileListFilter.filterFiles(Object[])
have been processed; the file must be in the list of files; it, and all files after it, will
be considered to have not been processed and will be considered next time. |
filterFilesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfilterFilesprotected final ConcurrentMetadataStore store
protected final String prefix
public AbstractPersistentAcceptOnceFileListFilter(ConcurrentMetadataStore store, String prefix)
protected boolean accept(F file)
AbstractFileListFilteraccept in class AbstractFileListFilter<F>file - The file.public void rollback(F file, List<F> files)
FileListFilter.filterFiles(Object[])
have been processed; the file must be in the list of files; it, and all files after it, will
be considered to have not been processed and will be considered next time.rollback in interface ReversibleFileListFilter<F>file - the file which failed.files - the list of files that were returned by FileListFilter.filterFiles(Object[]).protected boolean isEqual(F file, String value)
file - The file.value - The current value for the key in the store.protected String buildKey(F file)
prefix plus the full filename.file - The file.protected abstract long modified(F file)