Package org.apache.bookkeeper.client
Class LedgerCreateOp
- java.lang.Object
-
- org.apache.bookkeeper.client.LedgerCreateOp
-
class LedgerCreateOp extends java.lang.Object
Encapsulates asynchronous ledger create operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LedgerCreateOp.CreateBuilderImpl
-
Field Summary
Fields Modifier and Type Field Description (package private) int
ackQuorumSize
(package private) boolean
adv
(package private) BookKeeper
bk
(package private) AsyncCallback.CreateCallback
cb
(package private) BookKeeperClientStats
clientStats
(package private) OpStatsLogger
createOpLogger
(package private) java.lang.Object
ctx
(package private) java.util.Map<java.lang.String,byte[]>
customMetadata
(package private) BookKeeper.DigestType
digestType
(package private) int
ensembleSize
(package private) boolean
generateLedgerId
(package private) long
ledgerId
(package private) LedgerHandle
lh
(package private) static org.slf4j.Logger
LOG
(package private) LedgerMetadata
metadata
(package private) int
metadataFormatVersion
(package private) byte[]
passwd
(package private) long
startTime
(package private) java.util.EnumSet<WriteFlag>
writeFlags
(package private) int
writeQuorumSize
-
Constructor Summary
Constructors Constructor Description LedgerCreateOp(BookKeeper bk, int ensembleSize, int writeQuorumSize, int ackQuorumSize, BookKeeper.DigestType digestType, byte[] passwd, AsyncCallback.CreateCallback cb, java.lang.Object ctx, java.util.Map<java.lang.String,byte[]> customMetadata, java.util.EnumSet<WriteFlag> writeFlags, BookKeeperClientStats clientStats)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
generateLedgerIdAndCreateLedger(LedgerMetadataBuilder metadataBuilder)
void
initiate()
Initiates the operation.void
initiateAdv(long ledgerId)
Initiates the operation to return LedgerHandleAdv.
-
-
-
Field Detail
-
LOG
static final org.slf4j.Logger LOG
-
cb
final AsyncCallback.CreateCallback cb
-
metadata
LedgerMetadata metadata
-
lh
LedgerHandle lh
-
ledgerId
long ledgerId
-
ctx
final java.lang.Object ctx
-
ensembleSize
final int ensembleSize
-
writeQuorumSize
final int writeQuorumSize
-
ackQuorumSize
final int ackQuorumSize
-
customMetadata
final java.util.Map<java.lang.String,byte[]> customMetadata
-
metadataFormatVersion
final int metadataFormatVersion
-
passwd
final byte[] passwd
-
bk
final BookKeeper bk
-
digestType
final BookKeeper.DigestType digestType
-
writeFlags
final java.util.EnumSet<WriteFlag> writeFlags
-
startTime
final long startTime
-
createOpLogger
final OpStatsLogger createOpLogger
-
clientStats
final BookKeeperClientStats clientStats
-
adv
boolean adv
-
generateLedgerId
boolean generateLedgerId
-
-
Constructor Detail
-
LedgerCreateOp
LedgerCreateOp(BookKeeper bk, int ensembleSize, int writeQuorumSize, int ackQuorumSize, BookKeeper.DigestType digestType, byte[] passwd, AsyncCallback.CreateCallback cb, java.lang.Object ctx, java.util.Map<java.lang.String,byte[]> customMetadata, java.util.EnumSet<WriteFlag> writeFlags, BookKeeperClientStats clientStats)
Constructor.- Parameters:
bk
- BookKeeper objectensembleSize
- ensemble sizewriteQuorumSize
- write quorum sizeackQuorumSize
- ack quorum sizedigestType
- digest type, either MAC or CRC32passwd
- passwordcb
- callback implementationctx
- optional control objectcustomMetadata
- A map of user specified custom metadata about the ledger to be persisted; will not try to preserve the order(e.g. sortedMap) upon later retireval.
-
-
Method Detail
-
initiate
public void initiate()
Initiates the operation.
-
generateLedgerIdAndCreateLedger
void generateLedgerIdAndCreateLedger(LedgerMetadataBuilder metadataBuilder)
-
initiateAdv
public void initiateAdv(long ledgerId)
Initiates the operation to return LedgerHandleAdv.
-
-