com.neeve.rog
Interface IRogNode

All Superinterfaces:
IRogMetadata, IRogValidatable, IStoreObject, MapMessageView, MessageView, UtlReferenceTracker.HasReferenceTracker
All Known Subinterfaces:
IRogCollectionNode<T>, IRogCollectionNodeElement, IRogContainerNode, IRogCopyableNode<T>, IRogDoubleMap<T>, IRogDoubleMapElement, IRogIntMap<T>, IRogIntMapElement, IRogList<T>, IRogListElement, IRogLongMap<T>, IRogLongMapElement, IRogMessage, IRogPojoShadowNode<T>, IRogQueue<T>, IRogQueueElement, IRogRawMessage, IRogSet<T>, IRogStringMap<T>, IRogStringMapElement, ISrvMonAppBusBindingCreatedMessage, ISrvMonAppBusBindingCreateFailedMessage, ISrvMonAppBusBindingCreateMessage, ISrvMonAppBusBindingDestroyedMessage, ISrvMonAppBusBindingDestroyMessage, ISrvMonAppBusBindingDownMessage, ISrvMonAppBusBindingOpenedMessage, ISrvMonAppBusBindingOpenFailedMessage, ISrvMonAppBusBindingOpeningMessage, ISrvMonAppBusBindingStateChangeMessage, ISrvMonAppBusBindingUpMessage, ISrvMonAppBusChannelClosedMessage, ISrvMonAppBusChannelOpenedMessage, ISrvMonAppChannelDownMessage, ISrvMonAppChannelUpMessage, ISrvMonAppClientConnectMessage, ISrvMonAppClientDisconnectMessage, ISrvMonAppDuplicateAcknowledgementAlertMessage, ISrvMonAppEngineActiveMessage, ISrvMonAppEngineCreatedMessage, ISrvMonAppEngineStartedMessage, ISrvMonAppEngineStoppedMessage, ISrvMonAppEngineStoppingMessage, ISrvMonAppExceptionMessage, ISrvMonAppFlowCreateMessage, ISrvMonAppInboundLogExceptionMessage, ISrvMonAppLoadedMessage, ISrvMonAppMessagingFailedMessage, ISrvMonAppMessagingPrestartMessage, ISrvMonAppMessagingStartedMessage, ISrvMonAppMessagingStartFailedMessage, ISrvMonAppOutboundLogExceptionMessage, ISrvMonAppOutOfOrderSendCommitCompletionAlertMessage, ISrvMonAppSendExceptionMessage, ISrvMonAppStateChangeMessage, ISrvMonAppStatsAlertMessage, ISrvMonAppStoreBindingFailedMessage, ISrvMonAppStoreBindingRoleChangedMessage, ISrvMonAppStoreMemberDownMessage, ISrvMonAppStoreMemberInitCompleteMessage, ISrvMonAppStoreMemberUpMessage, ISrvMonAppStoreTransactionLogRepairedMessage, ISrvMonAppStuckAlertMessage, ISrvMonAppUnhandledMessageMessage, ISrvMonAppUnloadedMessage, ISrvMonHeartbeatMessage, ISrvMonInvokeCommandRequest, ISrvMonInvokeCommandResponse, ISrvMonListCommandsRequest, ISrvMonListCommandsResponse, ISrvMonMessageBusBindingReconnectedMessage, ISrvMonMessageBusBindingReconnectingMessage, ISrvMonMessageTraceLoggingExceptionMessage, ISrvMonServerInfoRequest, ISrvMonServerInfoResponse, ISrvMonStartTraceWatchRequest, ISrvMonStartTraceWatchResponse, ISrvMonStopTraceWatchRequest, ISrvMonStopTraceWatchResponse, ISrvMonTraceRecord, ISrvMonUnhandledMessageMessage
All Known Implementing Classes:
AepEnvironmentData, com.neeve.rog.impl.RogNode, SrvMonAppBusBindingCreatedMessage, SrvMonAppBusBindingCreateFailedMessage, SrvMonAppBusBindingCreateMessage, SrvMonAppBusBindingDestroyedMessage, SrvMonAppBusBindingDestroyMessage, SrvMonAppBusBindingDownMessage, SrvMonAppBusBindingOpenedMessage, SrvMonAppBusBindingOpenFailedMessage, SrvMonAppBusBindingOpeningMessage, SrvMonAppBusBindingStateChangeMessage, SrvMonAppBusBindingUpMessage, SrvMonAppBusChannelClosedMessage, SrvMonAppBusChannelOpenedMessage, SrvMonAppChannelDownMessage, SrvMonAppChannelUpMessage, SrvMonAppClientConnectMessage, SrvMonAppClientDisconnectMessage, SrvMonAppDuplicateAcknowledgementAlertMessage, SrvMonAppEngineActiveMessage, SrvMonAppEngineCreatedMessage, SrvMonAppEngineStartedMessage, SrvMonAppEngineStoppedMessage, SrvMonAppEngineStoppingMessage, SrvMonAppExceptionMessage, SrvMonAppFlowCreateMessage, SrvMonAppInboundLogExceptionMessage, SrvMonAppLoadedMessage, SrvMonAppMessagingFailedMessage, SrvMonAppMessagingPrestartMessage, SrvMonAppMessagingStartedMessage, SrvMonAppMessagingStartFailedMessage, SrvMonAppOutboundLogExceptionMessage, SrvMonAppOutOfOrderSendCommitCompletionAlertMessage, SrvMonAppSendExceptionMessage, SrvMonAppStateChangeMessage, SrvMonAppStatsAlertMessage, SrvMonAppStoreBindingFailedMessage, SrvMonAppStoreBindingRoleChangedMessage, SrvMonAppStoreMemberDownMessage, SrvMonAppStoreMemberInitCompleteMessage, SrvMonAppStoreMemberUpMessage, SrvMonAppStoreTransactionLogRepairedMessage, SrvMonAppStuckAlertMessage, SrvMonAppUnhandledMessageMessage, SrvMonAppUnloadedMessage, SrvMonHeartbeatMessage, SrvMonInvokeCommandRequest, SrvMonInvokeCommandResponse, SrvMonListCommandsRequest, SrvMonListCommandsResponse, SrvMonMessageBusBindingReconnectedMessage, SrvMonMessageBusBindingReconnectingMessage, SrvMonMessageTraceLoggingExceptionMessage, SrvMonServerInfoRequest, SrvMonServerInfoResponse, SrvMonStartTraceWatchRequest, SrvMonStartTraceWatchResponse, SrvMonStopTraceWatchRequest, SrvMonStopTraceWatchResponse, SrvMonTraceRecord, SrvMonUnhandledMessageMessage

