Class GcsDiscardRecentModifiedFileListFilter

  • All Implemented Interfaces:
    org.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>, org.springframework.integration.file.filters.FileListFilter<BlobInfo>

    public class GcsDiscardRecentModifiedFileListFilter
    extends Object
    implements org.springframework.integration.file.filters.DiscardAwareFileListFilter<BlobInfo>
    The GcsDiscardRecentModifiedFileListFilter is a filter which excludes all files that were updated less than some specified amount of time ago.

    More specifically, it excludes all files whose BlobInfo.getUpdateTime() is within age of the current time.

    When discardCallback is provided, it called for all the rejected files.

    • Method Detail

      • addDiscardCallback

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

        public List<BlobInfo> filterFiles​(BlobInfo[] files)
        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>