public final class PacketMessage extends MessageViewImpl implements UtlPool.Item<PacketMessage>, CopyableMessageView<PacketMessage>
count, head, next, prevENCODING_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 |
|---|---|
MessageTransportHeaders |
activateMessageTransportHeaders()
Activate transport headers in a message
This method activates a set of transport headers for use by the caller.
|
PacketMessage |
copy()
Creates a shallow copy of the object.
|
static PacketMessage |
create()
Creates a packet message view.
|
PacketMessage |
deserializeFrom(IOBuffer buffer,
int offset,
int len)
Default implementation of
MessageView.deserializeFrom(IOBuffer, int, int) |
PacketMessage |
deserializeFrom(long addr,
int offset,
int len)
Default implementation of
MessageView.deserializeFrom(long, int, int) |
PacketMessage |
deserializeFromByteArray(byte[] array)
Deserialize a view's backing message from a byte array.
|
PacketMessage |
deserializeFromByteBuffer(ByteBuffer buffer)
Deserialize a view's backing message from a byte buffer.
|
PacketMessage |
deserializeFromJson(String json)
Deserialize a view's backing message from a json string
|
PacketMessage |
deserializeFromPacket(PktPacket packet)
Deserialize a view's backing message from a packet.
|
int |
dispose()
Default implementation of
MessageView.dispose()
This is the default implementation of the dispose method. |
long |
getAppSendBeginTs()
Get's the time at which the application considers send for a message to start.
|
long |
getAppSendDoneTs()
Get's the time at which the application considers send for a message to be complete.
|
long |
getCreateTs()
Get a message's create timestamp.
|
long |
getEnqueueTs()
Get a message's enqueue timestamp in milliseconds
|
long |
getEnqueueTsMicros()
Get a message's enqueue timestamp
This timestamp, in microseconds, specifies the time just
before a message was enqueued on an application's input queue.
|
String |
getMessageBus()
Get the message bus name.
|
XString |
getMessageBusAsRaw()
Get the message bus in
XString form. |
String |
getMessageChannel()
Get the message channel name.
|
XString |
getMessageChannelAsRaw()
Get the message channel in
XString form. |
int |
getMessageFlow()
Get the message flow.
|
String |
getMessageKey()
Get the message key.
|
XString |
getMessageKeyAsRaw()
Get the message key.
|
int |
getMessageSender()
Get the message sender.
|
long |
getMessageSequenceNumber()
Get the message sequence number.
|
MessageTransportHeaders |
getMessageTransportHeaders()
Get a message's transport headers.
|
long |
getOriginTs()
Get a message's origin timestamp.
|
long |
getOutTs()
Get a message's out timestamp.
|
long |
getOutTsMicros()
Get a message's out timestamp in microseconds since the epoch.
|
UtlPool<PacketMessage> |
getPool()
Get a pool item's pool.
|
long |
getPostDeserializeTs()
Get a message's post-deserialize timestamp.
|
long |
getPostProcessingTs()
Deprecated.
|
long |
getPostProcessingTsMicros()
Get a message's post-processing timestamp.
|
long |
getPostSerializeTs()
Get a message's post-serialize timestamp.
|
long |
getPostWireSendTs()
Get a message's post-wire timestamp.
|
long |
getPostWireTs()
Get a message's post-wire timestamp.
|
long |
getPreDeserializeTs()
Get a message's pre-deserialize timestamp.
|
long |
getPreProcessingTs()
Get a message's pre-processing timestamp.
|
long |
getPreProcessingTsMicros()
Get a message's pre-processing timestamp in microseconds.
|
long |
getPreSerializeTs()
Get a message's pre-serialize timestamp.
|
long |
getPreWireTs()
Get a message's pre-wire timestamp.
|
long |
getReceiveTs()
Get a message's receive timestamp.
|
long |
getRequestId()
Get the request id
This method returns the requestor id scoped request id.
|
String |
getRequestorId()
Get the requestor id.
|
XString |
getRequestorIdAsRaw()
Get the requestor id in
XString form. |
long |
getSendStartTs()
Get a message's send timestamp.
|
long |
getSendTs()
Get a message's send timestamp.
|
PacketMessage |
init()
Initialize an item.
|
boolean |
isPossibleDuplicate()
Get whether a message is a possible duplicate..
|
void |
resolveMessageKeyWith(MessageChannelKeyResolver channelKeyResolver,
MessageChannel.RawKeyResolutionTable rawKeyResolutionTable)
Set the message key for this message using the provided keyResolver and keyResolutionTable.
|
void |
resolveMessageKeyWith(MessageChannelKeyResolver channelKeyResolver,
Properties keyResolutionTable)
Set the message key for this message using the provided keyResolver and keyResolutionTable.
|
byte[] |
serializeToByteArray()
Serialize a view's backing message to a byte array.
|
ByteBuffer |
serializeToByteBuffer()
Serialize a view's backing message to a byte buffer.
|
IOBuffer |
serializeToIOBuffer(boolean useNative)
Default implementation of
MessageView.serializeToIOBuffer(boolean) |
String |
serializeToJson()
Serialize a view's backing message to JSON.
|
PktPacket |
serializeToPacket()
Serialize a view's backing message to a packet.
|
MessageView |
setAppSendBeginTs(long ts)
Time at which the application considers send for a message to start.
|
MessageView |
setAppSendDoneTs(long ts)
Set's the time at which the application considers send for a message to be complete.
|
MessageView |
setCreateTs(long ts)
Set a message's create timestamp.
|
MessageView |
setEnqueueTsMicros(long ts)
Sets a message's enqueue timestamp
This timestamp, in microseconds, specifies the time just
before a message was enqueued on an application's input queue.
|
MessageView |
setMessageBus(String name)
Set the message bus name.
|
MessageView |
setMessageBusAsRaw(XString bus)
Set the message bus.
|
MessageView |
setMessageChannel(String name)
Set the message channel name.
|
MessageView |
setMessageChannelAsRaw(XString channel)
Set the message channel.
|
MessageView |
setMessageFlow(int flow)
Set the message flow.
|
MessageView |
setMessageKey(String key)
Set the message key.
|
MessageView |
setMessageKeyAsRaw(XString key)
Set the message key.
|
MessageView |
setMessageSender(int sender)
Set the message sender.
|
MessageView |
setMessageSequenceNumber(long sno)
Set the message sequence number.
|
MessageView |
setMessageTransportHeaders(MessageTransportHeaders val)
Sets a set of transport headers into a message.
|
MessageView |
setOriginTs(long ts)
Set a message's origin timestamp.
|
MessageView |
setOutTs(long ts)
Deprecated.
|
MessageView |
setOutTsMicros(long ts)
Set a message's out timestamp in microseconds since the epoch.
|
PacketMessage |
setPool(UtlPool<PacketMessage> pool)
Set a pool item's pool.
|
MessageView |
setPossibleDuplicate()
Set a message as a possible duplicate.
|
MessageView |
setPostDeserializeTs(long ts)
Set a message's post-deserialize timestamp.
|
MessageView |
setPostProcessingTs(long ts)
Deprecated.
|
MessageView |
setPostProcessingTsMicros(long ts)
Set a message's post-processing timestamp.
|
MessageView |
setPostSerializeTs(long ts)
Set a message's post-serialize timestamp.
|
PacketMessage |
setPostWireSendTs(long ts)
Set a message's post-wire send timestamp.
|
MessageView |
setPostWireTs(long ts)
Set a message's post-wire timestamp.
|
MessageView |
setPreDeserializeTs(long ts)
Set a message's pre-deserialize timestamp.
|
MessageView |
setPreProcessingTs(long ts)
Deprecated.
|
MessageView |
setPreProcessingTsMicros(long ts)
Set a message's pre-processing timestamp in microseconds.
|
MessageView |
setPreSerializeTs(long ts)
Set a message's pre-serialize timestamp.
|
MessageView |
setPreWireTs(long ts)
Set a message's pre-wire timestamp.
|
MessageView |
setReceiveTs(long ts)
Set a message's receive timestamp.
|
MessageView |
setRequestId(long val)
Set the request id.
|
MessageView |
setRequestorId(String val)
Set the requestor id.
|
MessageView |
setRequestorIdAsRaw(XString val)
Set the requestor id using an XString.
|
MessageView |
setSendStartTs(long ts)
Set a message's send timestamp.
|
MessageView |
setSendTs(long ts)
Set a message's send timestamp.
|
void |
sync()
Ensure a view's backing message is prepared and ready for transport
|
acquire, deserializeFrom, deserializeFrom, deserializeFrom, deserializeFrom, getMessage, getMessageEncodingType, getMessageType, getOwnershipCount, getTag, getVfid, referenceTracker, saveMemory, serializeTo, serializeTo, serializeTo, serializeTo, serializeTo, serializeTo, setTag, toStringcount, insertAfter, insertBefore, isLinked, next, previous, unlink, wipeequals, getClass, hashCode, notify, notifyAll, wait, wait, waitacquire, deserializeFrom, deserializeFrom, deserializeFrom, deserializeFrom, getMessage, getMessageEncodingType, getMessageType, getOwnershipCount, getTag, getVfid, saveMemory, serializeTo, serializeTo, serializeTo, serializeTo, serializeTo, serializeTo, setTagreferenceTrackerpublic static final PacketMessage create()
public final MessageView setMessageBus(String name)
MessageViewsetMessageBus in interface MessageViewname - The message bus name to set.public final String getMessageBus()
MessageViewThis method returns the bus associated with a message.
getMessageBus in interface MessageViewpublic final MessageView setMessageBusAsRaw(XString bus)
MessageViewsetMessageBusAsRaw in interface MessageViewbus - The message bus to set.public final XString getMessageBusAsRaw()
MessageViewXString form.
For a received message, the bus name is set on the message using via the message bus bus binding that received it. For performance reasons a message bus implementation may not set the channel name on a received message unless it is configured to do so.
For a sent message the bus name would typically be set by the sending application when the message is sent.
Note that it is not safe to hold onto a reference to the returned XString as it is pooled with the underling message.
getMessageBusAsRaw in interface MessageViewMessageBusBinding#PROP_SET_BUS_AND_CHANNEL_ON_RECEIPT,
MessageView.getMessageBus()public final MessageView setMessageChannel(String name)
MessageViewsetMessageChannel in interface MessageViewname - The message channel name to set.public final String getMessageChannel()
MessageViewThis method returns the channel associated with a message.
For a received message, the channel name is set on the message using the channel that was resolved by the message bus binding that received it. For performance reasons a message bus implementation may not set the channel name on a received message unless it is configured to do so.
For a sent message the channel name would typically be set by the sending application when the message is sent.
getMessageChannel in interface MessageViewMessageBusBinding#PROP_SET_BUS_AND_CHANNEL_ON_RECEIPT,
MessageView.getMessageChannelAsRaw()public final MessageView setMessageChannelAsRaw(XString channel)
MessageViewsetMessageChannelAsRaw in interface MessageViewchannel - The message channel to set.public final XString getMessageChannelAsRaw()
MessageViewXString form.
This method returns the channel associated with a message.
Note that it is not safe to hold onto a reference to the returned XString as it is pooled with the underling message.
getMessageChannelAsRaw in interface MessageViewMessageView.getMessageChannel()public final MessageView setMessageKey(String key)
MessageViewsetMessageKey in interface MessageViewkey - The message key to set.public final String getMessageKey()
MessageViewThis method returns the key associated with a message.
getMessageKey in interface MessageViewMessageBusBinding#PROP_SET_KEY_ON_RECEIPTpublic final MessageView setMessageKeyAsRaw(XString key)
MessageViewsetMessageKeyAsRaw in interface MessageViewkey - The message key to set.public final XString getMessageKeyAsRaw()
MessageViewThis method returns the key associated with a message.
Note that it is not safe to hold onto a reference to the returned XString as it is pooled with the underling message.
getMessageKeyAsRaw in interface MessageViewMessageView.getMessageKey()public final void resolveMessageKeyWith(MessageChannelKeyResolver channelKeyResolver, MessageChannel.RawKeyResolutionTable rawKeyResolutionTable) throws SmaException
MessageViewThis method can be more efficient than first resolving the key using the key resolver and setting it on the message, because the message view implementation can potentially resolve the key directly into the backing buffer rather than having to copy it from a key resolved first through the key resolver.
resolveMessageKeyWith in interface MessageViewchannelKeyResolver - The message key resolver used to build the key.rawKeyResolutionTable - The key resolution table.SmaException - If there is an error in key resolution.MessageChannelKeyResolver#resolveMessageKey(XString, MessageView, RawKeyResolutionTable)public final void resolveMessageKeyWith(MessageChannelKeyResolver channelKeyResolver, Properties keyResolutionTable) throws SmaException
MessageViewThis method can be more efficient than first resolving the key using the key resolver and setting it on the message, because the message view implementation can potentially resolve the key directly into the backing buffer rather than having to copy it from a key resolved first through the key resolver.
This method is not necessarily zero garbage. For zero garbage key resolution use
#resolveMessageKeyWith(MessageChannelKeyResolver, RawKeyResolutionTable)
resolveMessageKeyWith in interface MessageViewchannelKeyResolver - The message key resolver used to build the key.keyResolutionTable - The key resolution table.SmaException - If there is an error in key resolution.MessageChannelKeyResolver.resolveMessageKey(MessageView, Properties)public final MessageView setMessageSender(int sender)
MessageViewsetMessageSender in interface MessageViewsender - The message sender to setpublic final int getMessageSender()
MessageView
This method returns the system-wide unique sender id. Sequence numbers
returned by MessageView.getMessageSequenceNumber() are scoped by sender.
getMessageSender in interface MessageViewpublic final MessageView setMessageFlow(int flow)
MessageViewsetMessageFlow in interface MessageViewflow - The message flow to set.public final int getMessageFlow()
MessageViewThis method returns the system-wide unique flow id. Flows define the order in which messages need to be processed.
getMessageFlow in interface MessageViewpublic final MessageView setMessageSequenceNumber(long sno)
MessageViewsetMessageSequenceNumber in interface MessageViewsno - The sequence number to set.public final long getMessageSequenceNumber()
MessageViewThis method returns the sender scoped message sequence number.
getMessageSequenceNumber in interface MessageViewpublic final MessageView setRequestorId(String val)
MessageViewThe requestor id is the system wide unique identifier of the sender of a request message. Requestor ids are used for request reply messaging exchanges
setRequestorId in interface MessageViewpublic final String getRequestorId()
MessageViewThis method returns unique id of the sender of a request message.
getRequestorId in interface MessageViewMessageView.getRequestorIdAsRaw()public final MessageView setRequestorIdAsRaw(XString val)
MessageViewThe requestor id is the system wide unique identifier of the sender of a request message. Requestor ids are used for request reply messaging exchanges
setRequestorIdAsRaw in interface MessageViewpublic final XString getRequestorIdAsRaw()
MessageViewXString form.
This method returns the requestor id of a message.
Note that it is not safe to hold onto a reference to the returned XString as it is pooled with the underling message.
getRequestorIdAsRaw in interface MessageViewMessageView.getRequestorId()public final MessageView setRequestId(long val)
MessageViewA request id is a unique id to track a request-reply messaging exchange. A request id is scoped by requestor id.
setRequestId in interface MessageViewval - The request id to set.public final long getRequestId()
MessageViewThis method returns the requestor id scoped request id.
getRequestId in interface MessageViewpublic final MessageView setPossibleDuplicate()
MessageViewsetPossibleDuplicate in interface MessageViewpublic final boolean isPossibleDuplicate()
MessageViewisPossibleDuplicate in interface MessageViewpublic final MessageTransportHeaders activateMessageTransportHeaders()
MessageView
This method activates a set of transport headers for use by the caller.
A subsequent call to MessageView.getMessageTransportHeaders() will return
the same set of headers returned by this method i.e. the activated
headers. This method is a no-op in case the headers have already been
activated or the user set a set of headers on the message. In either
of these cases, this method will return the previously activated headers
or the set of headers set by the caller.
activateMessageTransportHeaders in interface MessageViewpublic final MessageTransportHeaders getMessageTransportHeaders()
MessageViewMessage transport headers store generic name/value pairs that are specific to a concrete messaging provider. Each message bus binding will typically support a different set of transport headers. This field returns the message headers for a message. These could be message headers set by the user on an outbound message or populated on a message by a messaging binding for inbound messages.
getMessageTransportHeaders in interface MessageViewpublic final MessageView setMessageTransportHeaders(MessageTransportHeaders val)
MessageViewThe act of setting a set of transport headers on a message transfers ownership of the headers to the message i.e. the caller should not discard (note: not dispose()) the headers reference after setting them on the message.
This method replaces headers that have been previously activated or set by the user. This method is a no-op if the supplied headers is the same as what was previously activated or set by the user.
setMessageTransportHeaders in interface MessageViewval - The headers to set on the message. A value of null
will clear the transport headers in the message.public final MessageView setOriginTs(long ts)
MessageViewsetOriginTs in interface MessageViewts - The timestamp to set.public final long getOriginTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the first message in this message's flow originated.
getOriginTs in interface MessageViewpublic final MessageView setCreateTs(long ts)
MessageViewsetCreateTs in interface MessageViewts - The timestamp to set.public final long getCreateTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the message was created or, if the message is pooled, the time at which the message was resuscitated from its pool.
getCreateTs in interface MessageViewpublic final MessageView setAppSendBeginTs(long ts)
MessageViewsetAppSendBeginTs in interface MessageViewts - The application's send start timestamp.public final long getAppSendBeginTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the send started from from the application's view point. This timestamp is the same as outTs unless an application explicitly sets it to an earlier value.
getAppSendBeginTs in interface MessageViewpublic final MessageView setAppSendDoneTs(long ts)
MessageViewsetAppSendDoneTs in interface MessageViewpublic final long getAppSendDoneTs()
MessageView
This timestamp, in microseconds, specifies the time at which
the send completes from an application's perspective. If the message is sent
in the background this value can be lower even the MessageView.getSendStartTs()
getAppSendDoneTs in interface MessageViewpublic final MessageView setSendTs(long ts)
MessageViewsetSendTs in interface MessageViewts - The timestamp to set.public final long getSendTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the message was offered to the bus for begin the send.
getSendTs in interface MessageViewpublic final MessageView setSendStartTs(long ts)
MessageViewsetSendStartTs in interface MessageViewts - The timestamp to set.public final long getSendStartTs()
MessageViewThis timestamp, in microseconds, specifies the time at which the message was offered to the bus for send.
getSendStartTs in interface MessageView@Deprecated public final MessageView setOutTs(long ts)
MessageViewsetOutTs in interface MessageViewts - The timestamp to set.public final long getOutTs()
MessageView
This timestamp is the same as MessageView.getOutTsMicros() / 1000.
getOutTs in interface MessageViewMessageView.getOutTsMicros()public final MessageView setOutTsMicros(long ts)
MessageViewsetOutTsMicros in interface MessageViewts - The timestamp to set.public final long getOutTsMicros()
MessageViewThis timestamp is the same timestamp as which an application called send to initiate the send for the message.
Note that this timestamp is not the timestamp at which a message is actually written to the wire for delivery. A sent message is queued for delivery until the transaction that is is part of is committed.
getOutTsMicros in interface MessageViewpublic final MessageView setPreSerializeTs(long ts)
MessageViewsetPreSerializeTs in interface MessageViewts - The timestamp to set.public final long getPreSerializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was serialized for transport.
getPreSerializeTs in interface MessageViewpublic final MessageView setPostSerializeTs(long ts)
MessageViewsetPostSerializeTs in interface MessageViewts - The timestamp to set.public final long getPostSerializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just after a message was serialized for transport.
getPostSerializeTs in interface MessageViewpublic final MessageView setPreWireTs(long ts)
MessageViewThis timestamp, in microseconds, specifies the time just before a message was sent on the network (the accuracy of this depends on how close to the wire the SMA binding used can timestamp the message)
setPreWireTs in interface MessageViewts - The timestamp to set.public final long getPreWireTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was sent on the network (the accuracy of this depends on how close to the wire the SMA binding used can timestamp the message).
The returned timestamp is in microseconds.
getPreWireTs in interface MessageViewpublic final PacketMessage setPostWireSendTs(long ts)
MessageViewsetPostWireSendTs in interface MessageViewts - The timestamp to set.public final long getPostWireSendTs()
MessageView
This timestamp, in microseconds, specifies the time just
after the bus provider specific network send call returns.
Comparing this timestamp to MessageView.getPreWireTs() determines
the time spent in the bus provider's send call.
getPostWireSendTs in interface MessageViewpublic final MessageView setPostWireTs(long ts)
MessageViewsetPostWireTs in interface MessageViewts - The timestamp to set.public final long getPostWireTs()
MessageViewThis timestamp, in microseconds, specifies the time just after a message was received from the network (the accuracy of this depends on how close to the wire the SMA binding used can timestamp the message)
getPostWireTs in interface MessageViewpublic final MessageView setPreDeserializeTs(long ts)
MessageViewsetPreDeserializeTs in interface MessageViewts - The timestamp to set.public final long getPreDeserializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was de-serialized after transport.
getPreDeserializeTs in interface MessageViewpublic final MessageView setPostDeserializeTs(long ts)
MessageViewsetPostDeserializeTs in interface MessageViewts - The timestamp to set.public final long getPostDeserializeTs()
MessageViewThis timestamp, in microseconds, specifies the time just after a message was de-serialized after transport.
getPostDeserializeTs in interface MessageViewpublic long getEnqueueTs()
MessageViewgetEnqueueTs in interface MessageViewMessageView.getEnqueueTsMicros()public MessageView setEnqueueTsMicros(long ts)
MessageViewThis timestamp, in microseconds, specifies the time just before a message was enqueued on an application's input queue.
setEnqueueTsMicros in interface MessageViewts - the enqueue timestamp in microseconds.public long getEnqueueTsMicros()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was enqueued on an application's input queue.
This timestamp can be compared with MessageView.getPreProcessingTsMicros()
to determine the amount of time that the message spent on an
application's input queue unless the application is configured to
use Event Sourcing and the message is one re-enqueued during recovery
from a transaction or received by a backup instance via replication.
getEnqueueTsMicros in interface MessageViewpublic final MessageView setReceiveTs(long ts)
MessageViewsetReceiveTs in interface MessageViewts - The timestamp to set.public final long getReceiveTs()
MessageViewThis timestamp, in microseconds, specifies the time just before a message was received by X's application dispatch machinery. It is the same as the pre-processing timestamp if the message is not being redelivered to the application by the in-process X runtime.
getReceiveTs in interface MessageView@Deprecated public final MessageView setPreProcessingTs(long ts)
MessageViewsetPreProcessingTs in interface MessageViewts - The timestamp to set.public final long getPreProcessingTs()
MessageView
This timestamp is the same as MessageView.getPreProcessingTsMicros() / 1000.
getPreProcessingTs in interface MessageViewMessageView.getPreProcessingTsMicros()public final MessageView setPreProcessingTsMicros(long ts)
MessageViewsetPreProcessingTsMicros in interface MessageViewts - The timestamp to set.com.neeve.util.UtlTime#nowSinceEpoch()public final long getPreProcessingTsMicros()
MessageViewThis timestamp records the time just before a message was dispatched to the application for processing.
Because the pre-processing timestamp is used to provide HA consistent time for an application that is using Event Sourcing as an HaPolicy, this value is guaranteed to be set to the same value as used on the primary instance. A backup instance or a primary recovering from a transaciton log will see the original preProcessingTs value.
getPreProcessingTsMicros in interface MessageView@Deprecated public final MessageView setPostProcessingTs(long ts)
MessageViewsetPostProcessingTs in interface MessageViewts - The timestamp to set.@Deprecated public final long getPostProcessingTs()
MessageViewThis timestamp, in milliseconds, specifies the time just after a message processing handler completes.
getPostProcessingTs in interface MessageViewpublic final MessageView setPostProcessingTsMicros(long ts)
MessageViewsetPostProcessingTsMicros in interface MessageViewts - The timestamp to set.public final long getPostProcessingTsMicros()
MessageViewThis timestamp, in microseconds, specifies the time just after a message processing handler completes.
getPostProcessingTsMicros in interface MessageViewpublic final void sync()
MessageViewsync in interface MessageViewpublic final byte[] serializeToByteArray()
MessageViewserializeToByteArray in interface MessageViewpublic final ByteBuffer serializeToByteBuffer()
MessageViewserializeToByteBuffer in interface MessageViewpublic final IOBuffer serializeToIOBuffer(boolean useNative)
MessageViewImplMessageView.serializeToIOBuffer(boolean)serializeToIOBuffer in interface MessageViewserializeToIOBuffer in class MessageViewImpluseNative - Whether the returned buffer should be native.public final PacketMessage copy()
CopyableMessageViewThe copy has the following characteristics:
Timestamps Timestamp fields that must be included in the copy:
Additionally, theMessageView.getCreateTs() for the message copy
will be the time of this copy().copy in interface CopyableMessageView<PacketMessage>public final PktPacket serializeToPacket()
MessageViewserializeToPacket in interface MessageViewpublic final String serializeToJson()
MessageViewserializeToJson in interface MessageViewpublic final PacketMessage deserializeFromByteArray(byte[] array)
MessageViewdeserializeFromByteArray in interface MessageViewarray - The array containing the serialized messagepublic final PacketMessage deserializeFromByteBuffer(ByteBuffer buffer)
MessageViewdeserializeFromByteBuffer in interface MessageViewbuffer - The buffer containing the serialized messagepublic final PacketMessage deserializeFrom(IOBuffer buffer, int offset, int len)
MessageViewImplMessageView.deserializeFrom(IOBuffer, int, int)deserializeFrom in interface MessageViewdeserializeFrom in class MessageViewImplbuffer - The buffer containing the serialized messageoffset - The offset into the buffer where the serialized message startslen - The length of the serialized messagepublic final PacketMessage deserializeFrom(long addr, int offset, int len)
MessageViewImplMessageView.deserializeFrom(long, int, int)deserializeFrom in interface MessageViewdeserializeFrom in class MessageViewImpladdr - The address of the region to deserialize the message fromoffset - The offset from the start of the region to deserialize the message fromlen - The length of the serialized messagepublic final PacketMessage deserializeFromPacket(PktPacket packet)
MessageViewdeserializeFromPacket in interface MessageViewpacket - The packet containing the serialized messagepublic final PacketMessage deserializeFromJson(String json)
MessageViewdeserializeFromJson in interface MessageViewjson - The string containing the json serialized form of the messagepublic int dispose()
MessageViewImplMessageView.dispose()
This is the default implementation of the dispose method. The implementation just decrements the ownership count. Implementations that implement view object pooling or other such functionality should override this method but invoke this method to decrement the object reference count.
dispose in interface MessageViewdispose in class MessageViewImplpublic final PacketMessage init()
UtlPool.ItemThis method is invoked by an item pool very time an item is put into the pool. The method should wipe the contents of the item so as to present a fresh instance of the item to the caller when retrieved from the pool.
init in interface UtlPool.Item<PacketMessage>public final PacketMessage setPool(UtlPool<PacketMessage> pool)
UtlPool.ItemThis method is invoked by an item pool at the time an item is added to the pool. The intent is to record the item's source pool in the item so it can be disposed back into the pool when the user is done working with it.
setPool in interface UtlPool.Item<PacketMessage>public final UtlPool<PacketMessage> getPool()
UtlPool.Item
This method should return the pool set using UtlPool.Item.setPool(com.neeve.util.UtlPool<T>)
getPool in interface UtlPool.Item<PacketMessage>UtlPool.Item.setPool(com.neeve.util.UtlPool<T>)Copyright © 2019 N5 Technologies, Inc. All Rights Reserved.