Package org.cache2k.core.common
Class BaseCacheControl
- java.lang.Object
-
- org.cache2k.core.common.BaseCacheControl
-
- All Implemented Interfaces:
org.cache2k.operation.CacheControl,org.cache2k.operation.CacheInfo,org.cache2k.operation.CacheOperation
public class BaseCacheControl extends Object implements org.cache2k.operation.CacheControl
Provide cache control on top of internal cache. This gets reused by the JMX extension.- Author:
- Jens Wilke
-
-
Constructor Summary
Constructors Constructor Description BaseCacheControl(InternalCache<?,?> cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>changeCapacity(long entryCountOrWeight)CompletableFuture<Void>clear()CompletableFuture<Void>close()CompletableFuture<Void>destroy()longgetCapacityLimit()InstantgetClearedTime()InstantgetCreatedTime()longgetEntryCapacity()StringgetImplementation()org.cache2k.config.CacheType<?>getKeyType()StringgetManagerName()longgetMaximumWeight()StringgetName()longgetSize()longgetTotalWeight()org.cache2k.config.CacheType<?>getValueType()booleanisLoaderPresent()booleanisStatisticsEnabled()booleanisWeigherPresent()CompletableFuture<Void>removeAll()org.cache2k.operation.CacheStatisticssampleStatistics()
-
-
-
Constructor Detail
-
BaseCacheControl
public BaseCacheControl(InternalCache<?,?> cache)
-
-
Method Detail
-
getKeyType
public org.cache2k.config.CacheType<?> getKeyType()
- Specified by:
getKeyTypein interfaceorg.cache2k.operation.CacheInfo
-
getValueType
public org.cache2k.config.CacheType<?> getValueType()
- Specified by:
getValueTypein interfaceorg.cache2k.operation.CacheInfo
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.cache2k.operation.CacheInfo
-
getManagerName
public String getManagerName()
- Specified by:
getManagerNamein interfaceorg.cache2k.operation.CacheInfo
-
getSize
public long getSize()
- Specified by:
getSizein interfaceorg.cache2k.operation.CacheInfo
-
getEntryCapacity
public long getEntryCapacity()
- Specified by:
getEntryCapacityin interfaceorg.cache2k.operation.CacheInfo
-
getCapacityLimit
public long getCapacityLimit()
- Specified by:
getCapacityLimitin interfaceorg.cache2k.operation.CacheInfo
-
getMaximumWeight
public long getMaximumWeight()
- Specified by:
getMaximumWeightin interfaceorg.cache2k.operation.CacheInfo
-
getTotalWeight
public long getTotalWeight()
- Specified by:
getTotalWeightin interfaceorg.cache2k.operation.CacheInfo
-
getCreatedTime
public Instant getCreatedTime()
- Specified by:
getCreatedTimein interfaceorg.cache2k.operation.CacheInfo
-
getClearedTime
public Instant getClearedTime()
- Specified by:
getClearedTimein interfaceorg.cache2k.operation.CacheInfo
-
getImplementation
public String getImplementation()
- Specified by:
getImplementationin interfaceorg.cache2k.operation.CacheInfo
-
clear
public CompletableFuture<Void> clear()
- Specified by:
clearin interfaceorg.cache2k.operation.CacheOperation
-
removeAll
public CompletableFuture<Void> removeAll()
- Specified by:
removeAllin interfaceorg.cache2k.operation.CacheOperation
-
changeCapacity
public CompletableFuture<Void> changeCapacity(long entryCountOrWeight)
- Specified by:
changeCapacityin interfaceorg.cache2k.operation.CacheOperation
-
isLoaderPresent
public boolean isLoaderPresent()
- Specified by:
isLoaderPresentin interfaceorg.cache2k.operation.CacheInfo
-
isWeigherPresent
public boolean isWeigherPresent()
- Specified by:
isWeigherPresentin interfaceorg.cache2k.operation.CacheInfo
-
isStatisticsEnabled
public boolean isStatisticsEnabled()
- Specified by:
isStatisticsEnabledin interfaceorg.cache2k.operation.CacheInfo
-
sampleStatistics
public org.cache2k.operation.CacheStatistics sampleStatistics()
- Specified by:
sampleStatisticsin interfaceorg.cache2k.operation.CacheControl
-
close
public CompletableFuture<Void> close()
- Specified by:
closein interfaceorg.cache2k.operation.CacheOperation
-
destroy
public CompletableFuture<Void> destroy()
- Specified by:
destroyin interfaceorg.cache2k.operation.CacheOperation
-
-