|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.cache.hazelcast.ManagedHybridCacheSupport
public abstract class ManagedHybridCacheSupport
Common implementation of ManagedCache methods for hybrid caches and cached references.
| Field Summary | |
|---|---|
protected boolean |
flushable
|
protected String |
name
|
| Constructor Summary | |
|---|---|
ManagedHybridCacheSupport(String name,
CacheSettings settings)
|
|
| Method Summary | |
|---|---|
Long |
currentExpireAfterAccessMillis()
|
Long |
currentExpireAfterWriteMillis()
|
Integer |
currentMaxEntries()
|
protected abstract ManagedCache |
getManagedCache()
|
String |
getName()
The name of the cache, uniquely identifies this cache. |
SortedMap<CacheStatisticsKey,com.atlassian.util.concurrent.Supplier<Long>> |
getStatistics()
Get usage statistics for the cache. |
boolean |
isFlushable()
Returns true if this cache can be safely flushed any time. |
boolean |
isLocal()
|
boolean |
isReplicateAsynchronously()
|
boolean |
isReplicateViaCopy()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.atlassian.cache.ManagedCache |
|---|
clear |
| Field Detail |
|---|
protected final boolean flushable
protected final String name
| Constructor Detail |
|---|
public ManagedHybridCacheSupport(String name,
CacheSettings settings)
| Method Detail |
|---|
public Long currentExpireAfterAccessMillis()
currentExpireAfterAccessMillis in interface ManagedCachepublic Long currentExpireAfterWriteMillis()
currentExpireAfterWriteMillis in interface ManagedCachepublic Integer currentMaxEntries()
currentMaxEntries in interface ManagedCache@Nonnull public String getName()
ManagedCache
getName in interface ManagedCachepublic boolean isFlushable()
ManagedCache
This method is used by CacheManager.flushCaches() to only flush
caches that can be safely flushed. ManagedCache.clear() ignores this value.
isFlushable in interface ManagedCachepublic boolean isLocal()
isLocal in interface ManagedCachepublic boolean isReplicateAsynchronously()
isReplicateAsynchronously in interface ManagedCachepublic boolean isReplicateViaCopy()
isReplicateViaCopy in interface ManagedCache
public boolean updateExpireAfterAccess(long expireAfter,
@Nonnull
TimeUnit timeUnit)
ManagedCache
updateExpireAfterAccess in interface ManagedCacheexpireAfter - Time to retain entries for since their last access.timeUnit - The TimeUnit for the time
public boolean updateExpireAfterWrite(long expireAfter,
@Nonnull
TimeUnit timeUnit)
ManagedCache
updateExpireAfterWrite in interface ManagedCacheexpireAfter - Time to retain entries for since their last write.timeUnit - The TimeUnit for the time
public boolean updateMaxEntries(int newValue)
ManagedCache
updateMaxEntries in interface ManagedCachenewValue - the new hint value
protected abstract ManagedCache getManagedCache()
@Nonnull public SortedMap<CacheStatisticsKey,com.atlassian.util.concurrent.Supplier<Long>> getStatistics()
ManagedCachelabels.
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 ManagedCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||