Class CounterConfigurationManager
java.lang.Object
org.infinispan.counter.impl.manager.CounterConfigurationManager
Stores all the defined counter's configuration.
It uses the state-Cache to distribute the counter's configuration among the nodes in the cluster, and the
CounterConfigurationStorage to persist persistent configurations.
Note that the Cache doesn't persist anything.
- Since:
- 9.2
- Author:
- Pedro Ruivo
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCounterConfigurationManager(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration) -
Method Summary
Modifier and TypeMethodDescriptiondefineConfiguration(String name, org.infinispan.counter.api.CounterConfiguration configuration) It defines a new counter with theCounterConfiguration.voidstart()It checks for existing defined configurations inCounterConfigurationStorageand in theCache.voidstop()Removes the listener for new coming defined counter's.
-
Field Details
-
COUNTER_SCOPE
- See Also:
-
-
Constructor Details
-
CounterConfigurationManager
public CounterConfigurationManager(org.infinispan.configuration.global.GlobalConfiguration globalConfiguration)
-
-
Method Details
-
start
public void start()It checks for existing defined configurations inCounterConfigurationStorageand in theCache.If any is found, it starts the counter's
Cache. -
stop
public void stop()Removes the listener for new coming defined counter's.The persistence is done on the fly when the configuration is defined.
-
defineConfiguration
public CompletableFuture<Boolean> defineConfiguration(String name, org.infinispan.counter.api.CounterConfiguration configuration) It defines a new counter with theCounterConfiguration.- Parameters:
name- the counter's name.configuration- the counter'sCounterConfiguration.- Returns:
trueif the counter doesn't exist.falseotherwise.
-
getCounterNames
- Returns:
- all the defined counter's name, even the one in Infinispan's configuration.
-