T
- distributed primitive typepublic abstract class DistributedPrimitiveBuilder<B extends DistributedPrimitiveBuilder<B,T>,T extends DistributedPrimitive>
extends java.lang.Object
Constructor and Description |
---|
DistributedPrimitiveBuilder(DistributedPrimitive.Type type) |
Modifier and Type | Method and Description |
---|---|
ApplicationId |
applicationId()
Returns the application identifier.
|
abstract T |
build()
Constructs an instance of the distributed primitive.
|
boolean |
meteringEnabled()
Returns if metering is enabled.
|
java.lang.String |
name()
Returns the name of the primitive.
|
boolean |
partitionsDisabled()
Returns if partitions are disabled.
|
boolean |
readOnly()
Returns if updates are disabled.
|
boolean |
relaxedReadConsistency()
Returns if consistency is relaxed for read operations.
|
Serializer |
serializer()
Returns the serializer.
|
DistributedPrimitive.Type |
type()
Returns the primitive type.
|
B |
withApplicationId(ApplicationId applicationId)
Sets the application id that owns this primitive.
|
B |
withMeteringDisabled()
Deprecated.
usage of this method is discouraged for most common scenarios.
|
B |
withName(java.lang.String name)
Sets the primitive name.
|
B |
withRelaxedReadConsistency()
Turns on relaxed consistency for read operations.
|
B |
withSerializer(Serializer serializer)
Sets the serializer to use for transcoding info held in the primitive.
|
B |
withUpdatesDisabled()
Disables state changing operations on the returned distributed primitive.
|
public DistributedPrimitiveBuilder(DistributedPrimitive.Type type)
public B withName(java.lang.String name)
name
- primitive namepublic B withSerializer(Serializer serializer)
serializer
- serializerpublic B withApplicationId(ApplicationId applicationId)
applicationId
- application identifier@Deprecated public B withMeteringDisabled()
public B withUpdatesDisabled()
public B withRelaxedReadConsistency()
public final boolean meteringEnabled()
true
if yes; false
otherwisepublic final boolean partitionsDisabled()
true
if yes; false
otherwisepublic final boolean readOnly()
true
if yes; false
otherwisepublic final boolean relaxedReadConsistency()
true
if yes; false
otherwisepublic final Serializer serializer()
public final ApplicationId applicationId()
public final java.lang.String name()
public final DistributedPrimitive.Type type()
public abstract T build()