Class DefaultPartitionAttributesBuilder
java.lang.Object
io.servicetalk.client.api.internal.partition.DefaultPartitionAttributesBuilder
- All Implemented Interfaces:
PartitionAttributesBuilder
@Deprecated
public final class DefaultPartitionAttributesBuilder
extends Object
implements PartitionAttributesBuilder
Deprecated.
Default implementation of
PartitionAttributesBuilder
.
This class provides a relatively low memory overhead (when compared to TreeMap
) for a
PartitionAttributes
. The goals are to provide fast Object.equals(Object)
and
Object.hashCode()
which do not require intermediate object allocation and pointer traversal
(e.g. Iterator
).
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPartitionAttributesBuilder
(int initialSize) Deprecated.Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionadd
(PartitionAttributes.Key<T> key, T value) Deprecated.Add a key/value pair to this builder.build()
Deprecated.Build aPartitionAttributes
corresponding to the previousPartitionAttributesBuilder.add(PartitionAttributes.Key, Object)
calls.
-
Constructor Details
-
DefaultPartitionAttributesBuilder
public DefaultPartitionAttributesBuilder(int initialSize) Deprecated.Create a new instance.- Parameters:
initialSize
- The anticipated number of key/value pairs that will be added viaadd(Key<T> key, T value)
.
-
-
Method Details
-
add
Deprecated.Description copied from interface:PartitionAttributesBuilder
Add a key/value pair to this builder.Duplicate keys are not necessarily detected, and this will instead just add.
- Specified by:
add
in interfacePartitionAttributesBuilder
- Type Parameters:
T
- The value type.- Parameters:
key
- The key.value
- The value.- Returns:
this
.
-
build
Deprecated.Description copied from interface:PartitionAttributesBuilder
Build aPartitionAttributes
corresponding to the previousPartitionAttributesBuilder.add(PartitionAttributes.Key, Object)
calls.- Specified by:
build
in interfacePartitionAttributesBuilder
- Returns:
- a
PartitionAttributes
corresponding to the previousPartitionAttributesBuilder.add(PartitionAttributes.Key, Object)
calls.
-
ClientGroup
as an alternative or reach out to the maintainers describing the use-case.