Class MessageCountReleaseStrategy
java.lang.Object
org.springframework.integration.aggregator.MessageCountReleaseStrategy
- All Implemented Interfaces:
- ReleaseStrategy
public class MessageCountReleaseStrategy extends Object implements ReleaseStrategy
- Author:
- Dave Syer, Oleg Zhurakousky, Artem Bilan
- 
Constructor SummaryConstructors Constructor Description MessageCountReleaseStrategy()Convenient constructor is only one message is required (threshold=1).MessageCountReleaseStrategy(int threshold)Construct an instance based on the provided threshold.
- 
Method SummaryModifier and Type Method Description booleancanRelease(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
 
 
-