public class TransactionMetaStoreHandler extends Object implements Closeable, io.netty.util.TimerTask
| Modifier and Type | Field and Description |
|---|---|
protected PulsarClientImpl |
client |
protected io.netty.util.Timer |
timer |
protected String |
topic |
| Constructor and Description |
|---|
TransactionMetaStoreHandler(long transactionCoordinatorId,
PulsarClientImpl pulsarClient,
String topic,
CompletableFuture<Void> connectFuture) |
protected final io.netty.util.Timer timer
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<Subscription> subscriptionList)
public void handleAddSubscriptionToTxnResponse(CommandAddSubscriptionToTxnResponse response)
public CompletableFuture<Void> endTxnAsync(TxnID txnID, TxnAction action)
public static TransactionCoordinatorClientException getExceptionByServerError(ServerError serverError, String msg)
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 org.apache.pulsar.client.impl.HandlerState.State getConnectHandleState()
public String getHandlerName()
protected boolean changeToReadyState()
protected boolean changeToRegisteringSchemaState()
protected org.apache.pulsar.client.impl.HandlerState.State getState()
protected boolean changeToConnecting()
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–2022 Apache Software Foundation. All rights reserved.