Class StreamsMetadata


  • public class StreamsMetadata
    extends Object
    Represents the state of an instance (process) in a KafkaStreams application. It contains the user supplied HostInfo that can be used by developers to build APIs and services to connect to other instances, the Set of state stores available on the instance and the Set of TopicPartitions available on the instance. NOTE: This is a point in time view. It may change when rebalances happen.
    • Field Detail

      • NOT_AVAILABLE

        public static final StreamsMetadata NOT_AVAILABLE
        Sentinel to indicate that the StreamsMetadata is currently unavailable. This can occur during rebalance operations.
    • Method Detail

      • stateStoreNames

        public Set<String> stateStoreNames()
        State stores owned by the instance as an active replica
        Returns:
        set of active state store names
      • topicPartitions

        public Set<TopicPartition> topicPartitions()
        Topic partitions consumed by the instance as an active replica
        Returns:
        set of active topic partitions
      • standbyTopicPartitions

        public Set<TopicPartition> standbyTopicPartitions()
        (Source) Topic partitions for which the instance acts as standby.
        Returns:
        set of standby topic partitions
      • standbyStateStoreNames

        public Set<String> standbyStateStoreNames()
        State stores owned by the instance as a standby replica
        Returns:
        set of standby state store names
      • port

        public int port()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object