public interface MessageTable
Modifier and Type | Method and Description |
---|---|
void |
checkConsumedMemory()
Checks whether the consumed memory
is allowed and performs the
appropriate actions.
|
int |
clean(long currentTime,
DMQManager dmqManager)
Cleans the table from invalid
messages.
|
Message |
get(String msgId)
Returns the specified message.
|
int |
getConsumedMemory()
Returns the amount of memory in bytes
consumed by this message table.
|
Map<String,Message> |
getMap()
Returns a map of messages from this table indexed
by their message identifiers.
|
void |
put(Message msg)
Adds a message in this table.
|
void |
remove(String msgId)
Removes the specified message.
|
int |
size()
Returns the exact number of all the messages
that are contained by this table.
|
int getConsumedMemory()
void put(Message msg)
msg
- the message to be addedvoid checkConsumedMemory()
Message get(String msgId)
msgId
- the identifier of the message to returnint clean(long currentTime, DMQManager dmqManager)
currentTime
- the time from which messages are considered invaliddmqManager
- the dead message queue managervoid remove(String msgId)
msgId
- the identifier of the message to removeint size()
Copyright © 2018 ScalAgent D.T.. All Rights Reserved.