Class CreateTopicsResult

java.lang.Object
org.apache.kafka.clients.admin.CreateTopicsResult

@Evolving public class CreateTopicsResult extends Object
The result of Admin.createTopics(Collection). The API of this class is evolving, see Admin for details.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CreateTopicsResult(Map<String,org.apache.kafka.common.KafkaFuture<CreateTopicsResult.TopicMetadataAndConfig>> futures)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.kafka.common.KafkaFuture<Void>
    all()
    Return a future which succeeds if all the topic creations succeed.
    org.apache.kafka.common.KafkaFuture<Config>
    config(String topic)
    Returns a future that provides topic configs for the topic when the request completes.
    org.apache.kafka.common.KafkaFuture<Integer>
    Returns a future that provides number of partitions in the topic when the request completes.
    org.apache.kafka.common.KafkaFuture<Integer>
    Returns a future that provides replication factor for the topic when the request completes.
    org.apache.kafka.common.KafkaFuture<org.apache.kafka.common.Uuid>
    topicId(String topic)
    Returns a future that provides topic ID for the topic when the request completes.
    Map<String,org.apache.kafka.common.KafkaFuture<Void>>
    Return a map from topic names to futures, which can be used to check the status of individual topic creations.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • values

      public Map<String,org.apache.kafka.common.KafkaFuture<Void>> values()
      Return a map from topic names to futures, which can be used to check the status of individual topic creations.
    • all

      public org.apache.kafka.common.KafkaFuture<Void> all()
      Return a future which succeeds if all the topic creations succeed.
    • config

      public org.apache.kafka.common.KafkaFuture<Config> config(String topic)
      Returns a future that provides topic configs for the topic when the request completes.

      If broker version doesn't support replication factor in the response, throw UnsupportedVersionException. If broker returned an error for topic configs, throw appropriate exception. For example, TopicAuthorizationException is thrown if user does not have permission to describe topic configs.

    • topicId

      public org.apache.kafka.common.KafkaFuture<org.apache.kafka.common.Uuid> topicId(String topic)
      Returns a future that provides topic ID for the topic when the request completes.

      If broker version doesn't support replication factor in the response, throw UnsupportedVersionException. If broker returned an error for topic configs, throw appropriate exception. For example, TopicAuthorizationException is thrown if user does not have permission to describe topic configs.

    • numPartitions

      public org.apache.kafka.common.KafkaFuture<Integer> numPartitions(String topic)
      Returns a future that provides number of partitions in the topic when the request completes.

      If broker version doesn't support replication factor in the response, throw UnsupportedVersionException. If broker returned an error for topic configs, throw appropriate exception. For example, TopicAuthorizationException is thrown if user does not have permission to describe topic configs.

    • replicationFactor

      public org.apache.kafka.common.KafkaFuture<Integer> replicationFactor(String topic)
      Returns a future that provides replication factor for the topic when the request completes.

      If broker version doesn't support replication factor in the response, throw UnsupportedVersionException. If broker returned an error for topic configs, throw appropriate exception. For example, TopicAuthorizationException is thrown if user does not have permission to describe topic configs.