|
|||||||||
| 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 | |
|---|---|
static int |
MAX_HEADER_SIZE
|
(package private) static int |
MIN_HEADER_SIZE
Persistent fields. |
| Constructor Summary | |
|---|---|
LogEntryHeader(EnvironmentImpl envImpl,
java.nio.ByteBuffer entryBuffer,
boolean anticipateChecksumErrors)
For reading a log entry. |
|
LogEntryHeader(LogEntry entry,
Provisional provisional,
ReplicationContext repContext)
For writing a log header. |
|
| Method Summary | |
|---|---|
java.nio.ByteBuffer |
addPostMarshallingInfo(EnvironmentImpl envImpl,
java.nio.ByteBuffer entryBuffer,
long lastOffset,
ReplicationContext repContext)
Add those parts of the header that must be calculated later to the entryBuffer, and also assign the fields in this class. |
(package private) void |
convertCommitToAbort(java.nio.ByteBuffer entryBuffer)
For use in special case where commits are transformed to aborts because of i/o errors during a logBuffer flush. |
void |
dumpLog(java.lang.StringBuffer sb,
boolean verbose)
|
(package private) void |
dumpLogNoTag(java.lang.StringBuffer sb,
boolean verbose)
Dump the header without enclosing |
long |
getChecksum()
|
(package private) int |
getInvariantSizeMinusChecksum()
|
int |
getItemSize()
|
long |
getPrevOffset()
|
Provisional |
getProvisional()
|
boolean |
getReplicated()
|
int |
getSize()
|
(package private) int |
getSizeMinusChecksum()
|
byte |
getType()
|
int |
getVariablePortionSize()
|
byte |
getVersion()
|
VLSN |
getVLSN()
|
static VLSN |
getVLSN(java.nio.ByteBuffer buffer)
Return the VLSN for the log entry header in this byte buffer. |
static boolean |
isSyncPoint(java.nio.ByteBuffer buffer)
Return whether the log entry represented by this byte buffer is a replication sync possible type log entry. |
boolean |
logicalEquals(LogEntryHeader other)
|
void |
readVariablePortion(java.nio.ByteBuffer entryBuffer)
Assumes this is called directly after the constructor, and that the entryBuffer is positioned right before the VLSN. |
java.lang.String |
toString()
|
void |
writeToLog(java.nio.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, wait, wait, wait |
| Field Detail |
|---|
static final int MIN_HEADER_SIZE
public static final int MAX_HEADER_SIZE
| Constructor Detail |
|---|
public LogEntryHeader(EnvironmentImpl envImpl,
java.nio.ByteBuffer entryBuffer,
boolean anticipateChecksumErrors)
throws DbChecksumException
anticipateChecksumErrors - if true, invalidate the environment
if the entry header is invalid.
DbChecksumException - if the entry is invalid.
If anticipateChecksumErrors is true and envImpl is not null, the
environment is also invalidated.
public LogEntryHeader(LogEntry entry,
Provisional provisional,
ReplicationContext repContext)
| Method Detail |
|---|
public long getChecksum()
public byte getType()
public byte getVersion()
public long getPrevOffset()
public int getItemSize()
public VLSN getVLSN()
public boolean getReplicated()
public Provisional getProvisional()
public int getVariablePortionSize()
public int getSize()
int getSizeMinusChecksum()
int getInvariantSizeMinusChecksum()
public void readVariablePortion(java.nio.ByteBuffer entryBuffer)
throws LogException
LogExceptionpublic void writeToLog(java.nio.ByteBuffer entryBuffer)
public java.nio.ByteBuffer addPostMarshallingInfo(EnvironmentImpl envImpl,
java.nio.ByteBuffer entryBuffer,
long lastOffset,
ReplicationContext repContext)
public void dumpLog(java.lang.StringBuffer sb,
boolean verbose)
sb - destination string bufferverbose - if true, dump the full, verbose version
void dumpLogNoTag(java.lang.StringBuffer sb,
boolean verbose)
sb - destination string bufferverbose - if true, dump the full, verbose versionvoid convertCommitToAbort(java.nio.ByteBuffer entryBuffer)
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean logicalEquals(LogEntryHeader other)
public static boolean isSyncPoint(java.nio.ByteBuffer buffer)
throws DbChecksumException
DbChecksumException
public static VLSN getVLSN(java.nio.ByteBuffer buffer)
throws DatabaseException
DatabaseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||