public class LogBuffer extends Object implements LogSource
LogBufferPool| Modifier and Type | Method and Description |
|---|---|
com.sleepycat.je.log.LogBufferSegment |
allocate(int size)
Allocate a segment out of the buffer.
|
void |
free()
Called with the buffer not latched.
|
ByteBuffer |
getBytes(long fileOffset)
Make a copy of this buffer (doesn't copy data, only buffer state)
and position it to read the requested data.
|
ByteBuffer |
getBytes(long fileOffset,
int numBytes)
Same as getBytes(long fileOffset) since buffer should always hold a
whole entry.
|
ByteBuffer |
getDataBuffer()
Returns the buffer for read access (although some tests may write to the
buffer).
|
long |
getFirstLsn()
Return first LSN held in this buffer.
|
int |
getLogVersion()
Entries in write buffers are always the current version.
|
void |
latchForWrite()
Acquires the readLatch, providing exclusive access to the buffer.
|
void |
release()
Releases the readLatch.
|
String |
toString() |
void |
waitForZeroAndLatch()
Acquire the buffer latched and with the buffer pin count equal to zero.
|
public long getFirstLsn()
public ByteBuffer getDataBuffer()
public void latchForWrite()
throws DatabaseException
DatabaseExceptionpublic void release()
release in interface LogSourceLogSource.release()public com.sleepycat.je.log.LogBufferSegment allocate(int size)
size - of buffer to allocatepublic void free()
public void waitForZeroAndLatch()
public ByteBuffer getBytes(long fileOffset)
getBytes in interface LogSourceLogSource.getBytes(long)public ByteBuffer getBytes(long fileOffset, int numBytes)
getBytes in interface LogSourceLogSource.getBytes(long)public int getLogVersion()
getLogVersion in interface LogSourceCopyright © 2024. All rights reserved.