Interface CounterConfigurationStorage
- All Known Implementing Classes:
PersistedCounterConfigurationStorage,VolatileCounterConfigurationStorage
public interface CounterConfigurationStorage
A local storage to persist counter's
CounterConfiguration.- Since:
- 9.2
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptionloadAll()Invoked when starts, it returns all the persisted counter's.voidRemove a counter configurationvoidstore(String name, CounterConfiguration configuration) Persists the counter's configuration.voidvalidatePersistence(CounterConfiguration configuration) Validates if theCounterConfigurationhas a validStorage.
-
Method Details
-
loadAll
Map<String,CounterConfiguration> loadAll()Invoked when starts, it returns all the persisted counter's.- Returns:
- all the persisted counter's name and configurations.
-
store
Persists the counter's configuration.- Parameters:
name- the counter's name.configuration- the counter'sCounterConfiguration.
-
remove
Remove a counter configuration- Parameters:
name- the counter's name.
-
validatePersistence
Validates if theCounterConfigurationhas a validStorage.It throws an exception if the implementation doesn't support one or more
Storagemodes.- Parameters:
configuration- theCounterConfigurationto check.
-