Package io.aeron.command
Class DestinationMessageFlyweight
java.lang.Object
io.aeron.command.CorrelatedMessageFlyweight
io.aeron.command.DestinationMessageFlyweight
Control message for adding or removing a destination for a Publication in multi-destination-cast or a Subscription
in multi-destination Subscription.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Client ID | | | +---------------------------------------------------------------+ | Command Correlation ID | | | +---------------------------------------------------------------+ | Registration Correlation ID | | | +---------------------------------------------------------------+ | Channel Length | +---------------------------------------------------------------+ | Channel (ASCII) ... ... | +---------------------------------------------------------------+
-
Field Summary
Fields inherited from class io.aeron.command.CorrelatedMessageFlyweight
LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendChannel(Appendable appendable) Append the channel value to anAppendable.channel()Get the channel field in ASCII.Set channel field in ASCII.static intcomputeLength(int channelLength) Compute the length of the command message for a given channel length.intlength()Length of the frame in bytes.longreturn correlation id used in registration field.registrationCorrelationId(long correlationId) set registration correlation id field.voidvalidateLength(int msgTypeId, int length) Validate buffer length is long enough for message.wrap(MutableDirectBuffer buffer, int offset) Wrap the buffer at a given offset for updates.Methods inherited from class io.aeron.command.CorrelatedMessageFlyweight
clientId, clientId, correlationId, correlationId
-
Constructor Details
-
DestinationMessageFlyweight
public DestinationMessageFlyweight()
-
-
Method Details
-
wrap
Wrap the buffer at a given offset for updates.- Overrides:
wrapin classCorrelatedMessageFlyweight- Parameters:
buffer- to wrap.offset- at which the message begins.- Returns:
- this for a fluent API.
-
registrationCorrelationId
public long registrationCorrelationId()return correlation id used in registration field.- Returns:
- correlation id field.
-
registrationCorrelationId
set registration correlation id field.- Parameters:
correlationId- field value.- Returns:
- this for a fluent API.
-
channel
Get the channel field in ASCII.- Returns:
- channel field.
-
appendChannel
Append the channel value to anAppendable.- Parameters:
appendable- to append channel to.
-
channel
Set channel field in ASCII.- Parameters:
channel- field value- Returns:
- this for a fluent API.
-
length
public int length()Length of the frame in bytes.- Returns:
- length of the frame in bytes.
-
validateLength
public void validateLength(int msgTypeId, int length) Validate buffer length is long enough for message.- Overrides:
validateLengthin classCorrelatedMessageFlyweight- Parameters:
msgTypeId- type of message.length- of message in bytes to validate.
-
computeLength
public static int computeLength(int channelLength) Compute the length of the command message for a given channel length.- Parameters:
channelLength- to be appended to the header.- Returns:
- the length of the command message for a given channel length.
-