|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.log.LogUtils
public class LogUtils
This class holds convenience methods for marshalling internal JE data to and from the log.
Nested Class Summary | |
---|---|
static class |
LogUtils.XidImpl
|
Field Summary | |
---|---|
static int |
INT_BYTES
|
static int |
LONG_BYTES
|
static int |
SHORT_BYTES
|
static int |
UNSIGNED_INT_BYTES
|
Constructor Summary | |
---|---|
LogUtils()
|
Method Summary | |
---|---|
static boolean |
dumpBoolean(ByteBuffer itemBuffer,
StringBuffer sb,
String tag)
|
static int |
getBooleanLogSize()
|
static int |
getByteArrayLogSize(byte[] b)
|
static int |
getIntLogSize()
|
static int |
getLongLogSize()
|
static int |
getStringLogSize(String s)
|
static int |
getTimestampLogSize()
|
static long |
getUnsignedInt(ByteBuffer buf)
Unmarshall the next four bytes which hold an unsigned int into a long. |
static int |
getXidSize(Xid xid)
The byte[]'s in Xid's are known to be 255 or less in length. |
static void |
putUnsignedInt(ByteBuffer buf,
long value)
Marshall a long into the next 4 bytes in this buffer. |
static boolean |
readBoolean(ByteBuffer logBuf)
Read a boolean from the log. |
static byte[] |
readByteArray(ByteBuffer logBuf)
Read a byte array from the log. |
static int |
readInt(ByteBuffer logBuf)
Read a int from the log. |
static int |
readIntMSB(ByteBuffer logBuf)
Read a int from the log in MSB order. |
static long |
readLong(ByteBuffer logBuf)
Read a long from the log. |
static short |
readShort(ByteBuffer logBuf)
Read a short from the log. |
static String |
readString(ByteBuffer logBuf)
Read a string from the log. |
static Timestamp |
readTimestamp(ByteBuffer logBuf)
Read a timestamp from the log. |
static Xid |
readXid(ByteBuffer logBuf)
|
static void |
writeBoolean(ByteBuffer logBuf,
boolean bool)
Write a boolean into the log. |
static void |
writeByteArray(ByteBuffer logBuf,
byte[] b)
Write a byte array into the log. |
static void |
writeInt(ByteBuffer logBuf,
int i)
Write an int into the log. |
static void |
writeIntMSB(ByteBuffer logBuf,
int i)
Write an int into the log in MSB order. |
static void |
writeLong(ByteBuffer logBuf,
long l)
Write a long into the log. |
static void |
writeShort(ByteBuffer logBuf,
short i)
Write a short into the log. |
static void |
writeString(ByteBuffer logBuf,
String stringVal)
Write a string into the log. |
static void |
writeTimestamp(ByteBuffer logBuf,
Timestamp time)
Write a timestamp into the log. |
static void |
writeUnsignedInt(ByteBuffer logBuf,
long value)
Write a long as an unsigned int. |
static void |
writeXid(ByteBuffer logBuf,
Xid xid)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SHORT_BYTES
public static final int INT_BYTES
public static final int LONG_BYTES
public static final int UNSIGNED_INT_BYTES
Constructor Detail |
---|
public LogUtils()
Method Detail |
---|
public static void putUnsignedInt(ByteBuffer buf, long value)
public static void writeUnsignedInt(ByteBuffer logBuf, long value)
public static long getUnsignedInt(ByteBuffer buf)
public static void writeShort(ByteBuffer logBuf, short i)
public static short readShort(ByteBuffer logBuf)
public static void writeInt(ByteBuffer logBuf, int i)
public static int readInt(ByteBuffer logBuf)
public static int getIntLogSize()
public static void writeIntMSB(ByteBuffer logBuf, int i)
public static int readIntMSB(ByteBuffer logBuf)
public static void writeLong(ByteBuffer logBuf, long l)
public static long readLong(ByteBuffer logBuf)
public static int getLongLogSize()
public static void writeByteArray(ByteBuffer logBuf, byte[] b)
public static byte[] readByteArray(ByteBuffer logBuf)
public static int getByteArrayLogSize(byte[] b)
public static void writeString(ByteBuffer logBuf, String stringVal)
public static String readString(ByteBuffer logBuf)
public static int getStringLogSize(String s)
public static void writeTimestamp(ByteBuffer logBuf, Timestamp time)
public static Timestamp readTimestamp(ByteBuffer logBuf)
public static int getTimestampLogSize()
public static void writeBoolean(ByteBuffer logBuf, boolean bool)
public static boolean readBoolean(ByteBuffer logBuf)
public static int getBooleanLogSize()
public static boolean dumpBoolean(ByteBuffer itemBuffer, StringBuffer sb, String tag)
public static int getXidSize(Xid xid)
public static void writeXid(ByteBuffer logBuf, Xid xid)
public static Xid readXid(ByteBuffer logBuf)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |