com.sleepycat.je.tree
Class VersionedLN

java.lang.Object
  extended by com.sleepycat.je.tree.Node
      extended by com.sleepycat.je.tree.LN
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sleepycat.je.tree.LN
LN.LNWriteFailureException
 
Field Summary
 
Fields inherited from class com.sleepycat.je.tree.Node
NULL_NODE_ID
 
Constructor Summary
VersionedLN()
           
VersionedLN(byte[] data)
           
VersionedLN(DatabaseEntry dbt)
           
VersionedLN(SizeofMarker marker, DatabaseEntry dbt)
          For Sizeof.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sleepycat.je.log.Loggable
getTransactionId
 

Constructor Detail

VersionedLN

public VersionedLN()

VersionedLN

VersionedLN(byte[] data)

VersionedLN

VersionedLN(DatabaseEntry dbt)

VersionedLN

public VersionedLN(SizeofMarker marker,
                   DatabaseEntry dbt)
For Sizeof.

Method Detail

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.