Class NonBlockingCoordinator.CoordinationMessage
java.lang.Object
org.apache.catalina.tribes.group.interceptors.NonBlockingCoordinator.CoordinationMessage
- Enclosing class:
NonBlockingCoordinator
Represents a coordination message used in the election protocol.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final XByteBufferThe byte buffer for the message.protected UniqueIdThe message ID.protected MemberThe leader member.protected MemberThe source member.protected byte[]The message type.protected Member[]The member view. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a CoordinationMessage from a buffer.CoordinationMessage(Member leader, Member source, Member[] view, UniqueId id, byte[] type) Constructs a CoordinationMessage with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the message buffer.byte[]Returns the coordination message header.getId()Returns the message ID.Returns the leader member.Member[]Returns the member view.Returns the source member.byte[]getType()Returns the message type.voidparse()Parses the message from the buffer.voidwrite()Writes the message to the buffer.
-
Field Details
-
buf
The byte buffer for the message. -
leader
The leader member. -
source
The source member. -
view
The member view. -
id
The message ID. -
type
protected byte[] typeThe message type.
-
-
Constructor Details
-
CoordinationMessage
Constructs a CoordinationMessage from a buffer.- Parameters:
buf- The byte buffer containing the message
-
CoordinationMessage
-
-
Method Details
-
getHeader
public byte[] getHeader()Returns the coordination message header.- Returns:
- The header bytes
-
getLeader
-
getSource
-
getId
-
getMembers
-
getType
public byte[] getType()Returns the message type.- Returns:
- The type bytes
-
getBuffer
-
parse
public void parse()Parses the message from the buffer. -
write
public void write()Writes the message to the buffer.
-