|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.log.LogEntryHeader
public class LogEntryHeader
A LogEntryHeader embodies the header information at the beginning of each log entry file.
Field Summary | |
---|---|
(package private) static int |
MAX_HEADER_SIZE
|
(package private) static int |
MIN_HEADER_SIZE
Persistent fields. |
Constructor Summary | |
---|---|
LogEntryHeader(EnvironmentImpl envImpl,
ByteBuffer entryBuffer,
boolean anticipateChecksumErrors)
For reading a log entry. |
|
LogEntryHeader(LogEntry entry,
boolean isProvisional,
boolean replicate)
For writing a log header. |
Method Summary | |
---|---|
(package private) ByteBuffer |
addPostMarshallingInfo(EnvironmentImpl envImpl,
ByteBuffer entryBuffer,
long lastOffset)
Add those parts of the header that must be calculated later. |
(package private) void |
convertCommitToAbort(ByteBuffer entryBuffer)
For use in special case where commits are transformed to aborts because of i/o errors during a logBuffer flush. |
void |
dumpLog(StringBuffer sb,
boolean verbose)
|
(package private) long |
getChecksum()
|
int |
getItemSize()
|
(package private) long |
getPrevOffset()
|
boolean |
getReplicate()
|
int |
getSize()
|
(package private) int |
getSizeMinusChecksum()
|
byte |
getType()
|
(package private) int |
getVariablePortionSize()
|
byte |
getVersion()
|
(package private) void |
readVariablePortion(ByteBuffer entryBuffer)
Assumes this is called directly after the constructor, and that the entryBuffer is positioned right before the VLSN. |
(package private) void |
writeToLog(ByteBuffer entryBuffer)
Serialize this object into the buffer and leave the buffer positioned in the right place to write the following item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int MIN_HEADER_SIZE
static final int MAX_HEADER_SIZE
Constructor Detail |
---|
public LogEntryHeader(EnvironmentImpl envImpl, ByteBuffer entryBuffer, boolean anticipateChecksumErrors) throws DatabaseException
DatabaseException
LogEntryHeader(LogEntry entry, boolean isProvisional, boolean replicate)
Method Detail |
---|
long getChecksum()
public byte getType()
public byte getVersion()
long getPrevOffset()
public int getItemSize()
public boolean getReplicate()
int getVariablePortionSize()
public int getSize()
int getSizeMinusChecksum()
void readVariablePortion(ByteBuffer entryBuffer) throws LogException
LogException
void writeToLog(ByteBuffer entryBuffer)
ByteBuffer addPostMarshallingInfo(EnvironmentImpl envImpl, ByteBuffer entryBuffer, long lastOffset)
public void dumpLog(StringBuffer sb, boolean verbose)
sb
- destination string bufferverbose
- if true, dump the full, verbose versionvoid convertCommitToAbort(ByteBuffer entryBuffer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |