Class 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>
    The 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 Detail

      • GcsAcceptModifiedAfterFileListFilter

        public GcsAcceptModifiedAfterFileListFilter()
      • GcsAcceptModifiedAfterFileListFilter

        public GcsAcceptModifiedAfterFileListFilter​(Instant instant)
    • Method Detail

      • addDiscardCallback

        public void addDiscardCallback​(@Nullable
                                       Consumer<BlobInfo> discardCallback)
        Specified by:
        addDiscardCallback in interface org.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>
      • filterFiles

        public List<BlobInfo> filterFiles​(BlobInfo[] blobInfos)
        Specified by:
        filterFiles in interface org.springframework.integration.file.filters.FileListFilter<BlobInfo>
      • accept

        public boolean accept​(BlobInfo file)
        Specified by:
        accept in interface org.springframework.integration.file.filters.FileListFilter<BlobInfo>
      • supportsSingleFileFiltering

        public boolean supportsSingleFileFiltering()
        Specified by:
        supportsSingleFileFiltering in interface org.springframework.integration.file.filters.FileListFilter<BlobInfo>