public interface IRogNode
extends IStoreObject, MapMessageView, IRogMetadata, IRogValidatable

Represents an ROG node.

Threading:
ROG nodes are not safe for concurrent access by multiple threads.

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.sma.MessageView
acquire, deserializeFromByteArray, deserializeFromByteBuffer, deserializeFromJson, deserializeFromPacket, getAppSendBeginTs, getAppSendDoneTs, getCreateTs, getEnqueueTs, getEnqueueTsMicros, getMessage, getMessageBus, getMessageBusAsRaw, getMessageChannel, getMessageChannelAsRaw, getMessageEncodingType, getMessageFlow, getMessageKey, getMessageKeyAsRaw, getMessageSender, getMessageSequenceNumber, getOriginTs, getOutTs, getOutTsMicros, getOwnershipCount, getPostDeserializeTs, getPostProcessingTs, getPostProcessingTsMicros, getPostSerializeTs, getPostWireSendTs, getPostWireTs, getPreDeserializeTs, getPreProcessingTs, getPreProcessingTsMicros, getPreSerializeTs, getPreWireTs, getReceiveTs, getSendStartTs, getSendTs, getTag, getVfid, isPossibleDuplicate, serializeToByteArray, serializeToByteBuffer, serializeToIOBuffer, serializeToJson, serializeToPacket, setAppSendBeginTs, setAppSendDoneTs, setCreateTs, setEnqueueTsMicros, setMessageBus, setMessageBusAsRaw, setMessageChannel, setMessageChannelAsRaw, setMessageFlow, setMessageKey, setMessageKeyAsRaw, setMessageSender, setMessageSequenceNumber, setOriginTs, setOutTs, setOutTsMicros, setPossibleDuplicate, setPostDeserializeTs, setPostProcessingTs, setPostProcessingTsMicros, setPostSerializeTs, setPostWireSendTs, setPostWireTs, setPreDeserializeTs, setPreProcessingTs, setPreProcessingTsMicros, setPreSerializeTs, setPreWireTs, setReceiveTs, setSendStartTs, setSendTs, setTag, sync
 
Methods inherited from interface com.neeve.util.UtlReferenceTracker.HasReferenceTracker
referenceTracker
 
Methods inherited from interface com.neeve.rog.IRogMetadata
getEnqueueTs, getEnqueueTsMicros, getGraphId, getInMsgsInTransaction, getIsInboundMessage, getIsInternal, getIsLastTransaction, getIsMessage, getIsOutboundMessage, getIsReplayedMessage, getMessageBus, getMessageChannel, getMessageFlow, getMessageKey, getMessageSender, getMessageSequenceNumber, getOutMsgsInTransaction, getOutTs, getOutTsMicros, getParentId, getPreProcessingTs, getPreProcessingTsMicros, getTransactionInSequenceNumber, getTransactionOutSequenceNumber, isPossibleDuplicate, metadataToJsonString, metadataToString
 
