Package io.aeron.command
Class RejectImageFlyweight
java.lang.Object
io.aeron.command.CorrelatedMessageFlyweight
io.aeron.command.RejectImageFlyweight
Control message to reject an image for a 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 | | | +---------------------------------------------------------------+ | Correlation ID | | | +---------------------------------------------------------------+ | Image Correlation ID | | | +---------------------------------------------------------------+ | Position | | | +---------------------------------------------------------------+ | Reason Length | +---------------------------------------------------------------+ | Reason (ASCII) ... ... | +---------------------------------------------------------------+
-
Field Summary
Fields inherited from class io.aeron.command.CorrelatedMessageFlyweight
LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclientId(long clientId) Set client id field.static intcomputeLength(String reason) Compute the length of the message based on the reason supplied.correlationId(long correlationId) Set correlation id field.longGet image correlation id field.imageCorrelationId(long position) Put image correlation id field.longposition()Get position field.position(long position) Put position field.reason()Get reason field as ASCII.Put reason field as ASCII.intLength of the reason text.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, correlationId
-
Constructor Details
-
RejectImageFlyweight
public RejectImageFlyweight()
-
-
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.
-
imageCorrelationId
public long imageCorrelationId()Get image correlation id field.- Returns:
- image correlation id field.
-
imageCorrelationId
Put image correlation id field.- Parameters:
position- new image correlation id value.- Returns:
- this for a fluent API.
-
position
public long position()Get position field.- Returns:
- position field.
-
position
Put position field.- Parameters:
position- new position value.- Returns:
- this for a fluent API.
-
reason
Put reason field as ASCII. Include the reason length in the message.- Parameters:
reason- for invalidating the image.- Returns:
- this for a fluent API.
-
reason
Get reason field as ASCII.- Returns:
- reason for invalidating the image.
-
reasonBufferLength
public int reasonBufferLength()Length of the reason text.- Returns:
- length of the reason text.
-
clientId
Set client id field.- Overrides:
clientIdin classCorrelatedMessageFlyweight- Parameters:
clientId- field value.- Returns:
- this for a fluent API.
-
correlationId
Set correlation id field.- Overrides:
correlationIdin classCorrelatedMessageFlyweight- Parameters:
correlationId- field value.- Returns:
- this for a fluent API.
-
computeLength
Compute the length of the message based on the reason supplied.- Parameters:
reason- message to be return to originator.- Returns:
- length of the message.
-
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.
-