Package org.apache.bookkeeper.client
Class LedgerMetadataBuilder
- java.lang.Object
-
- org.apache.bookkeeper.client.LedgerMetadataBuilder
-
@LimitedPrivate @Unstable public class LedgerMetadataBuilder extends java.lang.Object
Builder for building LedgerMetadata objects.
-
-
Constructor Summary
Constructors Constructor Description LedgerMetadataBuilder()
-
Method Summary
-
-
-
Method Detail
-
create
public static LedgerMetadataBuilder create()
-
from
public static LedgerMetadataBuilder from(LedgerMetadata other)
-
withId
public LedgerMetadataBuilder withId(long ledgerId)
-
withMetadataFormatVersion
public LedgerMetadataBuilder withMetadataFormatVersion(int version)
-
withPassword
public LedgerMetadataBuilder withPassword(byte[] password)
-
withDigestType
public LedgerMetadataBuilder withDigestType(DigestType digestType)
-
withEnsembleSize
public LedgerMetadataBuilder withEnsembleSize(int ensembleSize)
-
withWriteQuorumSize
public LedgerMetadataBuilder withWriteQuorumSize(int writeQuorumSize)
-
withAckQuorumSize
public LedgerMetadataBuilder withAckQuorumSize(int ackQuorumSize)
-
newEnsembleEntry
public LedgerMetadataBuilder newEnsembleEntry(long firstEntry, java.util.List<BookieId> ensemble)
-
replaceEnsembleEntry
public LedgerMetadataBuilder replaceEnsembleEntry(long firstEntry, java.util.List<BookieId> ensemble)
-
withInRecoveryState
public LedgerMetadataBuilder withInRecoveryState()
-
withClosedState
public LedgerMetadataBuilder withClosedState()
-
withLastEntryId
public LedgerMetadataBuilder withLastEntryId(long lastEntryId)
-
withLength
public LedgerMetadataBuilder withLength(long length)
-
withCustomMetadata
public LedgerMetadataBuilder withCustomMetadata(java.util.Map<java.lang.String,byte[]> customMetadata)
-
withCreationTime
public LedgerMetadataBuilder withCreationTime(long ctime)
-
storingCreationTime
public LedgerMetadataBuilder storingCreationTime(boolean storing)
-
withCToken
public LedgerMetadataBuilder withCToken(long cToken)
-
build
public LedgerMetadata build()
-
-