| Constructor and Description |
|---|
LogBuffer(java.nio.ByteBuffer buffer,
long firstLsn) |
LogBuffer(int capacity,
EnvironmentImpl env) |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
containsLsn(long lsn)
Support for reading out of a still-in-memory log.
|
java.nio.ByteBuffer |
getBytes(long fileOffset)
Fill the destination byte array with bytes.
|
java.nio.ByteBuffer |
getBytes(long fileOffset,
int numBytes)
Fill the destination byte array with the requested number of bytes.
|
(package private) int |
getCapacity() |
java.nio.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() |
LogBuffer(int capacity,
EnvironmentImpl env)
throws DatabaseException
DatabaseExceptionLogBuffer(java.nio.ByteBuffer buffer,
long firstLsn)
void reinit()
throws DatabaseException
DatabaseExceptionpublic long getFirstLsn()
void registerLsn(long lsn)
throws DatabaseException
DatabaseExceptionboolean hasRoom(int numBytes)
public java.nio.ByteBuffer getDataBuffer()
int getCapacity()
boolean containsLsn(long lsn)
public void latchForWrite()
throws DatabaseException
DatabaseExceptionpublic void release()
LogSourcerelease in interface LogSourceLogSource.release()boolean getRewriteAllowed()
void setRewriteAllowed()
public java.nio.ByteBuffer getBytes(long fileOffset)
LogSourcegetBytes in interface LogSourceLogSource.getBytes(long)public java.nio.ByteBuffer getBytes(long fileOffset,
int numBytes)
throws ChecksumException
LogSourcegetBytes in interface LogSourceChecksumExceptionLogSource.getBytes(long)public int getLogVersion()
getLogVersion in interface LogSourceCopyright (c) 2004-2012 Oracle. All rights reserved.