|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.rog.log.RogLog.Entry
public static final class RogLog.Entry
Represents a transaction log entry
Threading:RogLog.Entry
s are not safe for concurrent access by multiple threads.
Nested Class Summary | |
---|---|
static class |
RogLog.Entry.Type
Enumerates the various entry types |
Method Summary | |
---|---|
static RogLog.Entry |
create(PktPacket packet)
Wraps an entry around a packet read from a RogLog. |
void |
dispose()
May be called when the RogLog.Entry will no longer be used to indicate that
it's backing objects can be returned to their pools |
long |
getCheckpointVersion()
Get the entry's checkpoint version. |
String |
getClassName()
Get the simple class name of the logged object |
IStoreObject.EncodingType |
getContentEncodingType()
Get's the object's content encoding type. |
int |
getEntrySize()
Get the serialized size of an entry. |
RogLog.Entry.Type |
getEntryType()
Get the entry type |
long |
getFilePosition()
Gets the current position of the entry in the file. |
static String |
getHeaderRow(boolean csv)
Returns a row suitable to act as a header for information dumped by toString() . |
com.eaio.uuid.UUID |
getId()
Get the object id |
RogLog |
getLog()
Returns the RogLog from which this entry was read. |
String |
getLogName()
Gets the name of this RogLog.Entry 's log. |
IRogMetadata |
getMetadata()
Gets the metadata associated with this entry. |
IStoreObject |
getObject()
Get the object associated with this entry or null, if the entry did not contain a serialized object. |
short |
getOfid()
When the entry has a serialized payload, returns the serialized object's object factory id |
short |
getOtype()
When the entry has a serialized payload, returns the serialized object's object type |
PktPacket |
getPacket()
Get the raw packet backing this entry. |
int |
getPayloadSize()
Get the serialized size of an entry's payload. |
UtlPool<RogLog.Entry> |
getPool()
Implementation of UtlPool.Item#getPool. |
ByteBuffer |
getRawBody()
Returns the object in its serialized form, or null if either the entry doesn't have a corresponding object or if the object's serialized form has been discarded as a result of deserializing it into it's object form. |
PktBuffer |
getSerializedMetadata()
Gets the serialized metadata for this entry. |
String |
getSimpleClassName()
Get the simple class name of the logged object |
long |
getStableTransactionId()
Get the entry's stabilized transaction id. |
long |
getTimestamp()
Gets the time at which this entry was persisted or 0 if no persist timestamp was recorded. |
long |
getTransactionId()
Get the entry's transaction id. |
RogLog.Entry |
init()
Implementation of UtlPool.Item#init. |
boolean |
isCommitEnd()
Get if an entry marks the end of a commit |
boolean |
isCommitStart()
Get if an entry marks the start of a commit |
boolean |
isPayloadDeserialized()
Indicates whether the payload was deserialized via getObject(). |
RogLog.Entry |
setPool(UtlPool<RogLog.Entry> pool)
Implementation of UtlPool.Item#setPool. |
String |
toString()
Returns a tabular String format for this RogLog.Entry . |
String |
toString(boolean csv)
Returns a csv or tabular formatted string for this RogLog.Entry |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static final RogLog.Entry create(PktPacket packet) throws OdsException
This method acquires the passed in packet. The returned Entry is itself pooled. The caller should dispose of it when done.
packet
- The packet from the log.
OdsException
- If the packet cannot be wrapped in an entry.public final long getFilePosition()
public final String getLogName()
RogLog.Entry
's log.
RogLog.Entry
cam from.public final long getTimestamp()
public final RogLog.Entry.Type getEntryType()
public final int getEntrySize()
public final int getPayloadSize()
public final String getClassName()
public final String getSimpleClassName()
public final com.eaio.uuid.UUID getId()
public final long getTransactionId()
IStoreObject.getTransactionId()
public final long getStableTransactionId()
IStoreObject.getStableTransactionId()
public final long getCheckpointVersion()
IStoreObject.getCheckpointVersion()
public final PktPacket getPacket()
This method is reserved for internal use. Users of this api should
use getObject()
.
public final IStoreObject getObject()
getMetadata()
instead of getObject()
since
the latter requires full object deserialization whereas the former
does not.
RuntimeException
- if there is an error deserializing the objectpublic final boolean isPayloadDeserialized()
RogLog.Entry
don't need the payload to be deserialized / unmarshalled.
Which can result in
public final boolean isCommitStart()
public final boolean isCommitEnd()
public static final String getHeaderRow(boolean csv)
toString()
.
csv
- Indicates that the header row should be in csv format, otherwise a tabular format will be used.
toString()
public final String toString()
RogLog.Entry
.
toString
in class Object
public final String toString(boolean csv)
RogLog.Entry
public short getOfid()
public short getOtype()
public final ByteBuffer getRawBody()
public IStoreObject.EncodingType getContentEncodingType()
public PktBuffer getSerializedMetadata()
public IRogMetadata getMetadata()
public RogLog getLog()
RogLog
from which this entry was read.
RogLog
that read this entrypublic final void dispose()
RogLog.Entry
will no longer be used to indicate that
it's backing objects can be returned to their pools
public final RogLog.Entry init()
init
in interface UtlPool.Item<RogLog.Entry>
public final RogLog.Entry setPool(UtlPool<RogLog.Entry> pool)
setPool
in interface UtlPool.Item<RogLog.Entry>
public final UtlPool<RogLog.Entry> getPool()
getPool
in interface UtlPool.Item<RogLog.Entry>
UtlPool.Item.setPool(com.neeve.util.UtlPool)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |