Package org.apache.bookkeeper.bookie
Class DefaultEntryLogger.BufferedLogChannel
java.lang.Object
org.apache.bookkeeper.bookie.BufferedChannelBase
org.apache.bookkeeper.bookie.BufferedReadChannel
org.apache.bookkeeper.bookie.BufferedChannel
org.apache.bookkeeper.bookie.DefaultEntryLogger.BufferedLogChannel
- All Implemented Interfaces:
Closeable,AutoCloseable
- Enclosing class:
- DefaultEntryLogger
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.bookkeeper.bookie.BufferedChannelBase
BufferedChannelBase.BufferedChannelClosedException -
Field Summary
Fields inherited from class org.apache.bookkeeper.bookie.BufferedChannel
position, unpersistedBytes, unpersistedBytesBound, writeBuffer, writeBufferStartPosition, writeCapacityFields inherited from class org.apache.bookkeeper.bookie.BufferedReadChannel
cacheHitCount, invocationCount, readBuffer, readBufferStartPosition, readCapacity, sealedFields inherited from class org.apache.bookkeeper.bookie.BufferedChannelBase
fileChannel -
Constructor Summary
ConstructorsConstructorDescriptionBufferedLogChannel(io.netty.buffer.ByteBufAllocator allocator, FileChannel fc, int writeCapacity, int readCapacity, long logId, File logFile, long unpersistedBytesBound) -
Method Summary
Modifier and TypeMethodDescription(package private) voidAppend the ledger map at the end of the entry log.longgetLogId()voidregisterWrittenEntry(long ledgerId, long entrySize) voidsetLedgerIdAssigned(Long ledgerId) toString()Methods inherited from class org.apache.bookkeeper.bookie.BufferedChannel
clear, close, flush, flushAndForceWrite, flushAndForceWriteIfRegularFlush, forceWrite, getFileChannelPosition, getNumOfBytesInWriteBuffer, getUnpersistedBytes, position, read, writeMethods inherited from class org.apache.bookkeeper.bookie.BufferedReadChannel
read, sizeMethods inherited from class org.apache.bookkeeper.bookie.BufferedChannelBase
validateAndGetFileChannel
-
Constructor Details
-
BufferedLogChannel
public BufferedLogChannel(io.netty.buffer.ByteBufAllocator allocator, FileChannel fc, int writeCapacity, int readCapacity, long logId, File logFile, long unpersistedBytesBound) throws IOException - Throws:
IOException
-
-
Method Details
-
getLogId
public long getLogId() -
getLogFile
-
registerWrittenEntry
public void registerWrittenEntry(long ledgerId, long entrySize) -
getLedgersMap
-
getLedgerIdAssigned
-
setLedgerIdAssigned
-
toString
-
appendLedgersMap
Append the ledger map at the end of the entry log. Updates the entry log file header with the offset and size of the map.- Throws:
IOException
-