Class AcceptOnceFileListFilter<F>

java.lang.Object
org.springframework.integration.file.filters.AbstractFileListFilter<F>
org.springframework.integration.file.filters.AcceptOnceFileListFilter<F>
Type Parameters:
F - the file type.
All Implemented Interfaces:
FileListFilter<F>, ResettableFileListFilter<F>, ReversibleFileListFilter<F>

public class AcceptOnceFileListFilter<F> extends AbstractFileListFilter<F> implements ReversibleFileListFilter<F>, ResettableFileListFilter<F>
FileListFilter that passes files only one time. This can conveniently be used to prevent duplication of files, as is done in FileReadingMessageSource.

This implementation is thread safe.

Author:
Iwein Fuld, Josh Long, Gary Russell, Artem Bilan, Christian Tzolov
  • Constructor Details

    • AcceptOnceFileListFilter

      public AcceptOnceFileListFilter(int maxCapacity)
      Creates an AcceptOnceFileListFilter that is based on a bounded queue. If the queue overflows, files that fall out will be passed through this filter again if passed to the AbstractFileListFilter.filterFiles(Object[])
      Parameters:
      maxCapacity - the maximum number of Files to maintain in the 'seen' queue.
    • AcceptOnceFileListFilter

      public AcceptOnceFileListFilter()
      Creates an AcceptOnceFileListFilter based on an unbounded queue.
  • Method Details