|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.log.LogBuffer
public class LogBuffer
LogBuffers hold outgoing, newly written log entries.
Constructor Summary | |
---|---|
LogBuffer(ByteBuffer buffer,
long firstLsn)
|
|
LogBuffer(int capacity,
EnvironmentImpl env)
|
Method Summary | |
---|---|
(package private) boolean |
containsLsn(long lsn)
Support for reading out of a still-in-memory log. |
ByteBuffer |
getBytes(long fileOffset)
Fill the destination byte array with bytes. |
ByteBuffer |
getBytes(long fileOffset,
int numBytes)
Fill the destination byte array with the requested number of bytes. |
(package private) int |
getCapacity()
|
ByteBuffer |
getDataBuffer()
|
long |
getFirstLsn()
Return first LSN held in this buffer. |
int |
getLogVersion()
Entries in write buffers are always the current version. |
(package private) boolean |
getRewriteAllowed()
|
(package private) boolean |
hasRoom(int numBytes)
Check capacity of buffer. |
void |
latchForWrite()
When modifying the buffer, acquire the readLatch. |
(package private) void |
registerLsn(long lsn)
This LSN has been written to the log. |
(package private) void |
reinit()
|
void |
release()
We're done with this log source. |
(package private) void |
setRewriteAllowed()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
LogBuffer(int capacity, EnvironmentImpl env) throws DatabaseException
DatabaseException
LogBuffer(ByteBuffer buffer, long firstLsn)
Method Detail |
---|
void reinit() throws DatabaseException
DatabaseException
public long getFirstLsn()
void registerLsn(long lsn) throws DatabaseException
DatabaseException
boolean hasRoom(int numBytes)
public ByteBuffer getDataBuffer()
int getCapacity()
boolean containsLsn(long lsn)
public void latchForWrite() throws DatabaseException
DatabaseException
public void release()
LogSource
release
in interface LogSource
LogSource.release()
boolean getRewriteAllowed()
void setRewriteAllowed()
public ByteBuffer getBytes(long fileOffset)
LogSource
getBytes
in interface LogSource
LogSource.getBytes(long)
public ByteBuffer getBytes(long fileOffset, int numBytes) throws ChecksumException
LogSource
getBytes
in interface LogSource
ChecksumException
LogSource.getBytes(long)
public int getLogVersion()
getLogVersion
in interface LogSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |