Package org.onosproject.store.primitives
Class DistributedPrimitiveOptions<O extends DistributedPrimitiveOptions<O>>
- java.lang.Object
-
- org.onosproject.store.primitives.DistributedPrimitiveOptions<O>
-
- Type Parameters:
O- distributed primitive options type
- Direct Known Subclasses:
AtomicCounterMapOptions,AtomicCounterOptions,AtomicIdGeneratorOptions,AtomicValueOptions,ConsistentMapOptions,ConsistentMultimapOptions,ConsistentTreeMapOptions,DistributedLockOptions,DistributedSetOptions,DocumentTreeOptions,LeaderElectorOptions,TopicOptions,TransactionContextOptions,WorkQueueOptions
public abstract class DistributedPrimitiveOptions<O extends DistributedPrimitiveOptions<O>> extends java.lang.ObjectAbstract builder for distributed primitives.
-
-
Constructor Summary
Constructors Constructor Description DistributedPrimitiveOptions(DistributedPrimitive.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationIdapplicationId()Returns the application identifier.booleanmeteringEnabled()Returns if metering is enabled.java.lang.Stringname()Returns the name of the primitive.booleanpartitionsDisabled()Returns if partitions are disabled.booleanreadOnly()Returns if updates are disabled.booleanrelaxedReadConsistency()Returns if consistency is relaxed for read operations.RevisionTyperevisionType()Returns the primitive revision type.Serializerserializer()Returns the serializer.DistributedPrimitive.Typetype()Returns the primitive type.Versionversion()Returns the primitive version.OwithApplicationId(ApplicationId applicationId)Sets the application id that owns this primitive.OwithName(java.lang.String name)Sets the primitive name.OwithRelaxedReadConsistency()Turns on relaxed consistency for read operations.OwithRevisionType(RevisionType revisionType)Sets the primitive revision type.OwithSerializer(Serializer serializer)Sets the serializer to use for transcoding info held in the primitive.OwithUpdatesDisabled()Disables state changing operations on the returned distributed primitive.OwithVersion(Version version)Sets the primitive version.
-
-
-
Constructor Detail
-
DistributedPrimitiveOptions
public DistributedPrimitiveOptions(DistributedPrimitive.Type type)
-
-
Method Detail
-
withName
public O withName(java.lang.String name)
Sets the primitive name.- Parameters:
name- primitive name- Returns:
- this builder
-
withSerializer
public O withSerializer(Serializer serializer)
Sets the serializer to use for transcoding info held in the primitive.- Parameters:
serializer- serializer- Returns:
- this builder
-
withApplicationId
public O withApplicationId(ApplicationId applicationId)
Sets the application id that owns this primitive.- Parameters:
applicationId- application identifier- Returns:
- this builder
-
withVersion
public O withVersion(Version version)
Sets the primitive version.- Parameters:
version- the primitive version- Returns:
- this builder
-
withRevisionType
public O withRevisionType(RevisionType revisionType)
Sets the primitive revision type.- Parameters:
revisionType- the revision type- Returns:
- this builder
-
withUpdatesDisabled
public O withUpdatesDisabled()
Disables state changing operations on the returned distributed primitive.- Returns:
- this builder
-
withRelaxedReadConsistency
public O withRelaxedReadConsistency()
Turns on relaxed consistency for read operations.- Returns:
- this builder
-
meteringEnabled
public final boolean meteringEnabled()
Returns if metering is enabled.- Returns:
trueif yes;falseotherwise
-
partitionsDisabled
public final boolean partitionsDisabled()
Returns if partitions are disabled.- Returns:
trueif yes;falseotherwise
-
readOnly
public final boolean readOnly()
Returns if updates are disabled.- Returns:
trueif yes;falseotherwise
-
relaxedReadConsistency
public final boolean relaxedReadConsistency()
Returns if consistency is relaxed for read operations.- Returns:
trueif yes;falseotherwise
-
serializer
public final Serializer serializer()
Returns the serializer.- Returns:
- serializer
-
applicationId
public final ApplicationId applicationId()
Returns the application identifier.- Returns:
- application id
-
name
public final java.lang.String name()
Returns the name of the primitive.- Returns:
- primitive name
-
type
public final DistributedPrimitive.Type type()
Returns the primitive type.- Returns:
- primitive type
-
version
public final Version version()
Returns the primitive version.- Returns:
- the primitive version
-
revisionType
public RevisionType revisionType()
Returns the primitive revision type.- Returns:
- the primitive revision type
-
-