Class EmbeddedCounterManager
java.lang.Object
org.infinispan.counter.impl.manager.EmbeddedCounterManager
- All Implemented Interfaces:
org.infinispan.counter.api.CounterManager
@MBean(objectName="CounterManager",
description="Component to manage counters")
public class EmbeddedCounterManager
extends Object
implements org.infinispan.counter.api.CounterManager
A
CounterManager implementation for embedded cache manager.- Since:
- 9.0
- Author:
- Pedro Ruivo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandefineCounter(String name, org.infinispan.counter.api.CounterConfiguration configuration) defineCounterAsync(String name, org.infinispan.counter.api.CounterConfiguration configuration) org.infinispan.counter.api.CounterConfigurationgetConfiguration(String counterName) CompletableFuture<org.infinispan.counter.api.CounterConfiguration> getConfigurationAsync(String name) getCounterConfiguration(String counterName) getOrCreateAsync(String counterName) org.infinispan.counter.api.StrongCountergetStrongCounter(String name) CompletionStage<org.infinispan.counter.api.StrongCounter> getStrongCounterAsync(String counterName) longorg.infinispan.counter.api.WeakCountergetWeakCounter(String name) CompletionStage<org.infinispan.counter.api.WeakCounter> getWeakCounterAsync(String counterName) booleanisDefinedAsync(String name) voidremoveAsync(String counterName, boolean keepConfig) voidvoidstart()voidstop()voidundefineCounter(String counterName)
-
Field Details
-
OBJECT_NAME
- See Also:
-
-
Constructor Details
-
EmbeddedCounterManager
public EmbeddedCounterManager()
-
-
Method Details
-
start
public void start() -
stop
public void stop() -
remove
@ManagedOperation(description="Removes the counter\'s value from the cluster. The counter will be re-created when access next time.", displayName="Remove Counter", name="remove") public void remove(String counterName) - Specified by:
removein interfaceorg.infinispan.counter.api.CounterManager
-
removeAsync
-
undefineCounter
- Specified by:
undefineCounterin interfaceorg.infinispan.counter.api.CounterManager
-
getStrongCounter
- Specified by:
getStrongCounterin interfaceorg.infinispan.counter.api.CounterManager
-
getStrongCounterAsync
public CompletionStage<org.infinispan.counter.api.StrongCounter> getStrongCounterAsync(String counterName) -
getWeakCounter
- Specified by:
getWeakCounterin interfaceorg.infinispan.counter.api.CounterManager
-
getWeakCounterAsync
public CompletionStage<org.infinispan.counter.api.WeakCounter> getWeakCounterAsync(String counterName) -
getOrCreateAsync
-
getCounterNames
@ManagedOperation(description="Returns a collection of defined counter\'s name.", displayName="Get Defined Counters", name="counters") public Collection<String> getCounterNames()- Specified by:
getCounterNamesin interfaceorg.infinispan.counter.api.CounterManager
-
defineCounterAsync
public CompletableFuture<Boolean> defineCounterAsync(String name, org.infinispan.counter.api.CounterConfiguration configuration) -
defineCounter
public boolean defineCounter(String name, org.infinispan.counter.api.CounterConfiguration configuration) - Specified by:
defineCounterin interfaceorg.infinispan.counter.api.CounterManager
-
isDefined
- Specified by:
isDefinedin interfaceorg.infinispan.counter.api.CounterManager
-
getConfiguration
- Specified by:
getConfigurationin interfaceorg.infinispan.counter.api.CounterManager
-
getConfigurationAsync
public CompletableFuture<org.infinispan.counter.api.CounterConfiguration> getConfigurationAsync(String name) -
getValue
@ManagedOperation(description="Returns the current counter\'s value", displayName="Get Counter\' Value", name="value") public long getValue(String counterName) -
reset
@ManagedOperation(description="Resets the counter\'s value", displayName="Reset Counter", name="reset") public void reset(String counterName) -
getCounterConfiguration
@ManagedOperation(description="Returns the counter\'s configuration", displayName="Counter Configuration", name="configuration") public Properties getCounterConfiguration(String counterName) -
isDefinedAsync
-