Spring Integration

org.springframework.integration.aggregator
Class TimeoutCountSequenceSizeReleaseStrategy

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

public class TimeoutCountSequenceSizeReleaseStrategy
extends java.lang.Object
implements ReleaseStrategy

A ReleaseStrategy that releases all messages if any of the following is true:

Since:
2.0
Author:
Dave Syer

Field Summary
static int DEFAULT_THRESHOLD
          Default threshold is effectively infinite.
static long DEFAULT_TIMEOUT
          Default timeout is one minute.
 
Constructor Summary
TimeoutCountSequenceSizeReleaseStrategy()
           
TimeoutCountSequenceSizeReleaseStrategy(int threshold, long timeout)
           
 
Method Summary
 boolean canRelease(MessageGroup messages)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
Default timeout is one minute.

See Also:
Constant Field Values

DEFAULT_THRESHOLD

public static final int DEFAULT_THRESHOLD
Default threshold is effectively infinite.

See Also:
Constant Field Values
Constructor Detail

TimeoutCountSequenceSizeReleaseStrategy

public TimeoutCountSequenceSizeReleaseStrategy()

TimeoutCountSequenceSizeReleaseStrategy

public TimeoutCountSequenceSizeReleaseStrategy(int threshold,
                                               long timeout)
Parameters:
threshold - the number of messages to accept before releasing
timeout - the timeout for the release in milliseconds
Method Detail

canRelease

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

Spring Integration