Methods inherited from interface com.neeve.rog.IRogValidatable
getValidationErrors, isValid
 

Method Detail

getType

short getType()
Get the node's type.

Specified by:
getType in interface IStoreObject
Specified by:
getType in interface MessageView
Returns:
Returns the node's type.

Each ROG node is associated with a type that uniquely identifies the node in its factory. This method returns the node's type.


getParent

IRogContainerNode getParent()
Get an ROG node's parent.

This method returns an ROG node's parent node.


setParentId

void setParentId(com.eaio.uuid.UUID uuid)
Set the object id of an ROG node's parent node.

This method sets the object id of an ROG node's parent object.


setAttachment

void setAttachment(Object val)
Attach an opaque object to a node.

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()


getAttachment

Object getAttachment()
Retrieve an object attached to a node.

This method enables the user to retrieve an object attached to a node via setAttachment(java.lang.Object)


setPoolingListener

void setPoolingListener(IRogNode.PoolingListener val)
Set the pooling listener.

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.


getPoolingListener

IRogNode.PoolingListener getPoolingListener()
Retrieve a node's pooling listener.

This method enables the user to retrieve a node's pooling listener set via setPoolingListener(com.neeve.rog.IRogNode.PoolingListener)


setAsReadOnly

void setAsReadOnly()
Set whether a node is read only

Note: This read-only flag only applies to data, not metadata


getIsReadOnly

boolean getIsReadOnly()
Get whether a node is read only

Note: This read-only flag only applies to data, not metadata

Specified by:
getIsReadOnly in interface IStoreObject

setAsPriority

void setAsPriority()
Set whether a node is a priority message.

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.


getIsPriority

boolean getIsPriority()
Get whether a node is a priority message.


setInMsgsInTransaction

void setInMsgsInTransaction(boolean val)
Set whether there are inbound messages in the transaction

Parameters:
val - True to set, false to clear

setOutMsgsInTransaction

void setOutMsgsInTransaction(boolean val)
Set whether there are outbound messages in the transaction

Parameters:
val - True to set, false to clear

setTransactionInSequenceNumber

IRogNode setTransactionInSequenceNumber(int val)
Set a message node's transaction inbound sequence number.

Parameters:
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.


setTransactionOutSequenceNumber

IRogNode setTransactionOutSequenceNumber(int val)
Set a message node's transaction outbound sequence number.

Parameters:
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.


setAsMessage

void setAsMessage(boolean val)
Set whether a node was treated as a message (sent or received)

Parameters:
val - True to set, false to clear

setAsInboundMessage

void setAsInboundMessage(boolean val)
Set whether a node is an inbound message (dispatched to app)

Parameters:
val - True to set, false to clear

setAsOutboundMessage

void setAsOutboundMessage(boolean val)
Set whether a message node was an oubound message (sent by app)

Parameters:
val - True to set, false to clear

setAsReplayedMessage

void setAsReplayedMessage(boolean val)
Set whether a message node was replayed from the backing persistent store

Parameters:
val - True to set, false to clear

setAsLastTransaction

void setAsLastTransaction(boolean val)
Set to indicate whether a node is the last application transaction.

Parameters:
val - True to set, false to clear

setAsInternal

void setAsInternal(boolean val)
Set to indicate whether a node type is for internal platform use

Parameters:
val - True to set, false to clear

serializeToProtobuf

com.google.protobuf.Message serializeToProtobuf()
Serialize a node's data to a proto message.

Threading:
This method will never be concurrently invoked by multiple threads.

deserializeFromProtobuf

IRogNode deserializeFromProtobuf(com.google.protobuf.Message message)
Deserialize a node's data from a protobuf message.

Parameters:
message - The protobuf message
Threading:
This method will never be concurrently invoked by multiple threads.

dispose

int dispose()
Dispose an ROG node.

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.

Specified by:
dispose in interface IStoreObject
Specified by:
dispose in interface MessageView
Returns:
The reference count after the dispose completed.

dump

void dump(StringBuilder sb,
          String leader,
          String leaderConcat)
Return a full dump in string form of an ROG node.

Parameters:
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).


metadataToJsonString

String metadataToJsonString()
Return a JSON string representation of a node's metadata

Specified by:
metadataToJsonString in interface IRogMetadata
Returns:
Json formatted string for metadata

getMetadata

IRogMetadata getMetadata()
Returns this node's metadata.

Returns:
this node's metadata.
Threading:
The returned metadata is not threadsafe and it should be treated as part of this node operations on the metadata can not be made concurrently with operations on this IRogNode


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.