Class GcsAcceptModifiedAfterFileListFilter
- java.lang.Object
-
- com.google.cloud.spring.storage.integration.filters.GcsAcceptModifiedAfterFileListFilter
-
- All Implemented Interfaces:
org.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>,org.springframework.integration.file.filters.FileListFilter<BlobInfo>
public class GcsAcceptModifiedAfterFileListFilter extends Object implements org.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>
TheGcsAcceptModifiedAfterFileListFilteris a filter which accepts all files that were modified after a specified point in time.More specifically, it accepts (includes) all files whose
BlobInfo.getUpdateTime()is after (greater than or equal to) theacceptAfterCutoffTimestamp.acceptAfterCutoffTimestampdefaults to Instant.now() (UTC) in millis, but an alternativeInstantcan be provided via the constructor.When
discardCallbackis provided, it is called for all the rejected files.
-
-
Constructor Summary
Constructors Constructor Description GcsAcceptModifiedAfterFileListFilter()GcsAcceptModifiedAfterFileListFilter(Instant instant)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(BlobInfo file)voidaddDiscardCallback(Consumer<BlobInfo> discardCallback)List<BlobInfo>filterFiles(BlobInfo[] blobInfos)booleansupportsSingleFileFiltering()
-
-
-
Constructor Detail
-
GcsAcceptModifiedAfterFileListFilter
public GcsAcceptModifiedAfterFileListFilter()
-
GcsAcceptModifiedAfterFileListFilter
public GcsAcceptModifiedAfterFileListFilter(Instant instant)
-
-
Method Detail
-
addDiscardCallback
public void addDiscardCallback(@Nullable Consumer<BlobInfo> discardCallback)
- Specified by:
addDiscardCallbackin interfaceorg.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>
-
filterFiles
public List<BlobInfo> filterFiles(BlobInfo[] blobInfos)
- Specified by:
filterFilesin interfaceorg.springframework.integration.file.filters.FileListFilter<BlobInfo>
-
accept
public boolean accept(BlobInfo file)
- Specified by:
acceptin interfaceorg.springframework.integration.file.filters.FileListFilter<BlobInfo>
-
supportsSingleFileFiltering
public boolean supportsSingleFileFiltering()
- Specified by:
supportsSingleFileFilteringin interfaceorg.springframework.integration.file.filters.FileListFilter<BlobInfo>
-
-