com.sleepycat.je.log.entry
Class SingleItemLogEntry

java.lang.Object
  extended by com.sleepycat.je.log.entry.SingleItemLogEntry
All Implemented Interfaces:
LogEntry, Cloneable
Direct Known Subclasses:
BINDeltaLogEntry

public class SingleItemLogEntry
extends Object
implements LogEntry

This class embodies log entries that have a single loggable item.


Field Summary
(package private)  LogReadable item
           
 
Constructor Summary
SingleItemLogEntry(Class logClass)
           
 
Method Summary
 Object clone()
           
 StringBuffer dumpEntry(StringBuffer sb, boolean verbose)
          Print out the contents of an entry.
 Object getMainItem()
           
 LogEntry getNewInstance()
           
 long getTransactionId()
           
 boolean isTransactional()
           
 void readEntry(ByteBuffer entryBuffer, int entrySize, byte entryTypeVersion, boolean readFullItem)
          Read in an log entry.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

LogReadable item
Constructor Detail

SingleItemLogEntry

public SingleItemLogEntry(Class logClass)
Method Detail

readEntry

public void readEntry(ByteBuffer entryBuffer,
                      int entrySize,
                      byte entryTypeVersion,
                      boolean readFullItem)
               throws DatabaseException
Description copied from interface: LogEntry
Read in an log entry.

Specified by:
readEntry in interface LogEntry
Throws:
DatabaseException
See Also:
LogEntry.readEntry(java.nio.ByteBuffer, int, byte, boolean)

dumpEntry

public StringBuffer dumpEntry(StringBuffer sb,
                              boolean verbose)
Description copied from interface: LogEntry
Print out the contents of an entry.

Specified by:
dumpEntry in interface LogEntry
See Also:
LogEntry.dumpEntry(java.lang.StringBuffer, boolean)

getMainItem

public Object getMainItem()
Specified by:
getMainItem in interface LogEntry
Returns:
the first item of the log entry
See Also:
LogEntry.getMainItem()

clone

public Object clone()
             throws CloneNotSupportedException
Specified by:
clone in interface LogEntry
Overrides:
clone in class Object
Returns:
a shallow clone.
Throws:
CloneNotSupportedException
See Also:
LogEntry.clone()

isTransactional

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

getTransactionId

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

getNewInstance

public LogEntry getNewInstance()
                        throws DatabaseException
Returns:
a new instance
Throws:
DatabaseException


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