Enum VolatileCounterConfigurationStorage
- java.lang.Object
-
- java.lang.Enum<VolatileCounterConfigurationStorage>
-
- org.infinispan.counter.impl.manager.VolatileCounterConfigurationStorage
-
- All Implemented Interfaces:
Serializable,Comparable<VolatileCounterConfigurationStorage>,CounterConfigurationStorage
public enum VolatileCounterConfigurationStorage extends Enum<VolatileCounterConfigurationStorage> implements CounterConfigurationStorage
A volatile implementation ofCounterConfigurationStorage.It throws an exception if it tries to store a
Storage.PERSISTENTcounter.- Since:
- 9.2
- Author:
- Pedro Ruivo
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,org.infinispan.counter.api.CounterConfiguration>loadAll()Invoked when starts, it returns all the persisted counter's.voidremove(String name)Remove a counter configurationvoidstore(String name, org.infinispan.counter.api.CounterConfiguration configuration)Persists the counter's configuration.voidvalidatePersistence(org.infinispan.counter.api.CounterConfiguration configuration)Validates if theCounterConfigurationhas a validStorage.static VolatileCounterConfigurationStoragevalueOf(String name)Returns the enum constant of this type with the specified name.static VolatileCounterConfigurationStorage[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final VolatileCounterConfigurationStorage INSTANCE
-
-
Method Detail
-
values
public static VolatileCounterConfigurationStorage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (VolatileCounterConfigurationStorage c : VolatileCounterConfigurationStorage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VolatileCounterConfigurationStorage valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
loadAll
public Map<String,org.infinispan.counter.api.CounterConfiguration> loadAll()
Description copied from interface:CounterConfigurationStorageInvoked when starts, it returns all the persisted counter's.- Specified by:
loadAllin interfaceCounterConfigurationStorage- Returns:
- all the persisted counter's name and configurations.
-
store
public void store(String name, org.infinispan.counter.api.CounterConfiguration configuration)
Description copied from interface:CounterConfigurationStoragePersists the counter's configuration.- Specified by:
storein interfaceCounterConfigurationStorage- Parameters:
name- the counter's name.configuration- the counter'sCounterConfiguration.
-
remove
public void remove(String name)
Description copied from interface:CounterConfigurationStorageRemove a counter configuration- Specified by:
removein interfaceCounterConfigurationStorage- Parameters:
name- the counter's name.
-
validatePersistence
public void validatePersistence(org.infinispan.counter.api.CounterConfiguration configuration)
Description copied from interface:CounterConfigurationStorageValidates if theCounterConfigurationhas a validStorage.It throws an exception if the implementation doesn't support one or more
Storagemodes.- Specified by:
validatePersistencein interfaceCounterConfigurationStorage- Parameters:
configuration- theCounterConfigurationto check.
-
-