public interface IRogNode extends IStoreObject, MapMessageView, IRogMetadata, IRogValidatable
Modifier and Type | Interface and Description |
---|---|
static interface |
IRogNode.PoolingListener
Used to listen on when an ROG node goes in and out of pools
|
IStoreObject.EncodingType
ENCODING_TYPE_CUSTOM, ENCODING_TYPE_JSON, ENCODING_TYPE_PROTOBUF, ENCODING_TYPE_QUARK, ENCODING_TYPE_XBUF, ENCODING_TYPE_XBUF2, NEXT_FREE_ENCODING_TYPE
Modifier and Type | Method and Description |
---|---|
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 |
getIsLiveInboundMessage()
Gest whether the object represents a live inbound message.
|
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.
|
acquire, deserialize, deserializeMetadata, deserializeMetadata, getContentEncodingType, getOwnershipCount, getSerializedMetadataLength, getStoreMetadata, serialize, serializeMetadata, setFieldValue
ensureId, getBinding, getCheckpointVersion, getCommittedDataSize, getId, getOfid, getStableTransactionId, getTransactionId, setBinding, setCheckpointVersion, setCommittedDataSize, setId, setStableTransactionId, setTransactionId
getMessageReflector
acquire, deserializeFromByteArray, deserializeFromByteBuffer, deserializeFromJson, deserializeFromPacket, getAppSendBeginTs, getAppSendDoneTs, getCreateTs, getEnqueueTs, getEnqueueTsMicros, getMessage, getMessageBus, getMessageBusAsRaw, getMessageChannel, getMessageChannelAsRaw, getMessageEncodingType, getMessageFlow, getMessageKey, getMessageKeyAsRaw, getMessageSender, getMessageSequenceNumber, getMessageTransportHeaders, getOriginTs, getOutTs, getOutTsMicros, getOwnershipCount, getPostDeserializeTs, getPostProcessingTs, getPostProcessingTsMicros, getPostSerializeTs, getPostWireSendTs, getPostWireTs, getPreDeserializeTs, getPreProcessingTs, getPreProcessingTsMicros, getPreSerializeTs, getPreWireTs, getReceiveTs, getSendStartTs, getSendTs, getTag, getVfid, isPossibleDuplicate, resolveMessageKeyWith, resolveMessageKeyWith, serializeToByteArray, serializeToByteBuffer, serializeToIOBuffer, serializeToJson, serializeToPacket, setAppSendBeginTs, setAppSendDoneTs, setCreateTs, setEnqueueTsMicros, setMessageBus, setMessageBusAsRaw, setMessageChannel, setMessageChannelAsRaw, setMessageFlow, setMessageKey, setMessageKeyAsRaw, setMessageSender, setMessageSequenceNumber, setMessageTransportHeaders, setOriginTs, setOutTs, setOutTsMicros, setPossibleDuplicate, setPostDeserializeTs, setPostProcessingTs, setPostProcessingTsMicros, setPostSerializeTs, setPostWireSendTs, setPostWireTs, setPreDeserializeTs, setPreProcessingTs, setPreProcessingTsMicros, setPreSerializeTs, setPreWireTs, setReceiveTs, setSendStartTs, setSendTs, setTag, sync
referenceTracker
getEnqueueTs, getEnqueueTsMicros, getGraphId, getInMsgsInTransaction, getIsInboundMessage, getIsInternal, getIsLastTransaction, getIsMessage, getIsOutboundMessage, getIsReplayedMessage, getMessageBus, getMessageChannel, getMessageFlow, getMessageKey, getMessageSender, getMessageSequenceNumber, getMessageTransportHeaders, getOutMsgsInTransaction, getOutTs, getOutTsMicros, getParentId, getPreProcessingTs, getPreProcessingTsMicros, getTransactionInSequenceNumber, getTransactionOutSequenceNumber, isPossibleDuplicate, metadataToJsonString, metadataToString
getValidationErrors, isValid
short getType()
getType
in interface IStoreObjectMetadata
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
boolean getIsLiveInboundMessage()
A live inbound message is a message that has been dispatched by a connected message bus. An inbound message is not considered to be a live inbound message if it is:
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()
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.