Class MessageCountReleaseStrategy
java.lang.Object
org.springframework.integration.aggregator.MessageCountReleaseStrategy
- All Implemented Interfaces:
- ReleaseStrategy
- Author:
- Dave Syer, Oleg Zhurakousky, Artem Bilan
- 
Constructor SummaryConstructorsConstructorDescriptionConvenient constructor is only one message is required (threshold=1).MessageCountReleaseStrategy(int threshold) Construct an instance based on the provided threshold.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanRelease(MessageGroup group) Release the group if it has more messages than the threshold and has not previously been released.
- 
Constructor Details- 
MessageCountReleaseStrategypublic MessageCountReleaseStrategy()Convenient constructor is only one message is required (threshold=1).
- 
MessageCountReleaseStrategypublic MessageCountReleaseStrategy(int threshold) Construct an instance based on the provided threshold.- Parameters:
- threshold- the number of messages to accept before releasing
 
 
- 
- 
Method Details- 
canReleaseRelease the group if it has more messages than the threshold and has not previously been released. It is possible that more messages than the threshold could be released, but only if multiple consumers receive messages from the same group concurrently.- Specified by:
- canReleasein interface- ReleaseStrategy
 
 
-