org.springframework.integration.aggregator
Class SequenceSizeReleaseStrategy

java.lang.Object
  extended by org.springframework.integration.aggregator.SequenceSizeReleaseStrategy
All Implemented Interfaces:
ReleaseStrategy

public class SequenceSizeReleaseStrategy
extends java.lang.Object
implements ReleaseStrategy

An implementation of ReleaseStrategy that simply compares the current size of the message list to the expected 'sequenceSize'.


Constructor Summary
SequenceSizeReleaseStrategy()
           
SequenceSizeReleaseStrategy(boolean releasePartialSequences)
           
 
Method Summary
 boolean canRelease(MessageGroup messages)
           
 void setReleasePartialSequences(boolean releasePartialSequences)
          Flag that determines if partial sequences are allowed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceSizeReleaseStrategy

public SequenceSizeReleaseStrategy()

SequenceSizeReleaseStrategy

public SequenceSizeReleaseStrategy(boolean releasePartialSequences)
Method Detail

setReleasePartialSequences

public 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.

Parameters:
releasePartialSequences -

canRelease

public boolean canRelease(MessageGroup messages)
Specified by:
canRelease in interface ReleaseStrategy