ClientGroup as an alternative or reach out to the maintainers describing
the use-case.@Deprecated
public interface PartitionAttributes
PartitionAttributes.Key exists in each PartitionAttributes. For example:
{ [Key(shard) = "shard X"], [Key(data center) = "data center X"], [Key(is main) = "false/true"] }
This construct allows for the attributes to partially specify a partition and preform "wild card" type matching.| Modifier and Type | Interface and Description |
|---|---|
static class |
PartitionAttributes.Key<T>
Deprecated.
A key identifies a specific object in a
PartitionAttributes. |
| Modifier and Type | Method and Description |
|---|---|
default <T> boolean |
contains(PartitionAttributes.Key<T> key)
Deprecated.
Determine if there is a value associated with
key. |
void |
forEach(BiConsumer<PartitionAttributes.Key,Object> action)
Deprecated.
Iterate over the key/value pairs in this collection.
|
<T> T |
get(PartitionAttributes.Key<T> key)
Deprecated.
Get the value associated with
key. |
boolean |
isEmpty()
Deprecated.
Determine if there are no key/value pairs in this collection.
|
int |
size()
Deprecated.
Determine how many key/value pairs are contained in this collection.
|
@Nullable <T> T get(PartitionAttributes.Key<T> key)
key.T - The expected value type associated with key.key - The key to lookup.key, or null.default <T> boolean contains(PartitionAttributes.Key<T> key)
key.T - The expected value type associated with key.key - The key to check if there is any associated value for.true if there is a value associated with key.void forEach(BiConsumer<PartitionAttributes.Key,Object> action)
action - Invoked for each key/value pair in this collection.int size()
boolean isEmpty()
true if there are no key/value pairs in this collection.