com.sleepycat.je.recovery
Class CheckpointEnd

java.lang.Object
  extended by com.sleepycat.je.recovery.CheckpointEnd
All Implemented Interfaces:
LoggableObject, LogReadable, LogWritable

public class CheckpointEnd
extends Object
implements LoggableObject, LogReadable

CheckpointEnd encapsulates the information needed by a checkpoint end log entry.


Constructor Summary
CheckpointEnd()
           
CheckpointEnd(String invoker, long checkpointStartLsn, long rootLsn, long firstActiveLsn, long lastNodeId, int lastDbId, long lastTxnId, long id)
           
 
Method Summary
 boolean countAsObsoleteWhenLogged()
          Returns true if this item should be counted as obsoleted when logged.
 void dumpLog(StringBuffer sb, boolean verbose)
          Write the object into the string buffer for log dumping.
(package private)  long getCheckpointStartLsn()
           
(package private)  long getFirstActiveLsn()
           
(package private)  long getId()
           
(package private)  int getLastDbId()
           
(package private)  long getLastNodeId()
           
(package private)  long getLastTxnId()
           
 int getLogSize()
           
 LogEntryType getLogType()
          All objects that are reponsible for a generating a type of log entry must implement this.
(package private)  long getRootLsn()
           
 long getTransactionId()
           
 boolean logEntryIsTransactional()
           
 boolean marshallOutsideWriteLatch()
          Return true if this item can be marshalled outside the log write latch.
 void postLogWork(long justLoggedLsn)
          Do any processing we need to do after logging, while under the logging latch.
 void readFromLog(ByteBuffer logBuffer, byte entryTypeVersion)
          Initialize this object from the data in itemBuf.
 String toString()
           
 void writeToLog(ByteBuffer logBuffer)
          Serialize this object into the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckpointEnd

public CheckpointEnd(String invoker,
                     long checkpointStartLsn,
                     long rootLsn,
                     long firstActiveLsn,
                     long lastNodeId,
                     int lastDbId,
                     long lastTxnId,
                     long id)

CheckpointEnd

public CheckpointEnd()
Method Detail

getLogType

public LogEntryType getLogType()
Description copied from interface: LoggableObject
All objects that are reponsible for a generating a type of log entry must implement this.

Specified by:
getLogType in interface LoggableObject
Returns:
the type of log entry
See Also:
LoggableObject.getLogType()

marshallOutsideWriteLatch

public boolean marshallOutsideWriteLatch()
Description copied from interface: LoggableObject
Return true if this item can be marshalled outside the log write latch.

Specified by:
marshallOutsideWriteLatch in interface LoggableObject
See Also:
Can be marshalled outside the log write latch.

countAsObsoleteWhenLogged

public boolean countAsObsoleteWhenLogged()
Description copied from interface: LoggableObject
Returns true if this item should be counted as obsoleted when logged. This currently applies to deleted LNs only.

Specified by:
countAsObsoleteWhenLogged in interface LoggableObject
See Also:
LoggableObject.countAsObsoleteWhenLogged()

postLogWork

public void postLogWork(long justLoggedLsn)
Description copied from interface: LoggableObject
Do any processing we need to do after logging, while under the logging latch.

Specified by:
postLogWork in interface LoggableObject
See Also:
LoggableObject.postLogWork(long)

getLogSize

public int getLogSize()
Specified by:
getLogSize in interface LogWritable
Returns:
number of bytes used to store this object.
See Also:
LogWritable.getLogSize()

writeToLog

public void writeToLog(ByteBuffer logBuffer)
Description copied from interface: LogWritable
Serialize this object into the buffer.

Specified by:
writeToLog in interface LogWritable
Parameters:
logBuffer - is the destination buffer
See Also:
LogWritable.writeToLog(java.nio.ByteBuffer)

readFromLog

public void readFromLog(ByteBuffer logBuffer,
                        byte entryTypeVersion)
                 throws LogException
Description copied from interface: LogReadable
Initialize this object from the data in itemBuf.

Specified by:
readFromLog in interface LogReadable
Throws:
LogException
See Also:
LogReadable.readFromLog(java.nio.ByteBuffer, byte)

dumpLog

public void dumpLog(StringBuffer sb,
                    boolean verbose)
Description copied from interface: LogReadable
Write the object into the string buffer for log dumping. Each object should be dumped without indentation or new lines and should be valid XML.

Specified by:
dumpLog in interface LogReadable
Parameters:
sb - destination string buffer
verbose - if true, dump the full, verbose version
See Also:
LogReadable.dumpLog(java.lang.StringBuffer, boolean)

logEntryIsTransactional

public boolean logEntryIsTransactional()
Specified by:
logEntryIsTransactional in interface LogReadable
Returns:
true if the LogEntry is a transactional log entry type.
See Also:
LogReadable.logEntryIsTransactional()

getTransactionId

public long getTransactionId()
Specified by:
getTransactionId in interface LogReadable
Returns:
return the transaction id if this log entry is transactional, 0 otherwise.
See Also:
LogReadable.getTransactionId()

toString

public String toString()
Overrides:
toString in class Object

getCheckpointStartLsn

long getCheckpointStartLsn()

getRootLsn

long getRootLsn()

getFirstActiveLsn

long getFirstActiveLsn()

getLastNodeId

long getLastNodeId()

getLastDbId

int getLastDbId()

getLastTxnId

long getLastTxnId()

getId

long getId()


Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.