Package org.apache.bookkeeper.bookie
Class ReadOnlyDefaultEntryLogger
- java.lang.Object
-
- org.apache.bookkeeper.bookie.DefaultEntryLogger
-
- org.apache.bookkeeper.bookie.ReadOnlyDefaultEntryLogger
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,EntryLogger
public class ReadOnlyDefaultEntryLogger extends DefaultEntryLogger
Read Only Entry Logger.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.bookkeeper.bookie.DefaultEntryLogger
DefaultEntryLogger.BufferedLogChannel, DefaultEntryLogger.EntryLogListener, DefaultEntryLogger.EntryLookupException, DefaultEntryLogger.RecentEntryLogsStatus
-
-
Field Summary
-
Fields inherited from class org.apache.bookkeeper.bookie.DefaultEntryLogger
conf, entryLoggerAllocator, HEADER_CURRENT_VERSION, HEADER_VERSION_POSITION, INVALID_LID, LEDGERS_MAP_ENTRY_ID, LEDGERS_MAP_ENTRY_SIZE, LEDGERS_MAP_HEADER_SIZE, LEDGERS_MAP_MAX_BATCH_SIZE, LEDGERS_MAP_OFFSET_POSITION, LOGFILE_HEADER_SIZE, MB, MIN_SANE_ENTRY_SIZE, recentlyCreatedEntryLogsStatus, UNINITIALIZED_LOG_ID
-
Fields inherited from interface org.apache.bookkeeper.bookie.storage.EntryLogger
LOG_FILE_SUFFIX, UNASSIGNED_LEDGERID
-
-
Constructor Summary
Constructors Constructor Description ReadOnlyDefaultEntryLogger(ServerConfiguration conf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
addEntry(long ledgerId, java.nio.ByteBuffer entry)
boolean
removeEntryLog(long entryLogId)
Remove entry log.-
Methods inherited from class org.apache.bookkeeper.bookie.DefaultEntryLogger
addEntry, addEntry, addListener, checkEntry, checkpoint, clearCompactingLogId, close, commitEntryMemTableFlush, extractEntryLogMetadataFromIndex, fileName2LogId, flush, getChannelForLogId, getEntryLoggerAllocator, getEntryLogManager, getEntryLogMetadata, getEntryLogsSet, getFlushedLogIds, getFromChannels, getLeastUnflushedLogId, getLedgerDirsManager, getPreviousAllocatedEntryLogId, incompleteCompactionLogs, logExists, logId2HexString, logIdForOffset, newCompactionLog, posForOffset, prepareEntryMemTableFlush, prepareSortedLedgerStorageCheckpoint, putInReadChannels, readEntry, readEntry, removeFromChannelsAndClose, scanEntryLog
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.bookkeeper.bookie.storage.EntryLogger
getEntryLogMetadata
-
-
-
-
Constructor Detail
-
ReadOnlyDefaultEntryLogger
public ReadOnlyDefaultEntryLogger(ServerConfiguration conf) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
removeEntryLog
public boolean removeEntryLog(long entryLogId)
Description copied from class:DefaultEntryLogger
Remove entry log.- Specified by:
removeEntryLog
in interfaceEntryLogger
- Overrides:
removeEntryLog
in classDefaultEntryLogger
- Parameters:
entryLogId
- Entry Log File Id- Returns:
- false if the entrylog doesn't exist.
-
addEntry
public long addEntry(long ledgerId, java.nio.ByteBuffer entry) throws java.io.IOException
- Overrides:
addEntry
in classDefaultEntryLogger
- Throws:
java.io.IOException
-
-