Interface PartitionAttributesBuilder
-
- All Known Implementing Classes:
DefaultPartitionAttributesBuilder
public interface PartitionAttributesBuilder
A builder forPartitionAttributes
objects. Duplicates are not necessarily detected/enforced via theadd(PartitionAttributes.Key, Object)
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> PartitionAttributesBuilder
add(PartitionAttributes.Key<T> key, T value)
Add a key/value pair to this builder.PartitionAttributes
build()
Build aPartitionAttributes
corresponding to the previousadd(PartitionAttributes.Key, Object)
calls.
-
-
-
Method Detail
-
add
<T> PartitionAttributesBuilder add(PartitionAttributes.Key<T> key, T value)
Add a key/value pair to this builder.Duplicate keys are not necessarily detected, and this will instead just add.
- Type Parameters:
T
- The value type.- Parameters:
key
- The key.value
- The value.- Returns:
this
.- Throws:
DuplicateAttributeException
- A best effort will be made to detect adding duplicate keys, and if a duplicate key is detected this exception will be thrown.
-
build
PartitionAttributes build()
Build aPartitionAttributes
corresponding to the previousadd(PartitionAttributes.Key, Object)
calls.- Returns:
- a
PartitionAttributes
corresponding to the previousadd(PartitionAttributes.Key, Object)
calls. - Throws:
DuplicateAttributeException
- If a duplicate key is detected this exception will be thrown.
-
-