|
|||||||||
| 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.
| Nested Class Summary | |
|---|---|
(package private) class |
PackedOffsets.Iterator
An iterator over all offsets. |
| Constructor Summary | |
|---|---|
PackedOffsets()
Creates an empty object. |
|
| Method Summary | |
|---|---|
void |
dumpLog(StringBuffer buf,
boolean verbose)
Write the object into the string buffer for log dumping. |
int |
getLogSize()
|
long |
getTransactionId()
Never called. |
(package private) PackedOffsets.Iterator |
iterator()
Returns an iterator over all offsets. |
boolean |
logEntryIsTransactional()
Never called. |
void |
pack(long[] offsets)
Packs the given offsets, replacing any offsets stored in this object. |
void |
readFromLog(ByteBuffer buf,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
(package private) long[] |
toArray()
Returns the unpacked offsets. |
String |
toString()
|
void |
writeToLog(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 |
|---|
PackedOffsets.Iterator iterator()
public void pack(long[] offsets)
long[] toArray()
public int getLogSize()
getLogSize in interface LogWritableLogWritable.getLogSize()public void writeToLog(ByteBuffer buf)
LogWritable
writeToLog in interface LogWritablebuf - is the destination bufferLogWritable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(ByteBuffer buf,
byte entryTypeVersion)
LogReadable
readFromLog in interface LogReadableLogReadable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(StringBuffer buf,
boolean verbose)
LogReadable
dumpLog in interface LogReadablebuf - destination string bufferverbose - if true, dump the full, verbose versionLogReadable.dumpLog(java.lang.StringBuffer, boolean)public long getTransactionId()
getTransactionId in interface LogReadableLogReadable.getTransactionId()public boolean logEntryIsTransactional()
logEntryIsTransactional in interface LogReadableLogReadable.logEntryIsTransactional()public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||