Package org.apache.kafka.clients.admin
Class ListTransactionsResult
java.lang.Object
org.apache.kafka.clients.admin.ListTransactionsResult
@Evolving public class ListTransactionsResult extends Object
The result of the
Admin.listTransactions()
call.
The API of this class is evolving, see Admin
for details.
-
Method Summary
Modifier and Type Method Description KafkaFuture<Collection<TransactionListing>>
all()
Get all transaction listings.KafkaFuture<Map<Integer,Collection<TransactionListing>>>
allByBrokerId()
Get all transaction listings in a map which is keyed by the ID of respective broker that is currently managing them.KafkaFuture<Map<Integer,KafkaFuture<Collection<TransactionListing>>>>
byBrokerId()
Get a future which returns a map containing the underlying listing future for each broker in the cluster.
-
Method Details
-
all
Get all transaction listings. If any of the underlying requests fail, then the future returned from this method will also fail with the first encountered error.- Returns:
- A future containing the collection of transaction listings. The future completes when all transaction listings are available and fails after any non-retriable error.
-
byBrokerId
Get a future which returns a map containing the underlying listing future for each broker in the cluster. This is useful, for example, if a partial listing of transactions is sufficient, or if you want more granular error details.- Returns:
- A future containing a map of futures by broker which complete individually when their respective transaction listings are available. The top-level future returned from this method may fail if the admin client is unable to lookup the available brokers in the cluster.
-
allByBrokerId
Get all transaction listings in a map which is keyed by the ID of respective broker that is currently managing them. If any of the underlying requests fail, then the future returned from this method will also fail with the first encountered error.- Returns:
- A future containing a map from the broker ID to the transactions hosted by that broker respectively. This future completes when all transaction listings are available and fails after any non-retriable error.
-