com.sleepycat.je.tree
Class VersionedLN
java.lang.Object
com.sleepycat.je.tree.Node
com.sleepycat.je.tree.LN
com.sleepycat.je.tree.VersionedLN
- All Implemented Interfaces:
- Loggable
public class VersionedLN
- extends LN
VersionedLN is used to provide an in-memory representation of an LN that
makes its VLSN available through btree access.
On disk, each log entry is composed of a header (je.log.LogEntryHeader) and
a body (je.log.entry.LogEntry). When an LN is materialized in the Btree, it
usually holds only the body, and does not have access to information in the
log entry header, such as the VLSN. Since version based API operations need
access to the VLSN, environments which are configured with
je.rep.preserveRecordVersion=true instantiate VersionedLNs instead of LNs,
in order to cache the VLSN with the LN, and make it cheaply available to
Btree operations.
Method Summary |
long |
getMemorySizeIncludedByParent()
Add additional size taken by this LN subclass. |
long |
getVLSNSequence()
Called by CursorImpl to get the record version. |
void |
setVLSNSequence(long seq)
Called by LogManager after writing an LN with a newly assigned VLSN, and
called by LNLogEntry after reading the LN with the VLSN from the log
entry header. |
Methods inherited from class com.sleepycat.je.tree.LN |
accountForDeferredWriteSubtreeRemoval, accountForSubtreeRemoval, addExtraMarshaledMemorySize, beginTag, copyEntryData, createLogEntry, delete, dumpKey, dumpLog, dumpLogAdditional, dumpString, endTag, getData, getGenericLogType, getLastLoggedSize, getLogSize, getLogType, incFetchStats, isDeleted, isDirty, isEvictable, isEvictableInexact, isLN, isValidForDelete, log, log, logicalEquals, makeDeleted, makeLN, makeLN, modify, optionalLog, optionalLogProvisional, readFromLog, rebuildINList, releaseMemoryBudget, resolvePartialEntry, setDirty, setEmpty, setEntry, setEntry, setLastLoggedSize, writeToLog |
Methods inherited from class com.sleepycat.je.tree.Node |
containsDuplicates, dump, getLevel, getTransactionId, getType, isBIN, isCompressible, isIN, latchShared, latchShared, postFetchInit, releaseLatch, toString, verify |
VersionedLN
public VersionedLN()
VersionedLN
VersionedLN(byte[] data)
VersionedLN
VersionedLN(DatabaseEntry dbt)
VersionedLN
public VersionedLN(SizeofMarker marker,
DatabaseEntry dbt)
- For Sizeof.
getVLSNSequence
public long getVLSNSequence()
- Description copied from class:
LN
- Called by CursorImpl to get the record version.
If VLSNs are not preserved for this environment, returns -1 which is the
sequence for VLSN.NULL_VLSN.
If VLSNs are preserved for this environment, this method is overridden
by VersionedLN which returns the VLSN sequence.
- Overrides:
getVLSNSequence
in class LN
setVLSNSequence
public void setVLSNSequence(long seq)
- Description copied from class:
LN
- Called by LogManager after writing an LN with a newly assigned VLSN, and
called by LNLogEntry after reading the LN with the VLSN from the log
entry header.
If VLSNs are not preserved for this environment, does nothing.
If VLSNs are preserved for this environment, this method is overridden
by VersionedLN which stores the VLSN sequence.
- Overrides:
setVLSNSequence
in class LN
getMemorySizeIncludedByParent
public long getMemorySizeIncludedByParent()
- Add additional size taken by this LN subclass.
- Overrides:
getMemorySizeIncludedByParent
in class LN
Copyright (c) 2004-2012 Oracle. All rights reserved.