Class HostInfo

java.lang.Object
org.apache.kafka.streams.state.HostInfo

public class HostInfo extends Object
Represents a user defined endpoint in a KafkaStreams application. Instances of this class can be obtained by calling one of: KafkaStreams.metadataForAllStreamsClients() KafkaStreams.streamsMetadataForStore(String) The HostInfo is constructed during Partition Assignment see StreamsPartitionAssignor It is extracted from the config StreamsConfig.APPLICATION_SERVER_CONFIG If developers wish to expose an endpoint in their KafkaStreams applications they should provide the above config.
  • Constructor Details Link icon

    • HostInfo Link icon

      public HostInfo(String host, int port)
  • Method Details Link icon

    • buildFromEndpoint Link icon

      public static HostInfo buildFromEndpoint(String endPoint)
      Returns:
      a new HostInfo or null if endPoint is null or has no characters
      Throws:
      ConfigException - if the host or port cannot be parsed from the given endpoint string
    • unavailable Link icon

      public static HostInfo unavailable()
      Returns:
      a sentinel for cases where the host metadata is currently unavailable, eg during rebalance operations.
    • equals Link icon

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode Link icon

      public int hashCode()
      Overrides:
      hashCode in class Object
    • host Link icon

      public String host()
    • port Link icon

      public int port()
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object