public final class PktSubheaderFMC extends PktSubheaderVariable
This class is the subheader used to transport fabric multicast related information in the packet header e.g. topics.
This packet subheader header is a versioned entity. The subheader version defines the format of the subheader i.e. what fields comprise the subheader and their relative locations when serialized. A crucial aspect of subheader versioning is that a version N subheader will always be a subset of a version M subheader where N < M i.e. all fields in version N of a subheader will be present and in the same position as fields in version M of the subheader. i.e. a subheader never shrinks or moves fields around. With time, the subheader can only grow. See the setter/getter method documentation for information on which subheader version the fields that they affect belong to.
PREAMBLE_LENGTH, PREAMBLE_LENGTH_V1count, head, next, prev| Modifier and Type | Method and Description |
|---|---|
static int |
calcSerializedLength(ByteBuffer buffer,
int offset)
Calculate serialized length of a serialized FMC subheader
|
static int |
calcSerializedLength(IOBuffer buffer,
int offset)
Calculate serialized length of a serialized FMC subheader
|
static int |
calcSerializedLength(long addr,
int offset)
Calculate serialized length of a serialized FMC subheader
|
static PktBody |
create()
Creates a default FMC subheader.
|
static PktBody |
create(Properties props)
Creates an FMC subheader.
|
void |
doDesync(int len)
Invoked to desync early sync content from the backing buffer
|
int |
doGetSerializedLength()
Invoked to fetch the serialized length of the body
|
boolean |
equals(Object obj)
Indicates whether some other object is equal to this one.
|
static short |
getLatestSubheaderVersion()
Get the latest subheader version.
|
int |
getSerializedLength(ByteBuffer buffer,
int offset)
Get the serialized length from the serialized form
|
int |
getSerializedLength(IOBuffer buffer,
int offset)
Get the serialized length from the serialized form
|
int |
getSerializedLength(long addr,
int offset)
Get the serialized length from the serialized form
|
short |
getSubheaderVersion()
Get the header format version (V1 Subheader Field).
|
String |
getTopic()
Get the publication topic (V1 Subheader Field).
|
int |
hashCode()
Returns the hashcode for this object
|
void |
initialize()
Invoked by constructor post initialization
This method is invoked by the constructor post initialization of the
base class.
|
void |
initializeBuffer()
Implementation of
IOElasticBuffer.Initializer.initializeBuffer()
The default implementation of this method is no-op. |
void |
setTopic(String topic)
Set the publication topic (V1 Subheader Field).
|
String |
toString()
Returns a string representation of the object
|
getType, getType, getTypedeserialize, deserialize, deserialize, deserialize, deserialize, deserialize, deserialize, desync, dump, getBuffer, getInitialBufferLength, getSerializedLength, getTo, getTo, getTo, getTo, getTo, getTo, getTo, getType, putFrom, putFrom, putFrom, putFrom, putFrom, putFrom, putFrom, putFrom, reset, reset, serialize, serialize, serialize, serialize, serialize, serialize, sync, syncfcount, insertAfter, insertBefore, isLinked, next, previous, unlink, wipepublic static PktBody create(Properties props)
props - The property set to use to qualify creation of the body.public static PktBody create()
public static final int calcSerializedLength(ByteBuffer buffer, int offset)
public static final int calcSerializedLength(IOBuffer buffer, int offset)
public static final int calcSerializedLength(long addr,
int offset)
public final void initialize()
PktBodyThis method is invoked by the constructor post initialization of the base class. Its purpose is to notify the body implementation (subclass) to perform any initialization activities that depend on an initialized base class.
The default implementation is a no-op i.e. it does nothing.
public final int doGetSerializedLength()
PktBodypublic final int getSerializedLength(ByteBuffer buffer, int offset)
PktSubheadergetSerializedLength in class PktSubheaderpublic final int getSerializedLength(IOBuffer buffer, int offset)
PktSubheadergetSerializedLength in class PktSubheaderpublic final int getSerializedLength(long addr,
int offset)
PktSubheadergetSerializedLength in class PktSubheaderpublic final void doDesync(int len)
PktBodylen - The length of the data in the backing buffer
The default implementation is a no-op i.e. it does nothing.
public static final short getLatestSubheaderVersion()
This method returns the latest subheader version i.e. the version used when subheaders are created explicitly i.e. not through deserialization
public final short getSubheaderVersion()
public final void setTopic(String topic)
public final String getTopic()
public final void initializeBuffer()
PktBodyIOElasticBuffer.Initializer.initializeBuffer()
The default implementation of this method is no-op. The concrete body implementation should override and implement this method if it needs to do buffer initialization.
initializeBuffer in interface IOElasticBuffer.InitializerinitializeBuffer in class PktBodypublic final String toString()
public final boolean equals(Object obj)
Copyright © 2019 N5 Technologies, Inc. All Rights Reserved.