|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Internal public interface ManagedCache
Interface that managed cache things need to implement
| Method Summary | |
|---|---|
void |
clear()
Clear the cache. |
Long |
currentExpireAfterAccessMillis()
|
Long |
currentExpireAfterWriteMillis()
|
Integer |
currentMaxEntries()
|
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. |
| Method Detail |
|---|
void clear()
@Nonnull String getName()
boolean isFlushable()
This method is used by CacheManager.flushCaches() to only flush
caches that can be safely flushed. clear() ignores this value.
@Nullable Integer currentMaxEntries()
boolean updateMaxEntries(int newValue)
newValue - the new hint value
@Nullable Long currentExpireAfterAccessMillis()
boolean updateExpireAfterAccess(long expireAfter,
@Nonnull
TimeUnit timeUnit)
expireAfter - Time to retain entries for since their last access.timeUnit - The TimeUnit for the time
@Nullable Long currentExpireAfterWriteMillis()
boolean updateExpireAfterWrite(long expireAfter,
@Nonnull
TimeUnit timeUnit)
expireAfter - Time to retain entries for since their last write.timeUnit - The TimeUnit for the time
boolean isLocal()
boolean isReplicateAsynchronously()
boolean isReplicateViaCopy()
@Nonnull SortedMap<CacheStatisticsKey,com.atlassian.util.concurrent.Supplier<Long>> getStatistics()
labels.
Providing statistics is an optional feature and no assumptions should be made by the caller about
which (if any) statistics will be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||