Package org.apache.bookkeeper.bookie
Interface EntryLogMetadataMap
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
InMemoryEntryLogMetadataMap,PersistentEntryLogMetadataMap
public interface EntryLogMetadataMap extends java.io.CloseableMap-store to store Entrylogger metadata.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclear()Clear all records from the map.booleancontainsKey(long entryLogId)Checks if record with entryLogId exists into the map.voidforEach(java.util.function.BiConsumer<java.lang.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, java.util.function.BiConsumer<java.lang.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 Detail
-
containsKey
boolean containsKey(long entryLogId) throws BookieException.EntryLogMetadataMapExceptionChecks if record with entryLogId exists into the map.- Parameters:
entryLogId-- Returns:
- Throws:
BookieException.EntryLogMetadataMapException
-
put
void put(long entryLogId, EntryLogMetadata entryLogMeta) throws BookieException.EntryLogMetadataMapExceptionAdds entryLogMetadata record into the map.- Parameters:
entryLogId-entryLogMeta-- Throws:
BookieException.EntryLogMetadataMapException
-
forEach
void forEach(java.util.function.BiConsumer<java.lang.Long,EntryLogMetadata> action) throws BookieException.EntryLogMetadataMapException
Performs 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, java.util.function.BiConsumer<java.lang.Long,EntryLogMetadata> action) throws BookieException.EntryLogMetadataMapExceptionPerforms the given action for the key.- Parameters:
action-- Throws:
BookieException.EntryLogMetadataMapException
-
remove
void remove(long entryLogId) throws BookieException.EntryLogMetadataMapExceptionRemoves entryLogMetadata record from the map.- Parameters:
entryLogId-- Throws:
BookieException.EntryLogMetadataMapException
-
size
int size() throws BookieException.EntryLogMetadataMapException
Returns number of entryLogMetadata records presents into the map.- Returns:
- Throws:
BookieException.EntryLogMetadataMapException
-
isEmpty
default boolean isEmpty() throws BookieException.EntryLogMetadataMapExceptionReturns true if there are no elements in the map.- Returns:
- Throws:
BookieException.EntryLogMetadataMapException
-
clear
void clear() throws BookieException.EntryLogMetadataMapExceptionClear all records from the map. For unit tests.
-
-