Class VolatileCounterConfigurationStorage
java.lang.Object
org.infinispan.counter.impl.manager.VolatileCounterConfigurationStorage
- All Implemented Interfaces:
CounterConfigurationStorage
public class VolatileCounterConfigurationStorage
extends Object
implements CounterConfigurationStorage
A volatile implementation of
CounterConfigurationStorage.
It throws an exception if it tries to store a Storage.PERSISTENT counter.
- Since:
- 9.2
- Author:
- Pedro Ruivo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(org.infinispan.manager.EmbeddedCacheManager cacheManager) Initializes this instance with theEmbeddedCacheManager.loadAll()Invoked when starts, it returns all the persisted counter's.voidRemove a counter configurationvoidPersists the counter's configuration.voidvalidatePersistence(org.infinispan.counter.api.CounterConfiguration configuration) Validates if theCounterConfigurationhas a validStorage.
-
Constructor Details
-
VolatileCounterConfigurationStorage
public VolatileCounterConfigurationStorage()
-
-
Method Details
-
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
Description copied from interface:CounterConfigurationStoragePersists the counter's configuration.- Specified by:
storein interfaceCounterConfigurationStorage- Parameters:
name- the counter's name.configuration- the counter'sCounterConfiguration.
-
remove
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.
-
initialize
public void initialize(org.infinispan.manager.EmbeddedCacheManager cacheManager) Description copied from interface:CounterConfigurationStorageInitializes this instance with theEmbeddedCacheManager.- Specified by:
initializein interfaceCounterConfigurationStorage- Parameters:
cacheManager- the cache manager.
-