Class AllBrokersStrategy.AllBrokersFuture<V>
java.lang.Object
org.apache.kafka.clients.admin.internals.AllBrokersStrategy.AllBrokersFuture<V>
- All Implemented Interfaces:
AdminApiFuture<AllBrokersStrategy.BrokerKey,V>
- Enclosing class:
AllBrokersStrategy
public static class AllBrokersStrategy.AllBrokersFuture<V>
extends Object
implements AdminApiFuture<AllBrokersStrategy.BrokerKey,V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.kafka.clients.admin.internals.AdminApiFuture
AdminApiFuture.SimpleAdminApiFuture<K,V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.common.internals.KafkaFutureImpl<Map<Integer, org.apache.kafka.common.internals.KafkaFutureImpl<V>>> all()voidcomplete(Map<AllBrokersStrategy.BrokerKey, V> values) Complete the futures associated with the given keys.voidComplete the futures associated with the given keys exceptionally.voidcompleteLookup(Map<AllBrokersStrategy.BrokerKey, Integer> brokerMapping) Invoked when lookup of a set of keys succeeds.voidcompleteLookupExceptionally(Map<AllBrokersStrategy.BrokerKey, Throwable> lookupErrors) Invoked when lookup fails with a fatal error on a set of keys.The initial set of lookup keys.
-
Constructor Details
-
AllBrokersFuture
public AllBrokersFuture()
-
-
Method Details
-
lookupKeys
Description copied from interface:AdminApiFutureThe initial set of lookup keys. Although this will usually match the fulfillment keys, it does not necessarily have to. For example, in the case ofAllBrokersStrategy.AllBrokersFuture, we use the lookup phase in order to discover the set of keys that will be searched during the fulfillment phase.- Specified by:
lookupKeysin interfaceAdminApiFuture<AllBrokersStrategy.BrokerKey,V> - Returns:
- non-empty set of initial lookup keys
-
completeLookup
Description copied from interface:AdminApiFutureInvoked when lookup of a set of keys succeeds.- Specified by:
completeLookupin interfaceAdminApiFuture<AllBrokersStrategy.BrokerKey,V> - Parameters:
brokerMapping- the discovered mapping from key to the respective brokerId that will handle the fulfillment request
-
completeLookupExceptionally
Description copied from interface:AdminApiFutureInvoked when lookup fails with a fatal error on a set of keys.- Specified by:
completeLookupExceptionallyin interfaceAdminApiFuture<AllBrokersStrategy.BrokerKey,V> - Parameters:
lookupErrors- the set of keys that failed lookup with their respective errors
-
complete
Description copied from interface:AdminApiFutureComplete the futures associated with the given keys.- Specified by:
completein interfaceAdminApiFuture<AllBrokersStrategy.BrokerKey,V> - Parameters:
values- the completed keys with their respective values
-
completeExceptionally
Description copied from interface:AdminApiFutureComplete the futures associated with the given keys exceptionally.- Specified by:
completeExceptionallyin interfaceAdminApiFuture<AllBrokersStrategy.BrokerKey,V> - Parameters:
errors- the failed keys with their respective errors
-
all
-