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 |
---|---|
boolean |
equals(Object obj) |
HostInfo |
getActiveHost()
Get the Active streams instance for given key
|
int |
getPartition()
Get the Store partition corresponding to the key.
|
Set<HostInfo> |
getStandbyHosts()
Get the Streams instances that host the key as standbys
|
int |
hashCode() |
String |
toString() |
public static final KeyQueryMetadata NOT_AVAILABLE
public HostInfo getActiveHost()
HostInfo
public Set<HostInfo> getStandbyHosts()
HostInfo
or a empty set, if no standbys are configuredpublic int getPartition()