Class LastModifiedFileListFilter
java.lang.Object
org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter<File>
org.springframework.integration.file.filters.LastModifiedFileListFilter
- All Implemented Interfaces:
DiscardAwareFileListFilter<File>
,FileListFilter<File>
The
FileListFilter
implementation to filter those files which
File.lastModified()
is less than the age in comparison
with the current time.
The resolution is done in seconds.
When discardCallback AbstractLastModifiedFileListFilter.addDiscardCallback(Consumer)
is provided, it called for all the
rejected files.
- Since:
- 4.2
- Author:
- Gary Russell, Artem Bilan, Adama Sorho
-
Field Summary
Fields inherited from class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter
ONE_SECOND
-
Constructor Summary
ConstructorDescriptionLastModifiedFileListFilter
(long age) Construct aLastModifiedFileListFilter
instance with provided age. -
Method Summary
Methods inherited from class org.springframework.integration.file.filters.AbstractLastModifiedFileListFilter
accept, addDiscardCallback, filterFiles, getAgeDuration, setAge, setAge, supportsSingleFileFiltering
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.integration.file.filters.FileListFilter
isForRecursion
-
Constructor Details
-
LastModifiedFileListFilter
public LastModifiedFileListFilter() -
LastModifiedFileListFilter
public LastModifiedFileListFilter(long age) Construct aLastModifiedFileListFilter
instance with provided age. Defaults to 60 seconds.- Parameters:
age
- the age in seconds.- Since:
- 5.0
-
-
Method Details
-
getLastModified
- Specified by:
getLastModified
in classAbstractLastModifiedFileListFilter<File>
-