Class OrderInterceptor.MessageOrder
java.lang.Object
org.apache.catalina.tribes.group.interceptors.OrderInterceptor.MessageOrder
- Enclosing class:
OrderInterceptor
Represents a message in the ordering queue.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageOrder(int msgNr, ChannelMessage msg) Constructs a MessageOrder with the given message number and message. -
Method Summary
Modifier and TypeMethodDescriptionAdds a message order to the end of the chain.intgetCount()Returns the count of messages in this chain.Returns the channel message.intgetMsgNr()Returns the message number.getNext()Returns the next message in the order.booleanisExpired(long expireTime) Checks if this message has expired.voidsetMessage(ChannelMessage msg) Sets the channel message.voidSets the next message in the order.
-
Constructor Details
-
MessageOrder
Constructs a MessageOrder with the given message number and message.- Parameters:
msgNr- The message numbermsg- The channel message
-
-
Method Details
-
isExpired
public boolean isExpired(long expireTime) Checks if this message has expired.- Parameters:
expireTime- The expiration time in milliseconds- Returns:
- true if the message has expired
-
getMessage
-
setMessage
Sets the channel message.- Parameters:
msg- The channel message
-
setNext
Sets the next message in the order.- Parameters:
order- The next message order
-
getNext
Returns the next message in the order.- Returns:
- The next message order
-
getCount
public int getCount()Returns the count of messages in this chain.- Returns:
- The message count
-
add
public static OrderInterceptor.MessageOrder add(OrderInterceptor.MessageOrder head, OrderInterceptor.MessageOrder add) Adds a message order to the end of the chain.- Parameters:
head- The head of the chainadd- The message order to add- Returns:
- The head of the updated chain
-
getMsgNr
public int getMsgNr()Returns the message number.- Returns:
- The message number
-