Class MLTransactionLogImpl

    • Field Detail

      • TRANSACTION_LOG_PREFIX

        public static final java.lang.String TRANSACTION_LOG_PREFIX
        See Also:
        Constant Field Values
      • TRANSACTION_SUBSCRIPTION_NAME

        public static final java.lang.String TRANSACTION_SUBSCRIPTION_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • MLTransactionLogImpl

        public MLTransactionLogImpl​(TransactionCoordinatorID tcID,
                                    org.apache.bookkeeper.mledger.ManagedLedgerFactory managedLedgerFactory,
                                    org.apache.bookkeeper.mledger.ManagedLedgerConfig managedLedgerConfig)
    • Method Detail

      • getMLTransactionLogName

        public static org.apache.pulsar.common.naming.TopicName getMLTransactionLogName​(TransactionCoordinatorID tcID)
      • initialize

        public java.util.concurrent.CompletableFuture<java.lang.Void> initialize()
        Description copied from interface: TransactionLog
        Initialize the TransactionLog implementation.
        Specified by:
        initialize in interface TransactionLog
      • replayAsync

        public void replayAsync​(TransactionLogReplayCallback transactionLogReplayCallback)
        Description copied from interface: TransactionLog
        Replay transaction log to load the transaction map.
        Specified by:
        replayAsync in interface TransactionLog
        Parameters:
        transactionLogReplayCallback - the call back for replaying the transaction log
      • closeAsync

        public java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
        Description copied from interface: TransactionLog
        Close the transaction log.
        Specified by:
        closeAsync in interface TransactionLog
      • append

        public java.util.concurrent.CompletableFuture<org.apache.bookkeeper.mledger.Position> append​(TransactionMetadataEntry transactionMetadataEntry)
        Description copied from interface: TransactionLog
        Append the transaction operation to the transaction log.
        Specified by:
        append in interface TransactionLog
        Parameters:
        transactionMetadataEntry - TransactionMetadataEntry transaction metadata entry
        Returns:
        a future represents the result of this operation
      • deletePosition

        public java.util.concurrent.CompletableFuture<java.lang.Void> deletePosition​(java.util.List<org.apache.bookkeeper.mledger.Position> positions)
      • getManagedLedger

        public org.apache.bookkeeper.mledger.ManagedLedger getManagedLedger()