Search in sources :

Example 1 with AbortTransactionHandler

use of org.apache.kafka.clients.admin.internals.AbortTransactionHandler in project kafka by apache.

the class KafkaAdminClient method abortTransaction.

@Override
public AbortTransactionResult abortTransaction(AbortTransactionSpec spec, AbortTransactionOptions options) {
    AdminApiFuture.SimpleAdminApiFuture<TopicPartition, Void> future = AbortTransactionHandler.newFuture(Collections.singleton(spec.topicPartition()));
    AbortTransactionHandler handler = new AbortTransactionHandler(spec, logContext);
    invokeDriver(handler, future, options.timeoutMs);
    return new AbortTransactionResult(future.all());
}
Also used : AbortTransactionHandler(org.apache.kafka.clients.admin.internals.AbortTransactionHandler) AdminApiFuture(org.apache.kafka.clients.admin.internals.AdminApiFuture) SimpleAdminApiFuture(org.apache.kafka.clients.admin.internals.AdminApiFuture.SimpleAdminApiFuture) TopicPartition(org.apache.kafka.common.TopicPartition)

Aggregations

AbortTransactionHandler (org.apache.kafka.clients.admin.internals.AbortTransactionHandler)1 AdminApiFuture (org.apache.kafka.clients.admin.internals.AdminApiFuture)1 SimpleAdminApiFuture (org.apache.kafka.clients.admin.internals.AdminApiFuture.SimpleAdminApiFuture)1 TopicPartition (org.apache.kafka.common.TopicPartition)1