Class PersistedCounterConfigurationStorage
java.lang.Object
org.infinispan.counter.impl.manager.PersistedCounterConfigurationStorage
- All Implemented Interfaces:
CounterConfigurationStorage
public class PersistedCounterConfigurationStorage
extends Object
implements CounterConfigurationStorage
A persistent implementation of
CounterConfigurationStorage.
The counter's configuration will be stored (as xml format) in counters.xml file in GlobalStateConfiguration.sharedPersistentLocation()
- Since:
- 9.2
- Author:
- Pedro Ruivo
-
Constructor Summary
ConstructorsConstructorDescriptionPersistedCounterConfigurationStorage(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionloadAll()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
-
PersistedCounterConfigurationStorage
public PersistedCounterConfigurationStorage(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration)
-
-
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.
-