@InterfaceAudience.LimitedPrivate @InterfaceStability.Unstable public interface LedgerMetadata
Modifier and Type | Interface and Description |
---|---|
static class |
LedgerMetadata.State
Possible metadata states.
|
Modifier and Type | Method and Description |
---|---|
int |
getAckQuorumSize()
Returns the ack quorum size of this ledger.
|
java.util.NavigableMap<java.lang.Long,? extends java.util.List<org.apache.bookkeeper.net.BookieSocketAddress>> |
getAllEnsembles()
Returns all the ensembles of this entry.
|
long |
getCtime()
Returns the creation timestamp of this ledger.
|
long |
getCToken()
Get the unique creator token of the Ledger.
|
java.util.Map<java.lang.String,byte[]> |
getCustomMetadata()
Returns the custom metadata stored with the ledgers.
|
DigestType |
getDigestType()
Returns the digest type used by this ledger.
|
java.util.List<org.apache.bookkeeper.net.BookieSocketAddress> |
getEnsembleAt(long entryId)
Returns the ensemble at the given
entryId . |
int |
getEnsembleSize()
Returns the ensemble size of this ledger.
|
long |
getLastEntryId()
Returns the last entry id of this ledger.
|
long |
getLength()
Returns the length of this ledger.
|
int |
getMetadataFormatVersion()
Get the format version which should be used to serialize the metadata.
|
byte[] |
getPassword()
Get the password for the ledger.
|
LedgerMetadata.State |
getState()
Returns the state of the metadata.
|
int |
getWriteQuorumSize()
Returns the write quorum size of this ledger.
|
boolean |
hasPassword()
Whether the metadata contains the password and digest type for the ledger.
|
boolean |
isClosed()
Returns whether the ledger is sealed or not.
|
java.lang.String |
toSafeString()
Similar to #toString(), but omits the password of the ledger, so that it is safe to log the output.
|
int getEnsembleSize()
int getWriteQuorumSize()
int getAckQuorumSize()
long getLastEntryId()
If this ledger is not sealed isClosed()
, it returns -1L
.
long getLength()
If this ledger is not sealed isClosed()
, it returns 0
.
boolean hasPassword()
byte[] getPassword()
DigestType getDigestType()
long getCtime()
boolean isClosed()
java.util.Map<java.lang.String,byte[]> getCustomMetadata()
java.util.List<org.apache.bookkeeper.net.BookieSocketAddress> getEnsembleAt(long entryId)
entryId
.entryId
- the entry id to retrieve its ensemble informationentryId
.java.util.NavigableMap<java.lang.Long,? extends java.util.List<org.apache.bookkeeper.net.BookieSocketAddress>> getAllEnsembles()
LedgerMetadata.State getState()
java.lang.String toSafeString()
int getMetadataFormatVersion()
long getCToken()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.