Package org.apache.kafka.streams.state
Class StreamsMetadata
- java.lang.Object
-
- org.apache.kafka.streams.state.StreamsMetadata
-
@Evolving public class StreamsMetadata extends java.lang.Object
Represents the state of an instance (process) in aKafkaStreams
application. It contains the user suppliedHostInfo
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 ofTopicPartition
s available on the instance. NOTE: This is a point in time view. It may change when rebalances happen.
-
-
Field Summary
Fields Modifier and Type Field Description static StreamsMetadata
NOT_AVAILABLE
Sentinel to indicate that the StreamsMetadata is currently unavailable.
-
Constructor Summary
Constructors Constructor Description StreamsMetadata(HostInfo hostInfo, java.util.Set<java.lang.String> stateStoreNames, java.util.Set<org.apache.kafka.common.TopicPartition> topicPartitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.String
host()
HostInfo
hostInfo()
int
port()
java.util.Set<java.lang.String>
stateStoreNames()
java.util.Set<org.apache.kafka.common.TopicPartition>
topicPartitions()
java.lang.String
toString()
-
-
-
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.
-
-
Constructor Detail
-
StreamsMetadata
public StreamsMetadata(HostInfo hostInfo, java.util.Set<java.lang.String> stateStoreNames, java.util.Set<org.apache.kafka.common.TopicPartition> topicPartitions)
-
-
Method Detail
-
hostInfo
public HostInfo hostInfo()
-
stateStoreNames
public java.util.Set<java.lang.String> stateStoreNames()
-
topicPartitions
public java.util.Set<org.apache.kafka.common.TopicPartition> topicPartitions()
-
host
public java.lang.String host()
-
port
public int port()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-