Class DescribeTransactionsHandler
java.lang.Object
org.apache.kafka.clients.admin.internals.AdminApiHandler.Batched<CoordinatorKey,TransactionDescription>
org.apache.kafka.clients.admin.internals.DescribeTransactionsHandler
- All Implemented Interfaces:
AdminApiHandler<CoordinatorKey,TransactionDescription>
public class DescribeTransactionsHandler
extends AdminApiHandler.Batched<CoordinatorKey,TransactionDescription>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.kafka.clients.admin.internals.AdminApiHandler
AdminApiHandler.ApiResult<K,V>, AdminApiHandler.Batched<K, V>, AdminApiHandler.RequestAndKeys<K>, AdminApiHandler.Unbatched<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionDescribeTransactionsHandler(org.apache.kafka.common.utils.LogContext logContext) -
Method Summary
Modifier and TypeMethodDescriptionapiName()Get a user-friendly name for the API this handler is implementing.org.apache.kafka.common.requests.DescribeTransactionsRequest.BuilderbuildBatchedRequest(int brokerId, Set<CoordinatorKey> keys) handleResponse(org.apache.kafka.common.Node broker, Set<CoordinatorKey> keys, org.apache.kafka.common.requests.AbstractResponse abstractResponse) Callback that is invoked when a request returns successfully.Get the lookup strategy that is responsible for finding the brokerId which will handle each respective key.newFuture(Collection<String> transactionalIds) Methods inherited from class org.apache.kafka.clients.admin.internals.AdminApiHandler.Batched
buildRequestMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.clients.admin.internals.AdminApiHandler
handleUnsupportedVersionException
-
Constructor Details
-
DescribeTransactionsHandler
public DescribeTransactionsHandler(org.apache.kafka.common.utils.LogContext logContext)
-
-
Method Details
-
newFuture
public static AdminApiFuture.SimpleAdminApiFuture<CoordinatorKey,TransactionDescription> newFuture(Collection<String> transactionalIds) -
apiName
Description copied from interface:AdminApiHandlerGet a user-friendly name for the API this handler is implementing. -
lookupStrategy
Description copied from interface:AdminApiHandlerGet the lookup strategy that is responsible for finding the brokerId which will handle each respective key.- Returns:
- non-null lookup strategy
-
buildBatchedRequest
public org.apache.kafka.common.requests.DescribeTransactionsRequest.Builder buildBatchedRequest(int brokerId, Set<CoordinatorKey> keys) -
handleResponse
public AdminApiHandler.ApiResult<CoordinatorKey,TransactionDescription> handleResponse(org.apache.kafka.common.Node broker, Set<CoordinatorKey> keys, org.apache.kafka.common.requests.AbstractResponse abstractResponse) Description copied from interface:AdminApiHandlerCallback that is invoked when a request returns successfully. The handler should parse the response, check for errors, and return a result which indicates which keys (if any) have either been completed or failed with an unrecoverable error. It is also possible that the response indicates an incorrect target brokerId (e.g. in the case of a NotLeader error when the request is bound for a partition leader). In this case the key will be "unmapped" from the target brokerId and lookup will be retried. Note that keys which received a retriable error should be left out of the result. They will be retried automatically.- Parameters:
broker- the broker that the associated request was sent tokeys- the set of keys from the associated requestabstractResponse- the response received from the broker- Returns:
- result indicating key completion, failure, and unmapping
-