public class StreamsMetadata extends Object
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 TopicPartition
s available on the instance.
NOTE: This is a point in time view. It may change when rebalances happen.Modifier and Type | Field and Description |
---|---|
static StreamsMetadata |
NOT_AVAILABLE
Sentinel to indicate that the StreamsMetadata is currently unavailable.
|
Constructor and Description |
---|
StreamsMetadata(HostInfo hostInfo,
Set<String> stateStoreNames,
Set<TopicPartition> topicPartitions,
Set<String> standbyStateStoreNames,
Set<TopicPartition> standbyTopicPartitions) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
String |
host() |
HostInfo |
hostInfo()
The value of
StreamsConfig.APPLICATION_SERVER_CONFIG configured for the streams
instance, which is typically host/port |
int |
port() |
Set<String> |
standbyStateStoreNames()
State stores owned by the instance as a standby replica
|
Set<TopicPartition> |
standbyTopicPartitions()
(Source) Topic partitions for which the instance acts as standby.
|
Set<String> |
stateStoreNames()
State stores owned by the instance as an active replica
|
Set<TopicPartition> |
topicPartitions()
Topic partitions consumed by the instance as an active replica
|
String |
toString() |
public static final StreamsMetadata NOT_AVAILABLE
public StreamsMetadata(HostInfo hostInfo, Set<String> stateStoreNames, Set<TopicPartition> topicPartitions, Set<String> standbyStateStoreNames, Set<TopicPartition> standbyTopicPartitions)
public HostInfo hostInfo()
StreamsConfig.APPLICATION_SERVER_CONFIG
configured for the streams
instance, which is typically host/portHostInfo
corresponding to the streams instancepublic Set<String> stateStoreNames()
public Set<TopicPartition> topicPartitions()
public Set<TopicPartition> standbyTopicPartitions()
public Set<String> standbyStateStoreNames()
public String host()
public int port()