Class MLTransactionLogImpl
- java.lang.Object
-
- org.apache.pulsar.transaction.coordinator.impl.MLTransactionLogImpl
-
- All Implemented Interfaces:
TransactionLog
public class MLTransactionLogImpl extends java.lang.Object implements TransactionLog
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTRANSACTION_LOG_PREFIXstatic java.lang.StringTRANSACTION_SUBSCRIPTION_NAME
-
Constructor Summary
Constructors Constructor Description MLTransactionLogImpl(TransactionCoordinatorID tcID, org.apache.bookkeeper.mledger.ManagedLedgerFactory managedLedgerFactory, org.apache.bookkeeper.mledger.ManagedLedgerConfig managedLedgerConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<org.apache.bookkeeper.mledger.Position>append(TransactionMetadataEntry transactionMetadataEntry)Append the transaction operation to the transaction log.java.util.concurrent.CompletableFuture<java.lang.Void>closeAsync()Close the transaction log.java.util.concurrent.CompletableFuture<java.lang.Void>deletePosition(java.util.List<org.apache.bookkeeper.mledger.Position> positions)org.apache.bookkeeper.mledger.ManagedLedgergetManagedLedger()static org.apache.pulsar.common.naming.TopicNamegetMLTransactionLogName(TransactionCoordinatorID tcID)java.util.concurrent.CompletableFuture<java.lang.Void>initialize()Initialize the TransactionLog implementation.voidreplayAsync(TransactionLogReplayCallback transactionLogReplayCallback)Replay transaction log to load the transaction map.
-
-
-
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:TransactionLogInitialize the TransactionLog implementation.- Specified by:
initializein interfaceTransactionLog
-
replayAsync
public void replayAsync(TransactionLogReplayCallback transactionLogReplayCallback)
Description copied from interface:TransactionLogReplay transaction log to load the transaction map.- Specified by:
replayAsyncin interfaceTransactionLog- Parameters:
transactionLogReplayCallback- the call back for replaying the transaction log
-
closeAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
Description copied from interface:TransactionLogClose the transaction log.- Specified by:
closeAsyncin interfaceTransactionLog
-
append
public java.util.concurrent.CompletableFuture<org.apache.bookkeeper.mledger.Position> append(TransactionMetadataEntry transactionMetadataEntry)
Description copied from interface:TransactionLogAppend the transaction operation to the transaction log.- Specified by:
appendin interfaceTransactionLog- Parameters:
transactionMetadataEntry-TransactionMetadataEntrytransaction 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()
-
-