org.springframework.integration.file.entries
Class AcceptOnceEntryFileListFilter<T>
java.lang.Object
org.springframework.integration.file.entries.AbstractEntryListFilter<T>
org.springframework.integration.file.entries.AcceptOnceEntryFileListFilter<T>
- All Implemented Interfaces:
- InitializingBean, EntryListFilter<T>
public class AcceptOnceEntryFileListFilter<T>
- extends AbstractEntryListFilter<T>
EntryListFilter
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.
- Since:
- 1.0.0
- Author:
- Iwein Fuld
Method Summary |
boolean |
accept(T pathname)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AcceptOnceEntryFileListFilter
public AcceptOnceEntryFileListFilter(int maxCapacity)
- Creates an
AcceptOnceEntryFileListFilter
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 AbstractEntryListFilter.filterEntries(Object[])
method.
- Parameters:
maxCapacity
- the maximum number of Files to maintain in the 'seen'
queue.
AcceptOnceEntryFileListFilter
public AcceptOnceEntryFileListFilter()
- Creates an AcceptOnceFileFilter based on an unbounded queue.
accept
public boolean accept(T pathname)
- Specified by:
accept
in class AbstractEntryListFilter<T>
Copyright © 2010. All Rights Reserved.