Class 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.

Iwein Fuld, Josh Long, Gary Russell, Artem Bilan
  • 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[])
      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