Class AdminApiFuture.SimpleAdminApiFuture<K,V>

java.lang.Object
org.apache.kafka.clients.admin.internals.AdminApiFuture.SimpleAdminApiFuture<K,V>
All Implemented Interfaces:
AdminApiFuture<K,V>
Enclosing interface:
AdminApiFuture<K,V>

public static class AdminApiFuture.SimpleAdminApiFuture<K,V> extends Object implements AdminApiFuture<K,V>
This class can be used when the set of keys is known ahead of time.
  • Constructor Details

    • SimpleAdminApiFuture

      public SimpleAdminApiFuture(Set<K> keys)
  • Method Details

    • lookupKeys

      public Set<K> lookupKeys()
      Description copied from interface: AdminApiFuture
      The initial set of lookup keys. Although this will usually match the fulfillment keys, it does not necessarily have to. For example, in the case of AllBrokersStrategy.AllBrokersFuture, we use the lookup phase in order to discover the set of keys that will be searched during the fulfillment phase.
      Specified by:
      lookupKeys in interface AdminApiFuture<K,V>
      Returns:
      non-empty set of initial lookup keys
    • complete

      public void complete(Map<K,V> values)
      Description copied from interface: AdminApiFuture
      Complete the futures associated with the given keys.
      Specified by:
      complete in interface AdminApiFuture<K,V>
      Parameters:
      values - the completed keys with their respective values
    • completeExceptionally

      public void completeExceptionally(Map<K,Throwable> errors)
      Description copied from interface: AdminApiFuture
      Complete the futures associated with the given keys exceptionally.
      Specified by:
      completeExceptionally in interface AdminApiFuture<K,V>
      Parameters:
      errors - the failed keys with their respective errors
    • all

      public Map<K,org.apache.kafka.common.KafkaFuture<V>> all()
    • get

      public org.apache.kafka.common.KafkaFuture<V> get(K key)