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.Closeable
Map-store to store Entrylogger metadata.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
clear()
Clear all records from the map.boolean
containsKey(long entryLogId)
Checks if record with entryLogId exists into the map.void
forEach(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.void
forKey(long entryLogId, java.util.function.BiConsumer<java.lang.Long,EntryLogMetadata> action)
Performs the given action for the key.default boolean
isEmpty()
Returns true if there are no elements in the map.void
put(long entryLogId, EntryLogMetadata entryLogMeta)
Adds entryLogMetadata record into the map.void
remove(long entryLogId)
Removes entryLogMetadata record from the map.int
size()
Returns number of entryLogMetadata records presents into the map.
-
-
-
Method Detail
-
containsKey
boolean containsKey(long entryLogId) throws BookieException.EntryLogMetadataMapException
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(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.EntryLogMetadataMapException
Performs the given action for the key.- Parameters:
action
-- Throws:
BookieException.EntryLogMetadataMapException
-
remove
void remove(long entryLogId) throws BookieException.EntryLogMetadataMapException
Removes 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.EntryLogMetadataMapException
Returns true if there are no elements in the map.- Returns:
- Throws:
BookieException.EntryLogMetadataMapException
-
clear
void clear() throws BookieException.EntryLogMetadataMapException
Clear all records from the map. For unit tests.
-
-