public class MLTransactionLogImpl extends Object implements TransactionLog
| Modifier and Type | Field and Description |
|---|---|
static String |
TRANSACTION_LOG_PREFIX |
static String |
TRANSACTION_SUBSCRIPTION_NAME |
| Constructor and Description |
|---|
MLTransactionLogImpl(TransactionCoordinatorID tcID,
ManagedLedgerFactory managedLedgerFactory,
ManagedLedgerConfig managedLedgerConfig) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Position> |
append(TransactionMetadataEntry transactionMetadataEntry)
Append the transaction operation to the transaction log.
|
CompletableFuture<Void> |
closeAsync()
Close the transaction log.
|
CompletableFuture<Void> |
deletePosition(List<Position> positions) |
ManagedLedger |
getManagedLedger() |
static TopicName |
getMLTransactionLogName(TransactionCoordinatorID tcID) |
CompletableFuture<Void> |
initialize()
Initialize the TransactionLog implementation.
|
void |
replayAsync(TransactionLogReplayCallback transactionLogReplayCallback)
Replay transaction log to load the transaction map.
|
public static final String TRANSACTION_LOG_PREFIX
public static final String TRANSACTION_SUBSCRIPTION_NAME
public MLTransactionLogImpl(TransactionCoordinatorID tcID, ManagedLedgerFactory managedLedgerFactory, ManagedLedgerConfig managedLedgerConfig)
public static TopicName getMLTransactionLogName(TransactionCoordinatorID tcID)
public CompletableFuture<Void> initialize()
TransactionLoginitialize in interface TransactionLogpublic void replayAsync(TransactionLogReplayCallback transactionLogReplayCallback)
TransactionLogreplayAsync in interface TransactionLogtransactionLogReplayCallback - the call back for replaying the transaction logpublic CompletableFuture<Void> closeAsync()
TransactionLogcloseAsync in interface TransactionLogpublic CompletableFuture<Position> append(TransactionMetadataEntry transactionMetadataEntry)
TransactionLogappend in interface TransactionLogtransactionMetadataEntry - TransactionMetadataEntry transaction metadata entrypublic CompletableFuture<Void> deletePosition(List<Position> positions)
public ManagedLedger getManagedLedger()
Copyright © 2017–2022 Apache Software Foundation. All rights reserved.