|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRogNode
Represents an ROG node.
Nested Class Summary | |
---|---|
static interface |
IRogNode.PoolingListener
Used to listen on when an ROG node goes in and out of pools |
Nested classes/interfaces inherited from interface com.neeve.ods.IStoreObject |
---|
IStoreObject.EncodingType |
Field Summary |
---|
Fields inherited from interface com.neeve.sma.MessageView |
---|
ENCODING_TYPE_CUSTOM, ENCODING_TYPE_JSON, ENCODING_TYPE_PROTOBUF, ENCODING_TYPE_XBUF, NEXT_FREE_ENCODING_TYPE |
Method Summary | |
---|---|
IRogNode |
deserializeFromProtobuf(com.google.protobuf.Message message)
Deserialize a node's data from a protobuf message. |
int |
dispose()
Dispose an ROG node. |
void |
dump(StringBuilder sb,
String leader,
String leaderConcat)
Return a full dump in string form of an ROG node. |
Object |
getAttachment()
Retrieve an object attached to a node. |
boolean |
getIsPriority()
Get whether a node is a priority message. |
boolean |
getIsReadOnly()
Get whether a node is read only Note: This read-only flag only applies to data, not metadata |
IRogMetadata |
getMetadata()
Returns this node's metadata. |
IRogContainerNode |
getParent()
Get an ROG node's parent. |
IRogNode.PoolingListener |
getPoolingListener()
Retrieve a node's pooling listener. |
short |
getType()
Get the node's type. |
String |
metadataToJsonString()
Return a JSON string representation of a node's metadata |
com.google.protobuf.Message |
serializeToProtobuf()
Serialize a node's data to a proto message. |
void |
setAsInboundMessage(boolean val)
Set whether a node is an inbound message (dispatched to app) |
void |
setAsInternal(boolean val)
Set to indicate whether a node type is for internal platform use |
void |
setAsLastTransaction(boolean val)
Set to indicate whether a node is the last application transaction. |
void |
setAsMessage(boolean val)
Set whether a node was treated as a message (sent or received) |
void |
setAsOutboundMessage(boolean val)
Set whether a message node was an oubound message (sent by app) |
void |
setAsPriority()
Set whether a node is a priority message. |
void |
setAsReadOnly()
Set whether a node is read only Note: This read-only flag only applies to data, not metadata |
void |
setAsReplayedMessage(boolean val)
Set whether a message node was replayed from the backing persistent store |
void |
setAttachment(Object val)
Attach an opaque object to a node. |
void |
setInMsgsInTransaction(boolean val)
Set whether there are inbound messages in the transaction |
void |
setOutMsgsInTransaction(boolean val)
Set whether there are outbound messages in the transaction |
void |
setParentId(com.eaio.uuid.UUID uuid)
Set the object id of an ROG node's parent node. |
void |
setPoolingListener(IRogNode.PoolingListener val)
Set the pooling listener. |
IRogNode |
setTransactionInSequenceNumber(int val)
Set a message node's transaction inbound sequence number. |
IRogNode |
setTransactionOutSequenceNumber(int val)
Set a message node's transaction outbound sequence number. |
Methods inherited from interface com.neeve.ods.IStoreObject |
---|
acquire, deserialize, deserializeMetadata, deserializeMetadata, ensureId, getBinding, getCheckpointVersion, getContentEncodingType, getId, getOfid, getOwnershipCount, getSerializedMetadataLength, getStableTransactionId, getTransactionId, serialize, serializeMetadata, setBinding, setCheckpointVersion, setFieldValue, setId, setStableTransactionId, setTransactionId |
Methods inherited from interface com.neeve.sma.MapMessageView |
---|
getMessageReflector |
Methods inherited from interface com.neeve.util.UtlReferenceTracker.HasReferenceTracker |
---|
referenceTracker |
Methods inherited from interface com.neeve.rog.IRogValidatable |
---|
getValidationErrors, isValid |
Method Detail |
---|
short getType()
getType
in interface IStoreObject
getType
in interface MessageView
Each ROG node is associated with a type that uniquely identifies the node in its factory. This method returns the node's type.
IRogContainerNode getParent()
This method returns an ROG node's parent node.
void setParentId(com.eaio.uuid.UUID uuid)
This method sets the object id of an ROG node's parent object.
void setAttachment(Object val)
This method enables the user to attach an object opaque to an
ROG node. This object is maintained opaque to the node and can
be retreieved via getAttachment()
Object getAttachment()
This method enables the user to retrieve an object attached
to a node via setAttachment(java.lang.Object)
void setPoolingListener(IRogNode.PoolingListener val)
This method installs a pooling listener on an ROG node. The listener is used to notify the caller when the node enters or leaves a pool.
IRogNode.PoolingListener getPoolingListener()
This method enables the user to retrieve a node's pooling
listener set via setPoolingListener(com.neeve.rog.IRogNode.PoolingListener)
void setAsReadOnly()
Note: This read-only flag only applies to data, not metadata
boolean getIsReadOnly()
Note: This read-only flag only applies to data, not metadata
getIsReadOnly
in interface IStoreObject
void setAsPriority()
Marking a message as priority before sending it will cause it to be enqueued ahead of other messages within the transaction (but behind other previously sent message also marked as priority).
Note: In the context of AEP, special care should be taken when using adaptive commit batching. In this case multiple inbound message are batched into a single transaction meaning that messages sent as priority can jump ahead of those sent non priority during processing of a previous inbound message that is in the same batch.
boolean getIsPriority()
void setInMsgsInTransaction(boolean val)
val
- True to set, false to clearvoid setOutMsgsInTransaction(boolean val)
val
- True to set, false to clearIRogNode setTransactionInSequenceNumber(int val)
val
- The message sequence number
An application transaction can span multiple inbound and/or outbound messages. This field stores the inbound sequence number of a message relative to its transaction. If the message is an inbound message, then this field is the sequence number of the inbound messages within the transaction. If the message is an outbound message, then this field is the sequence number of the inbound message that triggered the outbound message. If no message triggered the outbound message, then this field would be 0.
IRogNode setTransactionOutSequenceNumber(int val)
val
- The message sequence number
An application transaction can span multiple inbound and/or outbound messages. This field stores the outbound sequence number of a message relative to its transaction. If the message is an inbound message, then this field is always 0. If the message is an outbound message, then this field is the sequence number of the outbound message within the set of outbound messages in the transaction.
void setAsMessage(boolean val)
val
- True to set, false to clearvoid setAsInboundMessage(boolean val)
val
- True to set, false to clearvoid setAsOutboundMessage(boolean val)
val
- True to set, false to clearvoid setAsReplayedMessage(boolean val)
val
- True to set, false to clearvoid setAsLastTransaction(boolean val)
val
- True to set, false to clearvoid setAsInternal(boolean val)
val
- True to set, false to clearcom.google.protobuf.Message serializeToProtobuf()
IRogNode deserializeFromProtobuf(com.google.protobuf.Message message)
message
- The protobuf messageint dispose()
This method should be invoked by the user when done with a node. This allows the node implementation to track the lifetime of a node to allow it to implement faclities (such as object pooling) to improve performance. It is guaranteed however that not invoking this method will still cause the system to run correctly and in a stable fashion. However, in such a case, the performance may not be optimal.
Once disposed, all references to the disposed node should be discarded.
dispose
in interface IStoreObject
dispose
in interface MessageView
void dump(StringBuilder sb, String leader, String leaderConcat)
sb
- The string builder object in which to append the dump string.leader
- The leader string to prepend before each line of output.leaderConcat
- The string to concat to the leader string before
invoking this method on its children.
This method returns a string representation of the full state of an ROG node (including its children).
String metadataToJsonString()
metadataToJsonString
in interface IRogMetadata
IRogMetadata getMetadata()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |