Package io.aeron.command
Class GetNextAvailableSessionIdMessageFlyweight
java.lang.Object
io.aeron.command.CorrelatedMessageFlyweight
io.aeron.command.GetNextAvailableSessionIdMessageFlyweight
Control message for getting next available session id from the media driver
(
ControlProtocolEvents.GET_NEXT_AVAILABLE_SESSION_ID).
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 | | | +---------------------------------------------------------------+ | Stream Id | +---------------------------------------------------------------+
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintlength()Length of the message in bytes.intstreamId()Get the stream id.streamId(int streamId) Set the stream id.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
-
Field Details
-
LENGTH
public static final int LENGTHLength of the header.- See Also:
-
-
Constructor Details
-
GetNextAvailableSessionIdMessageFlyweight
public GetNextAvailableSessionIdMessageFlyweight()
-
-
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.
-
streamId
public int streamId()Get the stream id.- Returns:
- the stream id.
-
streamId
Set the stream id.- Parameters:
streamId- the channel id.- Returns:
- this for a fluent API.
-
length
public int length()Length of the message in bytes. Only valid after the channel is set.- Returns:
- length of the message 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.
-