Package io.aeron.protocol
Class SetupFlyweight
java.lang.Object
org.agrona.AbstractMutableDirectBuffer
org.agrona.concurrent.UnsafeBuffer
io.aeron.protocol.HeaderFlyweight
io.aeron.protocol.SetupFlyweight
- All Implemented Interfaces:
Comparable<DirectBuffer>,AtomicBuffer,DirectBuffer,MutableDirectBuffer
HeaderFlyweight for Setup Message Frames.
Stream Setup wiki page.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortPublication uses group/multicast semantics.static final intLength of the Setup Message Frame.static final shortSubscriber should send response channel setup message.Fields inherited from class io.aeron.protocol.HeaderFlyweight
CURRENT_VERSION, FLAGS_FIELD_OFFSET, FRAME_LENGTH_FIELD_OFFSET, HDR_TYPE_ATS_DATA, HDR_TYPE_ATS_SETUP, HDR_TYPE_ATS_SM, HDR_TYPE_DATA, HDR_TYPE_ERR, HDR_TYPE_EXT, HDR_TYPE_NAK, HDR_TYPE_PAD, HDR_TYPE_RES, HDR_TYPE_RSP_SETUP, HDR_TYPE_RTTM, HDR_TYPE_SETUP, HDR_TYPE_SM, MIN_HEADER_LENGTH, TYPE_FIELD_OFFSET, VERSION_FIELD_OFFSETFields inherited from class org.agrona.concurrent.UnsafeBuffer
ALIGNMENT, DISABLE_BOUNDS_CHECKS_PROP_NAME, SHOULD_BOUNDS_CHECKFields inherited from class org.agrona.AbstractMutableDirectBuffer
addressOffset, byteArray, capacityFields inherited from interface org.agrona.concurrent.AtomicBuffer
STRICT_ALIGNMENT_CHECKS, STRICT_ALIGNMENT_CHECKS_PROP_NAMEFields inherited from interface org.agrona.DirectBuffer
DISABLE_ARRAY_CONTENT_PRINTOUT_PROP_NAME, STR_HEADER_LEN -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor which can later be used to wrap a frame.SetupFlyweight(ByteBuffer buffer) Construct the flyweight over a frame.SetupFlyweight(UnsafeBuffer buffer) Construct the flyweight over a frame. -
Method Summary
Modifier and TypeMethodDescriptionintGet active term id field.activeTermId(int termId) Set active term id field.intGet initial term id field.initialTermId(int termId) Set initial term id field.intGet MTU length field.mtuLength(int mtuLength) Set MTU length field.intGet session id field.sessionId(int sessionId) Set session id field.intstreamId()Get stream id field.streamId(int streamId) Set stream id field.intGet term length field.termLength(int termLength) Set term length field.intGet term offset field.termOffset(int termOffset) Set term offset field.toString()intttl()Get the TTL field.ttl(int ttl) Set the TTL field.Methods inherited from class io.aeron.protocol.HeaderFlyweight
appendFlagsAsChars, flags, flags, flagsToChars, frameLength, frameLength, headerType, headerType, version, versionMethods inherited from class org.agrona.concurrent.UnsafeBuffer
addIntOpaque, addIntOrdered, addIntRelease, addLongOpaque, addLongOrdered, addLongRelease, byteBuffer, compareAndExchangeInt, compareAndExchangeLong, compareAndSetInt, compareAndSetLong, ensureCapacity, getAndAddInt, getAndAddLong, getAndSetInt, getAndSetLong, getByteVolatile, getCharVolatile, getIntAcquire, getIntOpaque, getIntVolatile, getLongAcquire, getLongOpaque, getLongVolatile, getShortVolatile, isExpandable, putByteVolatile, putCharVolatile, putIntOpaque, putIntOrdered, putIntRelease, putIntVolatile, putLongOpaque, putLongOrdered, putLongRelease, putLongVolatile, putShortVolatile, verifyAlignment, wrap, wrap, wrap, wrap, wrap, wrap, wrap, wrapAdjustmentMethods inherited from class org.agrona.AbstractMutableDirectBuffer
addressOffset, boundsCheck, boundsCheck0, byteArray, capacity, checkLimit, compareTo, equals, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringUtf8, getStringUtf8, getStringUtf8, getStringWithoutLengthAscii, getStringWithoutLengthAscii, getStringWithoutLengthUtf8, hashCode, parseIntAscii, parseLongAscii, parseNaturalIntAscii, parseNaturalLongAscii, putByte, putBytes, putBytes, putBytes, putBytes, putBytes, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putIntAscii, putLong, putLong, putLongAscii, putNaturalIntAscii, putNaturalIntAsciiFromEnd, putNaturalLongAscii, putNaturalPaddedIntAscii, putShort, putShort, putStringAscii, putStringAscii, putStringAscii, putStringAscii, putStringUtf8, putStringUtf8, putStringUtf8, putStringUtf8, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthUtf8, setMemoryMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.agrona.DirectBuffer
addressOffset, boundsCheck, byteArray, capacity, checkLimit, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getChar, getChar, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, getShort, getShort, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringAscii, getStringUtf8, getStringUtf8, getStringUtf8, getStringWithoutLengthAscii, getStringWithoutLengthAscii, getStringWithoutLengthUtf8, parseIntAscii, parseLongAscii, parseNaturalIntAscii, parseNaturalLongAsciiMethods inherited from interface org.agrona.MutableDirectBuffer
putByte, putBytes, putBytes, putBytes, putBytes, putBytes, putChar, putChar, putDouble, putDouble, putFloat, putFloat, putInt, putInt, putIntAscii, putLong, putLong, putLongAscii, putNaturalIntAscii, putNaturalIntAsciiFromEnd, putNaturalLongAscii, putNaturalPaddedIntAscii, putShort, putShort, putStringAscii, putStringAscii, putStringAscii, putStringAscii, putStringUtf8, putStringUtf8, putStringUtf8, putStringUtf8, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthAscii, putStringWithoutLengthUtf8, setMemory
-
Field Details
-
HEADER_LENGTH
public static final int HEADER_LENGTHLength of the Setup Message Frame.- See Also:
-
SEND_RESPONSE_SETUP_FLAG
public static final short SEND_RESPONSE_SETUP_FLAGSubscriber should send response channel setup message.- See Also:
-
GROUP_FLAG
public static final short GROUP_FLAGPublication uses group/multicast semantics.- See Also:
-
-
Constructor Details
-
SetupFlyweight
public SetupFlyweight()Default constructor which can later be used to wrap a frame. -
SetupFlyweight
Construct the flyweight over a frame.- Parameters:
buffer- containing the frame.
-
SetupFlyweight
Construct the flyweight over a frame.- Parameters:
buffer- containing the frame.
-
-
Method Details
-
termOffset
public int termOffset()Get term offset field.- Returns:
- term offset field.
-
termOffset
Set term offset field.- Parameters:
termOffset- field value.- Returns:
- this for a fluent API.
-
sessionId
public int sessionId()Get session id field.- Returns:
- session id field.
-
sessionId
Set session id field.- Parameters:
sessionId- field value.- Returns:
- this for a fluent API.
-
streamId
public int streamId()Get stream id field.- Returns:
- stream id field.
-
streamId
Set stream id field.- Parameters:
streamId- field value.- Returns:
- this for a fluent API.
-
initialTermId
public int initialTermId()Get initial term id field.- Returns:
- initial term id field.
-
initialTermId
Set initial term id field.- Parameters:
termId- field value.- Returns:
- this for a fluent API.
-
activeTermId
public int activeTermId()Get active term id field.- Returns:
- term id field.
-
activeTermId
Set active term id field.- Parameters:
termId- field value.- Returns:
- this for a fluent API.
-
termLength
public int termLength()Get term length field.- Returns:
- term length field value.
-
termLength
Set term length field.- Parameters:
termLength- field value.- Returns:
- this for a fluent API.
-
mtuLength
public int mtuLength()Get MTU length field.- Returns:
- MTU length field value.
-
mtuLength
Set MTU length field.- Parameters:
mtuLength- field value.- Returns:
- this for a fluent API.
-
ttl
public int ttl()Get the TTL field.- Returns:
- TTL field value.
-
ttl
Set the TTL field.- Parameters:
ttl- field value.- Returns:
- this for a fluent API.
-
toString
- Overrides:
toStringin classUnsafeBuffer
-