ConcurrentCache
.
Modifier and Type | Class and Description |
---|---|
public static interface | ReplacementPolicy.Callback
The interface for the callback objects that |
Modifier and Type | Method and Description |
---|---|
public void | |
public void | insertEntry(CacheEntry
the entry to insert entry)Insert an entry into the |
public int | Returns: the number of entries allocated in the cacheGet the number of entries allocated in the data structure that holds cached objects. |
doShrink | back to summary |
---|---|
public void doShrink() Try to shrink the cache if it has exceeded its maximum size. It is not guaranteed that the cache will actually shrink. |
insertEntry | back to summary |
---|---|
public void insertEntry(CacheEntry entry) throws StandardException Insert an entry into the
|
size | back to summary |
---|---|
public int size() Get the number of entries allocated in the data structure that holds cached objects. This number could include empty entries for objects that have been removed from the cache, if those entries are still kept in the data structure for reuse.
|
ConcurrentCache
uses to notify the replacement algorithm about events such as look-ups
and removals. Each Callback
object is associated with a
single entry in the cache.
Modifier and Type | Method and Description |
---|---|
public void | |
public void | free()
Notify the replacement algorithm that the entry associated with this
callback object has been removed, and the callback object and the
|
access | back to summary |
---|---|
public void access() Notify the replacement algorithm that the cache entry has been accessed. The replacement algorithm can use this information to collect statistics about access frequency which can be used to determine the order of evictions. The entry associated with the callback object must be locked by the current thread. |
free | back to summary |
---|---|
public void free() Notify the replacement algorithm that the entry associated with this
callback object has been removed, and the callback object and the
The entry associated with the callback object must be locked by the current thread. |