Package org.onosproject.store.service
Class ConsistentMapOptions<O extends ConsistentMapOptions<O,K,V>,K,V>
- java.lang.Object
-
- org.onosproject.store.primitives.DistributedPrimitiveOptions<O>
-
- org.onosproject.store.service.ConsistentMapOptions<O,K,V>
-
- Type Parameters:
K
- type for map keyV
- type for map value
- Direct Known Subclasses:
ConsistentMapBuilder
public abstract class ConsistentMapOptions<O extends ConsistentMapOptions<O,K,V>,K,V> extends DistributedPrimitiveOptions<O>
Builder forConsistentMap
instances.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.function.BiFunction<V,Version,V>
compatibilityFunction
-
Constructor Summary
Constructors Constructor Description ConsistentMapOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
nullValues()
Returns whether null values are supported by the map.boolean
purgeOnUninstall()
Returns if map entries need to be cleared when owning application is uninstalled.O
withCompatibilityFunction(java.util.function.BiFunction<V,Version,V> compatibilityFunction)
Sets a compatibility function on the map.O
withNullValues()
Enables null values in the map.O
withPurgeOnUninstall()
Clears map contents when the owning application is uninstalled.-
Methods inherited from class org.onosproject.store.primitives.DistributedPrimitiveOptions
applicationId, meteringEnabled, name, partitionsDisabled, readOnly, relaxedReadConsistency, revisionType, serializer, type, version, withApplicationId, withName, withRelaxedReadConsistency, withRevisionType, withSerializer, withUpdatesDisabled, withVersion
-
-
-
-
Method Detail
-
withNullValues
public O withNullValues()
Enables null values in the map.- Returns:
- this builder
-
withPurgeOnUninstall
public O withPurgeOnUninstall()
Clears map contents when the owning application is uninstalled.- Returns:
- this builder
-
withCompatibilityFunction
public O withCompatibilityFunction(java.util.function.BiFunction<V,Version,V> compatibilityFunction)
Sets a compatibility function on the map.- Parameters:
compatibilityFunction
- the compatibility function- Returns:
- the consistent map builder
-
nullValues
public boolean nullValues()
Returns whether null values are supported by the map.- Returns:
true
if null values are supported;false
otherwise
-
purgeOnUninstall
public boolean purgeOnUninstall()
Returns if map entries need to be cleared when owning application is uninstalled.- Returns:
true
if yes;false
otherwise.
-
-