Package org.apache.bookkeeper.bookie
Interface EntryLogMetadataMap
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
InMemoryEntryLogMetadataMap,PersistentEntryLogMetadataMap
Map-store to store Entrylogger metadata.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all records from the map.booleancontainsKey(long entryLogId) Checks if record with entryLogId exists into the map.voidforEach(BiConsumer<Long, EntryLogMetadata> action) Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.voidforKey(long entryLogId, BiConsumer<Long, EntryLogMetadata> action) Performs the given action for the key.default booleanisEmpty()Returns true if there are no elements in the map.voidput(long entryLogId, EntryLogMetadata entryLogMeta) Adds entryLogMetadata record into the map.voidremove(long entryLogId) Removes entryLogMetadata record from the map.intsize()Returns number of entryLogMetadata records presents into the map.
-
Method Details
-
containsKey
Checks if record with entryLogId exists into the map.- Parameters:
entryLogId-- Returns:
- Throws:
BookieException.EntryLogMetadataMapException
-
put
void put(long entryLogId, EntryLogMetadata entryLogMeta) throws BookieException.EntryLogMetadataMapException Adds entryLogMetadata record into the map.- Parameters:
entryLogId-entryLogMeta-- Throws:
BookieException.EntryLogMetadataMapException
-
forEach
void forEach(BiConsumer<Long, EntryLogMetadata> action) throws BookieException.EntryLogMetadataMapExceptionPerforms the given action for each entry in this map until all entries have been processed or the action throws an exception.- Parameters:
action-- Throws:
BookieException.EntryLogMetadataMapException
-
forKey
void forKey(long entryLogId, BiConsumer<Long, EntryLogMetadata> action) throws BookieException.EntryLogMetadataMapExceptionPerforms the given action for the key.- Parameters:
action-- Throws:
BookieException.EntryLogMetadataMapException
-
remove
Removes entryLogMetadata record from the map.- Parameters:
entryLogId-- Throws:
BookieException.EntryLogMetadataMapException
-
size
Returns number of entryLogMetadata records presents into the map.- Returns:
- Throws:
BookieException.EntryLogMetadataMapException
-
isEmpty
Returns true if there are no elements in the map.- Returns:
- Throws:
BookieException.EntryLogMetadataMapException
-
clear
Clear all records from the map. For unit tests.
-