public class MessageCountReleaseStrategy extends Object implements ReleaseStrategy
Constructor and Description |
---|
MessageCountReleaseStrategy()
Convenient constructor is only one message is required (threshold=1).
|
MessageCountReleaseStrategy(int threshold) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRelease(MessageGroup group)
Release the group if it has more messages than the threshold and has not previously been released.
|
public MessageCountReleaseStrategy(int threshold)
threshold
- the number of messages to accept before releasingpublic MessageCountReleaseStrategy()
public boolean canRelease(MessageGroup group)
canRelease
in interface ReleaseStrategy