public static final class RogLogReader.Entry extends Object implements UtlPool.Item<RogLogReader.Entry>
Threading:RogLogReader.Entrys are not safe for concurrent access by multiple threads.
| Modifier and Type | Class and Description |
|---|---|
static class |
RogLogReader.Entry.Type
Enumerates the various entry types
|
| Modifier and Type | Method and Description |
|---|---|
static RogLogReader.Entry |
create(RogLog log,
PktPacket packet,
long filePosition,
int sizeInFile)
Wraps an entry around a packet read from a log.
|
void |
dispose()
May be called when the
RogLogReader.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 size of the entry in the file.
|
RogLogReader.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
RogLogReader.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<RogLogReader.Entry> |
getPool()
Implementation of UtlPool.Item#getPool.
|
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.
|
RogLogReader.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().
|
RogLogReader.Entry |
setPool(UtlPool<RogLogReader.Entry> pool)
Implementation of UtlPool.Item#setPool.
|
String |
toString()
Returns a tabular String format for this
RogLogReader.Entry. |
String |
toString(boolean csv)
Returns a csv or tabular formatted string for this
RogLogReader.Entry |
public static final RogLogReader.Entry create(RogLog log, PktPacket packet, long filePosition, int sizeInFile) throws OdsException
This method acquires the passed in packet. The returned Entry is itself pooled. The caller should dispose of it when done.
log - The log the packet was read from. Can be null.packet - The packet from the log.filePosition - The position of the entry in the log filesizeInFile - The serialized length of the entry in the log fileOdsException - If the packet cannot be wrapped in an entry.public final RogLog getLog()
RogLog from which this entry was read.RogLog that read this entrypublic final String getLogName()
RogLogReader.Entry's log.RogLogReader.Entry cam from.public final PktPacket getPacket()
This method is reserved for internal use. Users of this api should
use getObject().
public final long getFilePosition()
public final int getEntrySize()
public final RogLogReader.Entry.Type getEntryType()
public final String getClassName()
public final String getSimpleClassName()
public final int getPayloadSize()
public final boolean isPayloadDeserialized()
RogLogReader.Entry don't need the payload to be deserialized / unmarshalled.
Which can result inpublic 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 com.eaio.uuid.UUID getId()
public short getOfid()
public short getOtype()
public IStoreObject.EncodingType getContentEncodingType()
public final long getTimestamp()
public final boolean isCommitStart()
public final boolean isCommitEnd()
public final long getTransactionId()
IStoreObjectMetadata.getTransactionId()public final long getStableTransactionId()
IStoreObjectMetadata.getStableTransactionId()public final long getCheckpointVersion()
IStoreObjectMetadata.getCheckpointVersion()public IRogMetadata getMetadata()
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()
RogLogReader.Entry.public final String toString(boolean csv)
RogLogReader.Entrypublic final void dispose()
RogLogReader.Entry will no longer be used to indicate that
it's backing objects can be returned to their poolspublic final RogLogReader.Entry init()
init in interface UtlPool.Item<RogLogReader.Entry>public final RogLogReader.Entry setPool(UtlPool<RogLogReader.Entry> pool)
setPool in interface UtlPool.Item<RogLogReader.Entry>public final UtlPool<RogLogReader.Entry> getPool()
getPool in interface UtlPool.Item<RogLogReader.Entry>UtlPool.Item.setPool(com.neeve.util.UtlPool<T>)Copyright © 2019 N5 Technologies, Inc. All Rights Reserved.