public interface MessageGroup
The message group allows implementations to be mutable, but this behavior is optional. Implementations should take care to document their thread safety and mutability.
Modifier and Type | Method and Description |
---|---|
void |
add(Message<?> messageToAdd)
Add the message to this group.
|
boolean |
canAdd(Message<?> message)
Query if the message can be added.
|
void |
clear() |
void |
complete()
Complete the group.
|
Object |
getGroupId() |
long |
getLastModified() |
int |
getLastReleasedMessageSequenceNumber() |
Collection<Message<?>> |
getMessages()
Returns all available Messages from the group at the time of invocation
|
Message<?> |
getOne() |
int |
getSequenceSize() |
long |
getTimestamp() |
boolean |
isComplete() |
boolean |
remove(Message<?> messageToRemove)
Remove the message from this group.
|
void |
setLastModified(long lastModified) |
void |
setLastReleasedMessageSequenceNumber(int sequenceNumber) |
int |
size() |
boolean canAdd(Message<?> message)
message
- The message.void add(Message<?> messageToAdd)
messageToAdd
- the message to add.boolean remove(Message<?> messageToRemove)
messageToRemove
- the message to remove.true
if a message was removed.Collection<Message<?>> getMessages()
Object getGroupId()
int getLastReleasedMessageSequenceNumber()
void setLastReleasedMessageSequenceNumber(int sequenceNumber)
boolean isComplete()
void complete()
int getSequenceSize()
int size()
Message<?> getOne()
long getTimestamp()
long getLastModified()
void setLastModified(long lastModified)
void clear()