|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlListElement
com.neeve.pkt.PktSerializable
com.neeve.pkt.PktBody
com.neeve.pkt.PktSubheader
com.neeve.pkt.PktSubheaderVariable
com.neeve.pkt.PktSubheaderODS
public final class PktSubheaderODS
The ODS packet subheader.
This class is the subheader used by ODS Neeve store binding to tunnel control information.
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.neeve.pkt.PktSerializable |
---|
PktSerializable.DeserializeContext, PktSerializable.SerializeContext |
Field Summary | |
---|---|
static int |
FLAG_COMMIT_ACK_REQUIRED
Specifies that a commit ack needs to be sent back |
static int |
FLAG_COMMIT_END
Specifies the end of a commit batch |
static int |
FLAG_COMMIT_ENTRY_IN_INIT
Specifies that the commit entry is part of an init |
static int |
FLAG_COMMIT_ENTRY_IS_PUT
Specifies that the commit entry is for a put |
static int |
FLAG_COMMIT_ENTRY_IS_REMOVE
Specifies that the commit entry is for a remove |
static int |
FLAG_COMMIT_ENTRY_IS_SEND
Specifies that the commit entry is for a send |
static int |
FLAG_COMMIT_ENTRY_IS_UPDATE
Specifies that the commit entry is for an update |
static int |
FLAG_COMMIT_START
Specifies the beginning of a commit batch |
Fields inherited from class com.neeve.pkt.PktSubheader |
---|
PREAMBLE_LENGTH, PREAMBLE_LENGTH_V1 |
Fields inherited from class com.neeve.util.UtlListElement |
---|
count, head, next, prev |
Method Summary | |
---|---|
void |
copyObjectMetadataFrom(PktBuffer metadata)
Copy the object metadata (V1 Subheader Field) from a packet buffer. |
void |
copyObjectMetadataTo(PktBuffer buffer,
int offset)
Copy the object metadata (V1 Subheader Field) to a packet buffer. |
void |
copyPersisterMetadataFrom(PktBuffer metadata)
Copy the persister metadata (V1 Subheader Field) from a packet buffer. |
void |
copyPersisterMetadataTo(PktBuffer buffer,
int offset)
Copy the persister metadata (V1 Subheader Field) to a packet buffer. |
static PktBody |
create()
Creates a default ODS subheader |
static PktBody |
create(Properties props)
Creates an ODS subheader |
int |
doGetSerializedLength()
Implementation of PktBody.doGetSerializedLength() |
long |
getCheckpointVersion()
Get the checkpoint version (V1 Subheader Field). |
short |
getContentEncodingType()
Get the contentEncodingType type(V1 Subheader Field). |
long |
getCurrentCommitSno()
Get the current commit sequence number (V1 Subheader Field). |
boolean |
getFlagCommitAckRequired()
Get the 'commit ack required' flag (V1 Subheader Field). |
boolean |
getFlagCommitEnd()
Get the 'commit end' flag (V1 Subheader Field). |
boolean |
getFlagCommitEntryInInit()
Get the 'commit entry in INIT' flag (V1 Subheader Field). |
boolean |
getFlagCommitEntryIsPut()
Get the 'commit entry is PUT' flag (V1 Subheader Field). |
boolean |
getFlagCommitEntryIsRemove()
Get the 'commit entry is REMOVE' flag (V1 Subheader Field). |
boolean |
getFlagCommitEntryIsSend()
Get the 'commit entry is SEND' flag (V1 Subheader Field). |
boolean |
getFlagCommitEntryIsUpdate()
Get the 'commit entry is UPDATE' flag (V1 Subheader Field). |
boolean |
getFlagCommitStart()
Get the 'commit start' flag (V1 Subheader Field). |
int |
getFlags()
Get the flags (V1 Subheader Field). |
static short |
getLatestSubheaderVersion()
Get the latest subheader version. |
long |
getLeaderRound()
Get the leader round (V1 Subheader Field). |
short |
getObjectFactoryId()
Get the object factory id (V1 Subheader Field). |
com.eaio.uuid.UUID |
getObjectId()
Get the object id (V1 Subheader Field). |
PktBuffer |
getObjectMetadata()
Get the object metadata (V1 Subheader Field). |
short |
getObjectType()
Get the object type (V1 Subheader Field). |
PktBuffer |
getPersisterMetadata()
Get the persister metadata (V1 Subheader Field). |
int |
getSerializedLength(ByteBuffer buffer)
Implementation of PktSubheader.getSerializedLength(ByteBuffer) |
long |
getStableCommitSno()
Get the stable commit sequence number (V1 Subheader Field). |
long |
getStableTransactionId()
Get the stable transactionId (V1 Subheader Field). |
short |
getSubheaderVersion()
Get the header format version (V1 Subheader Field). |
long |
getTransactionId()
Get the transactionId (V1 Subheader Field). |
void |
initialize()
Implementation of PktBody.initialize() |
void |
initializeBuffer()
Implementation of PktBuffer.Initializer.initializeBuffer() |
static void |
prepare(PktPacket packet,
long round,
long currCommitSno,
long stblCommitSno,
com.eaio.uuid.UUID objectId,
short contentEncoding,
long transactionId,
long stableTransactionId,
long checkpointVersion,
short ofid,
short otype,
int flags)
Prepare a packet with an ODS subheader with latest version. |
void |
setCheckpointVersion(long checkpointVersion)
Set the checkpoint version (V1 Subheader Field). |
void |
setContentEncodingType(short contentEncodingType)
Set the contentEncodingType type (V1 Subheader Field). |
void |
setCurrentCommitSno(long currCommitSno)
Set the current commit sequence number (V1 Subheader Field). |
void |
setFlagCommitAckRequired(boolean val)
Set the 'commit ack required' flag |
void |
setFlagCommitEnd(boolean val)
Set the 'commit end' flag (V1 Subheader Field). |
void |
setFlagCommitEntryInInit(boolean val)
Set the 'commit entry in INIT' flag |
void |
setFlagCommitEntryIsPut(boolean val)
Set the 'commit entry is PUT' flag |
void |
setFlagCommitEntryIsRemove(boolean val)
Set the 'commit entry is REMOVE' flag |
void |
setFlagCommitEntryIsSend(boolean val)
Set the 'commit entry is SEND' flag |
void |
setFlagCommitEntryIsUpdate(boolean val)
Set the 'commit entry is UPDATE' flag |
void |
setFlagCommitStart(boolean val)
Set the 'commit start' flag |
void |
setFlags(int flags)
Set the flags (V1 Subheader Field). |
void |
setLeaderRound(long round)
Set the leader round (V1 Subheader Field). |
void |
setObjectFactoryId(short ofid)
Set the object factory id (V1 Subheader Field). |
void |
setObjectId(com.eaio.uuid.UUID objectId)
Set the object id (V1 Subheader Field). |
void |
setObjectType(short otype)
Set the object type (V1 Subheader Field). |
void |
setStableCommitSno(long stblCommitSno)
Set the stable commit sequence number (V1 Subheader Field). |
void |
setStableTransactionId(long stableTransactionId)
Set the stable transaction id (V1 Subheader Field). |
void |
setTransactionId(long transactionId)
Set the transaction id (V1 Subheader Field). |
String |
toString()
Returns a string representation of the object |
Methods inherited from class com.neeve.pkt.PktSubheader |
---|
getType |
Methods inherited from class com.neeve.pkt.PktBody |
---|
deserialize, getBuffer, getSerializedLength, getType, isNative, reset, serialize |
Methods inherited from class com.neeve.pkt.PktSerializable |
---|
deserialize, getDeserializationPolicy, getSerializationPolicy, isValidDeserializationPolicy, isValidSerializationPolicy, serialize, setDeserializationPolicy, setSerializationPolicy |
Methods inherited from class com.neeve.util.UtlListElement |
---|
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FLAG_COMMIT_START
public static final int FLAG_COMMIT_END
public static final int FLAG_COMMIT_ACK_REQUIRED
public static final int FLAG_COMMIT_ENTRY_IS_PUT
public static final int FLAG_COMMIT_ENTRY_IS_UPDATE
public static final int FLAG_COMMIT_ENTRY_IS_REMOVE
public static final int FLAG_COMMIT_ENTRY_IS_SEND
public static final int FLAG_COMMIT_ENTRY_IN_INIT
Method Detail |
---|
public static PktBody create(Properties props)
props
- The property set to use to qualify creation of the body.public static PktBody create()
public static void prepare(PktPacket packet, long round, long currCommitSno, long stblCommitSno, com.eaio.uuid.UUID objectId, short contentEncoding, long transactionId, long stableTransactionId, long checkpointVersion, short ofid, short otype, int flags)
packet
- The packet to prepare.round
- The leader round to setcurrCommitSno
- The current commit sequence number to set.stblCommitSno
- The stable commit sequence number to set.objectId
- The object id to set.contentEncoding
- The object's content encoding.transactionId
- The current transaction id.stableTransactionId
- The stable transaction id.checkpointVersion
- The checkpoint version.ofid
- The object's factory id.otype
- The object's type.flags
- The flags to set.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 void initialize()
PktBody.initialize()
public final int doGetSerializedLength()
PktBody.doGetSerializedLength()
public final int getSerializedLength(ByteBuffer buffer)
PktSubheader.getSerializedLength(ByteBuffer)
getSerializedLength
in class PktSubheader
public final short getSubheaderVersion()
public final void setLeaderRound(long round)
round
- The round to set.public final long getLeaderRound()
public final void setCurrentCommitSno(long currCommitSno)
currCommitSno
- The commit sequence number to set.public final long getCurrentCommitSno()
public final void setStableCommitSno(long stblCommitSno)
stblCommitSno
- The commit sequence number to set.public final long getStableCommitSno()
public final void setObjectId(com.eaio.uuid.UUID objectId)
objectId
- The object id to set.public final com.eaio.uuid.UUID getObjectId()
NOTE:
If the packet that this header belongs to is pooled, the validity of the
returned UUID
is only valid while the packet remains, undisposed.
Once the object is returned to its pool the UUID may be wiped and reused.
Consequently, callers that plan to use the returned id beyond this objects
lifespan should either make a copy of it, or aquire this object to prevent
it from be returned to its pool.
public final void setObjectFactoryId(short ofid)
ofid
- The object factory id to set.public final short getObjectFactoryId()
public final void setObjectType(short otype)
otype
- The object type to set.public final short getObjectType()
public final void setContentEncodingType(short contentEncodingType)
contentEncodingType
- The encoding type to set.public final short getContentEncodingType()
public final void setTransactionId(long transactionId)
transactionId
- The transaction id to set.public final long getTransactionId()
public final void setStableTransactionId(long stableTransactionId)
stableTransactionId
- The stable transaction id to set.public final long getStableTransactionId()
public final void setCheckpointVersion(long checkpointVersion)
checkpointVersion
- The checkpointVersion to set.public final long getCheckpointVersion()
public final void setFlags(int flags)
flags
- The flags to set.public final int getFlags()
public final void setFlagCommitStart(boolean val)
public final boolean getFlagCommitStart()
public final void setFlagCommitEnd(boolean val)
public final boolean getFlagCommitEnd()
public final void setFlagCommitAckRequired(boolean val)
public final boolean getFlagCommitAckRequired()
public final void setFlagCommitEntryIsPut(boolean val)
public final boolean getFlagCommitEntryIsPut()
public final void setFlagCommitEntryIsUpdate(boolean val)
public final boolean getFlagCommitEntryIsUpdate()
public final void setFlagCommitEntryIsRemove(boolean val)
public final boolean getFlagCommitEntryIsRemove()
public final void setFlagCommitEntryIsSend(boolean val)
public final boolean getFlagCommitEntryIsSend()
public final void setFlagCommitEntryInInit(boolean val)
public final boolean getFlagCommitEntryInInit()
public final void copyObjectMetadataFrom(PktBuffer metadata)
public final PktBuffer getObjectMetadata()
The metadata returned by this method can be null.
public final void copyObjectMetadataTo(PktBuffer buffer, int offset)
public final void copyPersisterMetadataFrom(PktBuffer metadata)
public final PktBuffer getPersisterMetadata()
The metadata returned by this method can be null.
public final void copyPersisterMetadataTo(PktBuffer buffer, int offset)
public final void initializeBuffer()
PktBuffer.Initializer.initializeBuffer()
initializeBuffer
in interface PktBuffer.Initializer
initializeBuffer
in class PktBody
public final String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |