public class KeyQueryMetadata extends Object
KafkaStreams
application.
It contains the active HostInfo
and a set of standby HostInfo
s, denoting the instances where the key resides.
It also contains the partition number where the key belongs, which could be useful when used in conjunction with other APIs.
e.g: Relating with lags for that store partition.
NOTE: This is a point in time view. It may change as rebalances happen.Modifier and Type | Field and Description |
---|---|
static KeyQueryMetadata |
NOT_AVAILABLE
Sentinel to indicate that the KeyQueryMetadata is currently unavailable.
|
Constructor and Description |
---|
KeyQueryMetadata(HostInfo activeHost,
Set<HostInfo> standbyHosts,
int partition) |
Modifier and Type | Method and Description |
---|---|
HostInfo |
activeHost()
Get the active Kafka Streams instance for given key.
|
boolean |
equals(Object obj) |
HostInfo |
getActiveHost()
Deprecated.
Use
activeHost() instead. |
int |
getPartition()
Deprecated.
Use
partition() instead. |
Set<HostInfo> |
getStandbyHosts()
Deprecated.
Use
standbyHosts() instead. |
int |
hashCode() |
int |
partition()
Get the store partition corresponding to the key.
|
Set<HostInfo> |
standbyHosts()
Get the Kafka Streams instances that host the key as standbys.
|
String |
toString() |
public static final KeyQueryMetadata NOT_AVAILABLE
@Deprecated public HostInfo getActiveHost()
activeHost()
instead.HostInfo
@Deprecated public Set<HostInfo> getStandbyHosts()
standbyHosts()
instead.HostInfo
or a empty set, if no standbys are configured@Deprecated public int getPartition()
partition()
instead.public HostInfo activeHost()
HostInfo
public Set<HostInfo> standbyHosts()
HostInfo
or a empty set, if no standbys are configuredpublic int partition()