public class GcsAcceptModifiedAfterFileListFilter extends Object implements org.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>
GcsAcceptModifiedAfterFileListFilter is 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) the acceptAfterCutoffTimestamp.
acceptAfterCutoffTimestamp defaults to Instant.now() (UTC) in millis, but an
alternative Instant can be provided via the constructor.
When discardCallback is provided, it is called for all the rejected files.
| Constructor and Description |
|---|
GcsAcceptModifiedAfterFileListFilter() |
GcsAcceptModifiedAfterFileListFilter(Instant instant) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(BlobInfo file) |
void |
addDiscardCallback(Consumer<BlobInfo> discardCallback) |
List<BlobInfo> |
filterFiles(BlobInfo[] blobInfos) |
boolean |
supportsSingleFileFiltering() |
public GcsAcceptModifiedAfterFileListFilter()
public GcsAcceptModifiedAfterFileListFilter(Instant instant)
public void addDiscardCallback(@Nullable Consumer<BlobInfo> discardCallback)
addDiscardCallback in interface org.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>public List<BlobInfo> filterFiles(BlobInfo[] blobInfos)
filterFiles in interface org.springframework.integration.file.filters.FileListFilter<BlobInfo>public boolean accept(BlobInfo file)
accept in interface org.springframework.integration.file.filters.FileListFilter<BlobInfo>public boolean supportsSingleFileFiltering()
supportsSingleFileFiltering in interface org.springframework.integration.file.filters.FileListFilter<BlobInfo>Copyright © 2022. All rights reserved.