Package org.apache.bookkeeper.client
Class LedgerMetadataUtils
- java.lang.Object
-
- org.apache.bookkeeper.client.LedgerMetadataUtils
-
public class LedgerMetadataUtils extends java.lang.Object
Utilities for working with ledger metadata.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description LedgerMetadataUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.util.Set<BookieId>
getBookiesInThisLedger(LedgerMetadata metadata)
(package private) static java.util.List<BookieId>
getCurrentEnsemble(LedgerMetadata metadata)
(package private) static java.lang.Long
getLastEnsembleKey(LedgerMetadata metadata)
(package private) static java.util.List<BookieId>
getLastEnsembleValue(LedgerMetadata metadata)
(package private) static long
getNextEnsembleChange(LedgerMetadata metadata, long entryId)
the entry id greater than the given entry-id at which the next ensemble change takes place.static boolean
shouldStoreCtime(LedgerMetadata metadata)
-
-
-
Method Detail
-
getCurrentEnsemble
static java.util.List<BookieId> getCurrentEnsemble(LedgerMetadata metadata)
-
getNextEnsembleChange
static long getNextEnsembleChange(LedgerMetadata metadata, long entryId)
the entry id greater than the given entry-id at which the next ensemble change takes place.- Parameters:
entryId
-- Returns:
- the entry id of the next ensemble change (-1 if no further ensemble changes)
-
getBookiesInThisLedger
static java.util.Set<BookieId> getBookiesInThisLedger(LedgerMetadata metadata)
-
getLastEnsembleValue
static java.util.List<BookieId> getLastEnsembleValue(LedgerMetadata metadata)
-
getLastEnsembleKey
static java.lang.Long getLastEnsembleKey(LedgerMetadata metadata)
-
shouldStoreCtime
public static boolean shouldStoreCtime(LedgerMetadata metadata)
-
-