public class TransactionMetaStoreHandler extends Object implements Closeable, io.netty.util.TimerTask
| Modifier and Type | Field and Description |
|---|---|
protected PulsarClientImpl |
client |
protected String |
topic |
| Constructor and Description |
|---|
TransactionMetaStoreHandler(long transactionCoordinatorId,
PulsarClientImpl pulsarClient,
String topic,
CompletableFuture<Void> connectFuture) |
protected final PulsarClientImpl client
protected final String topic
public TransactionMetaStoreHandler(long transactionCoordinatorId,
PulsarClientImpl pulsarClient,
String topic,
CompletableFuture<Void> connectFuture)
public void connectionFailed(PulsarClientException exception)
public void connectionOpened(ClientCnx cnx)
public CompletableFuture<TxnID> newTransactionAsync(long timeout, TimeUnit unit)
public CompletableFuture<Void> addPublishPartitionToTxnAsync(TxnID txnID, List<String> partitions)
public CompletableFuture<Void> addSubscriptionToTxn(TxnID txnID, List<PulsarApi.Subscription> subscriptionList)
public void handleAddSubscriptionToTxnResponse(PulsarApi.CommandAddSubscriptionToTxnResponse response)
public CompletableFuture<Void> commitAsync(TxnID txnID, List<MessageId> sendMessageIdList)
public CompletableFuture<Void> abortAsync(TxnID txnID, List<MessageId> sendMessageIdList)
public void run(io.netty.util.Timeout timeout)
throws Exception
run in interface io.netty.util.TimerTaskExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic String getHandlerName()
protected boolean changeToReadyState()
protected boolean changeToRegisteringSchemaState()
protected org.apache.pulsar.client.impl.HandlerState.State getState()
protected void setState(org.apache.pulsar.client.impl.HandlerState.State s)
protected org.apache.pulsar.client.impl.HandlerState.State getAndUpdateState(UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater)
public PulsarClientImpl getClient()
Copyright © 2017–2020 Apache Software Foundation. All rights reserved.