|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.cleaner.PackedOffsets
public class PackedOffsets
Stores a sorted list of LSN offsets in a packed short representation. Each stored value is the difference between two consecutive offsets. The stored values are stored as one or more shorts where each short holds 0x7fff values. Shorts are in LSB order. The value is negated if more shorts for the same offset follow; this works because offsets are always positive values.
Constructor Summary | |
---|---|
PackedOffsets()
Creates an empty object. |
Method Summary | |
---|---|
void |
dumpLog(java.lang.StringBuffer buf,
boolean verbose)
Write the object into the string buffer for log dumping. |
int |
getExtraMemorySize()
Return the extra memory used by this object when the pack() method has been called to allocate the data array. |
int |
getLogSize()
|
long |
getTransactionId()
Never called. |
boolean |
logicalEquals(Loggable other)
|
void |
pack(long[] offsets)
Packs the given offsets, replacing any offsets stored in this object. |
void |
readFromLog(java.nio.ByteBuffer buf,
byte entryVersion)
Initialize this object from the data in itemBuf. |
java.lang.String |
toString()
|
void |
writeToLog(java.nio.ByteBuffer buf)
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 |
---|
public PackedOffsets()
Method Detail |
---|
public void pack(long[] offsets)
public int getExtraMemorySize()
public int getLogSize()
getLogSize
in interface Loggable
Loggable.getLogSize()
public void writeToLog(java.nio.ByteBuffer buf)
Loggable
writeToLog
in interface Loggable
buf
- is the destination bufferLoggable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(java.nio.ByteBuffer buf, byte entryVersion)
Loggable
readFromLog
in interface Loggable
Loggable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(java.lang.StringBuffer buf, boolean verbose)
Loggable
dumpLog
in interface Loggable
buf
- destination string bufferverbose
- if true, dump the full, verbose versionLoggable.dumpLog(java.lang.StringBuffer, boolean)
public long getTransactionId()
getTransactionId
in interface Loggable
Loggable.getTransactionId()
public boolean logicalEquals(Loggable other)
logicalEquals
in interface Loggable
Always return false, this item should never be compared.
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |