public abstract class ManagedHybridCacheSupport extends Object implements ManagedCache
ManagedCache methods for hybrid caches and cached references.| Modifier and Type | Field and Description |
|---|---|
protected HazelcastCacheManager |
cacheManager |
protected String |
name |
| Constructor and Description |
|---|
ManagedHybridCacheSupport(String name,
HazelcastCacheManager cacheManager) |
| Modifier and Type | Method and Description |
|---|---|
Long |
currentExpireAfterAccessMillis() |
Long |
currentExpireAfterWriteMillis() |
Integer |
currentMaxEntries() |
protected abstract ManagedCache |
getLocalCache() |
String |
getName()
The name of the cache, uniquely identifies this cache.
|
SortedMap<CacheStatisticsKey,Supplier<Long>> |
getStatistics()
Get usage statistics for the cache.
|
boolean |
isLocal() |
boolean |
isReplicateViaCopy() |
boolean |
isStatisticsEnabled() |
void |
setStatistics(boolean enabled)
Changes the state of statistics gathering.
|
boolean |
updateExpireAfterAccess(long expireAfter,
TimeUnit timeUnit)
Attempts to update the hint regarding how long entries that should be held in the cache, after last access.
|
boolean |
updateExpireAfterWrite(long expireAfter,
TimeUnit timeUnit)
Attempts to update the hint regarding how long entries that should be held in the cache, after last write.
|
boolean |
updateMaxEntries(int newValue)
Attempts to update the hint regarding the maximum number of entries that should be cached at any time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, getCacheCollector, isFlushable, isReplicateAsynchronouslyprotected final HazelcastCacheManager cacheManager
protected final String name
public ManagedHybridCacheSupport(String name, HazelcastCacheManager cacheManager)
public Long currentExpireAfterAccessMillis()
currentExpireAfterAccessMillis in interface ManagedCachepublic Long currentExpireAfterWriteMillis()
currentExpireAfterWriteMillis in interface ManagedCachepublic Integer currentMaxEntries()
currentMaxEntries in interface ManagedCache@Nonnull public String getName()
ManagedCachegetName in interface ManagedCachepublic boolean isLocal()
isLocal in interface ManagedCachepublic boolean isReplicateViaCopy()
isReplicateViaCopy in interface ManagedCachepublic boolean updateExpireAfterAccess(long expireAfter,
@Nonnull
TimeUnit timeUnit)
ManagedCacheupdateExpireAfterAccess in interface ManagedCacheexpireAfter - Time to retain entries for since their last access.timeUnit - The TimeUnit for the timepublic boolean updateExpireAfterWrite(long expireAfter,
@Nonnull
TimeUnit timeUnit)
ManagedCacheupdateExpireAfterWrite in interface ManagedCacheexpireAfter - Time to retain entries for since their last write.timeUnit - The TimeUnit for the timepublic boolean updateMaxEntries(int newValue)
ManagedCacheupdateMaxEntries in interface ManagedCachenewValue - the new hint valueprotected abstract ManagedCache getLocalCache()
@Nonnull public SortedMap<CacheStatisticsKey,Supplier<Long>> getStatistics()
ManagedCache
The statistics are sorted by the cache statistics key labels. Providing
statistics is an optional feature and no assumptions should be made by the caller about which (if any) statistics
will be returned.
getStatistics in interface ManagedCachepublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface ManagedCachepublic void setStatistics(boolean enabled)
ManagedCachesetStatistics in interface ManagedCacheenabled - The stats collection is enabled if true - disabled otherwise.Copyright © 2018 Atlassian. All rights reserved.