spring-projects/spring-integration — pull request #1333 by garyrussell (2014-12-08 21:46:30+00:00)
Title: INT-3572: Improve Accept Once Filter Performance

JIRA: https://jira.spring.io/browse/INT-3572

Previously, a blocking queue was used to hold seen files; this was used to enable
FIFO when a max capacity is set.

When used with no capacity, a queue is not needed; also the `contains` operation
on a queue requires a linear search which does not scale well for a large number
of files.

Use a `HashSet` instead to significantly improve the `contains` performance.

Only maintain a queue if a max capacity is set.

__cherry-pick to 4.0.x__