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.CounterManagerACounterManagerimplementation for embedded cache manager.- Since:
- 9.0
- Author:
- Pedro Ruivo
-
-
Field Summary
Fields Modifier and Type Field Description static StringOBJECT_NAME
-
Constructor Summary
Constructors Constructor Description EmbeddedCounterManager(org.infinispan.manager.EmbeddedCacheManager cacheManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandefineCounter(String name, org.infinispan.counter.api.CounterConfiguration configuration)CompletableFuture<Boolean>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)PropertiesgetCounterConfiguration(String counterName)Collection<String>getCounterNames()org.infinispan.counter.api.StrongCountergetCreatedStrongCounter(String name)org.infinispan.counter.api.WeakCountergetCreatedWeakCounter(String name)org.infinispan.counter.api.StrongCountergetStrongCounter(String name)longgetValue(String counterName)org.infinispan.counter.api.WeakCountergetWeakCounter(String name)booleanisDefined(String name)CompletableFuture<Boolean>isDefinedAsync(String name)voidremove(String counterName)voidreset(String counterName)voidstart()voidstop()voidundefineCounter(String counterName)
-
-
-
Field Detail
-
OBJECT_NAME
public static final String OBJECT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
undefineCounter
public void undefineCounter(String counterName)
- Specified by:
undefineCounterin interfaceorg.infinispan.counter.api.CounterManager
-
getStrongCounter
public org.infinispan.counter.api.StrongCounter getStrongCounter(String name)
- Specified by:
getStrongCounterin interfaceorg.infinispan.counter.api.CounterManager
-
getCreatedStrongCounter
public org.infinispan.counter.api.StrongCounter getCreatedStrongCounter(String name)
-
getWeakCounter
public org.infinispan.counter.api.WeakCounter getWeakCounter(String name)
- Specified by:
getWeakCounterin interfaceorg.infinispan.counter.api.CounterManager
-
getCreatedWeakCounter
public org.infinispan.counter.api.WeakCounter getCreatedWeakCounter(String name)
-
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
public boolean isDefined(String name)
- Specified by:
isDefinedin interfaceorg.infinispan.counter.api.CounterManager
-
getConfiguration
public org.infinispan.counter.api.CounterConfiguration getConfiguration(String counterName)
- 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
public CompletableFuture<Boolean> isDefinedAsync(String name)
-
-