public class SequenceSizeReleaseStrategy extends Object implements ReleaseStrategy
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.Constructor and Description |
---|
SequenceSizeReleaseStrategy()
Construct an instance that does not support releasing partial sequences.
|
SequenceSizeReleaseStrategy(boolean releasePartialSequences)
Construct an instance that supports releasing partial sequences if
releasePartialSequences is true.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canRelease(MessageGroup messageGroup) |
void |
setReleasePartialSequences(boolean releasePartialSequences)
Flag that determines if partial sequences are allowed.
|
public SequenceSizeReleaseStrategy()
public SequenceSizeReleaseStrategy(boolean releasePartialSequences)
releasePartialSequences
- true to allow the release of partial sequences.public void setReleasePartialSequences(boolean releasePartialSequences)
releasePartialSequences
- true when partial sequences should be released.public boolean canRelease(MessageGroup messageGroup)
canRelease
in interface ReleaseStrategy