Class LedgerCreateOp


  • class LedgerCreateOp
    extends java.lang.Object
    Encapsulates asynchronous ledger create operation.
    • Field Detail

      • LOG

        static final org.slf4j.Logger LOG
      • 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
      • writeFlags

        final java.util.EnumSet<WriteFlag> writeFlags
      • startTime

        final long startTime
      • 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 object
        ensembleSize - ensemble size
        writeQuorumSize - write quorum size
        ackQuorumSize - ack quorum size
        digestType - digest type, either MAC or CRC32
        passwd - password
        cb - callback implementation
        ctx - optional control object
        customMetadata - 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.