Interface PartitionAttributes
Deprecated.
Provide a way to describe a partition using a collection of attributes. Typically only a single type of any
particular
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.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classDeprecated.A key identifies a specific object in aPartitionAttributes. -
Method Summary
Modifier and TypeMethodDescriptiondefault <T> booleancontains(PartitionAttributes.Key<T> key) Deprecated.Determine if there is a value associated withkey.voidforEach(BiConsumer<PartitionAttributes.Key, Object> action) Deprecated.Iterate over the key/value pairs in this collection.<T> Tget(PartitionAttributes.Key<T> key) Deprecated.Get the value associated withkey.booleanisEmpty()Deprecated.Determine if there are no key/value pairs in this collection.intsize()Deprecated.Determine how many key/value pairs are contained in this collection.
-
Method Details
-
get
Deprecated.Get the value associated withkey.- Type Parameters:
T- The expected value type associated withkey.- Parameters:
key- The key to lookup.- Returns:
- the value associated with
key, ornull.
-
contains
Deprecated.Determine if there is a value associated withkey.- Type Parameters:
T- The expected value type associated withkey.- Parameters:
key- The key to check if there is any associated value for.- Returns:
trueif there is a value associated withkey.
-
forEach
Deprecated.Iterate over the key/value pairs in this collection.- Parameters:
action- Invoked for each key/value pair in this collection.
-
size
int size()Deprecated.Determine how many key/value pairs are contained in this collection.- Returns:
- the number of key/value pairs are contained in this collection.
-
isEmpty
boolean isEmpty()Deprecated.Determine if there are no key/value pairs in this collection.- Returns:
trueif there are no key/value pairs in this collection.
-
ClientGroupas an alternative or reach out to the maintainers describing the use-case.