Interface CounterConfigurationBuilder<T extends AbstractCounterConfiguration,S extends CounterConfigurationBuilder<T,S>>
- All Superinterfaces:
org.infinispan.commons.configuration.Builder<T>,org.infinispan.commons.configuration.Self<S>
- All Known Implementing Classes:
StrongCounterConfigurationBuilder,WeakCounterConfigurationBuilder
public interface CounterConfigurationBuilder<T extends AbstractCounterConfiguration,S extends CounterConfigurationBuilder<T,S>>
extends org.infinispan.commons.configuration.Builder<T>, org.infinispan.commons.configuration.Self<S>
Base counter configuration builder.
It allows to configure the name, initial value and the Storage mode. The counter's name is required.
- Since:
- 9.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptioninitialValue(long initialValue) Sets the counter's initial value.name()Sets the counter's name.storage(org.infinispan.counter.api.Storage mode) Sets the counter's storage mode.Methods inherited from interface org.infinispan.commons.configuration.Builder
attributes, create, read, read, reset, validateMethods inherited from interface org.infinispan.commons.configuration.Self
self
-
Method Details
-
name
Sets the counter's name.This attribute is required.
- Parameters:
name- the counter's name.
-
name
String name() -
initialValue
Sets the counter's initial value.Default value is zero.
- Parameters:
initialValue- the counter's initial value.
-
storage
Sets the counter's storage mode.Default value is
Storage.VOLATILE.- Parameters:
mode- the counter's storage mode.- See Also:
-
Storage
-
addStrongCounter
StrongCounterConfigurationBuilder addStrongCounter()- Returns:
- a new builder to configure a strong counter.
-
addWeakCounter
WeakCounterConfigurationBuilder addWeakCounter()- Returns:
- a new builder to configure a weak counter.
-