Class SequenceSizeReleaseStrategy
java.lang.Object
org.springframework.integration.aggregator.SequenceSizeReleaseStrategy
- All Implemented Interfaces:
- ReleaseStrategy
An implementation of 
ReleaseStrategy that simply compares the current size of
 the message list to the expected 'sequenceSize'. Supports release of partial sequences.
 Correlating message handlers prevent the addition of duplicate sequences to the group.- Author:
- Mark Fisher, Marius Bogoevici, Dave Syer, Iwein Fuld, Oleg Zhurakousky, Artem Bilan, Enrique Rodriguez
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct an instance that does not support releasing partial sequences.SequenceSizeReleaseStrategy(boolean releasePartialSequences) Construct an instance that supports releasing partial sequences if releasePartialSequences is true.
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanRelease(MessageGroup messageGroup) voidsetReleasePartialSequences(boolean releasePartialSequences) Flag that determines if partial sequences are allowed.
- 
Constructor Details- 
SequenceSizeReleaseStrategypublic SequenceSizeReleaseStrategy()Construct an instance that does not support releasing partial sequences.
- 
SequenceSizeReleaseStrategypublic SequenceSizeReleaseStrategy(boolean releasePartialSequences) Construct an instance that supports releasing partial sequences if releasePartialSequences is true. This can be an expensive operation on large groups.- Parameters:
- releasePartialSequences- true to allow the release of partial sequences.
 
 
- 
- 
Method Details- 
setReleasePartialSequencespublic void setReleasePartialSequences(boolean releasePartialSequences) Flag that determines if partial sequences are allowed. If true then as soon as enough messages arrive that can be ordered they will be released, provided they all have sequence numbers greater than those already released. This can be an expensive operation for large groups.- Parameters:
- releasePartialSequences- true when partial sequences should be released.
 
- 
canRelease- Specified by:
- canReleasein interface- ReleaseStrategy
 
 
-