public class ElementCache<K extends IJavaElement & IOpenable> extends OverflowingLRUCache<K,JavaElementInfo>
JavaElements.LRUCache.LRUCacheEntry<K,V>, LRUCache.StatsloadFactor, overflow, timestampsOncurrentSpace, DEFAULT_SPACELIMIT, entryQueue, entryQueueTail, entryTable, spaceLimit, timestampCounter| Constructor and Description |
|---|
ElementCache(int size)
Constructs a new element cache of the given size.
|
ElementCache(int size,
int overflow)
Constructs a new element cache of the given size.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
close(LRUCache.LRUCacheEntry<K,JavaElementInfo> entry)
Returns true if the element is successfully closed and
removed from the cache, otherwise false.
|
protected void |
ensureSpaceLimit(JavaElementInfo info,
IJavaElement parent) |
protected ElementCache<K> |
newInstance(int size,
int newOverflow)
Returns a new instance of the reciever.
|
protected void |
resetSpaceLimit(int defaultLimit,
IJavaElement parent) |
clone, elements, fillingRatio, getEntryTable, getLoadFactor, getOverflow, makeSpace, printStats, privateRemoveEntry, privateRemoveEntry, put, remove, setLoadFactor, setSpaceLimit, shrink, toString, updateTimestampflush, flush, get, getCurrentSpace, getKey, getNewestTimestampCounter, getOldestElement, getOldestTimestampCounter, getSpaceLimit, keys, keysAndValues, newInstance, peek, privateAdd, privateAddEntry, removeKey, spaceFor, toStringContents, toStringFillingRationpublic ElementCache(int size)
public ElementCache(int size,
int overflow)
protected boolean close(LRUCache.LRUCacheEntry<K,JavaElementInfo> entry)
NOTE: this triggers an external removal of this element by closing the element.
close in class OverflowingLRUCache<K extends IJavaElement & IOpenable,JavaElementInfo>protected void ensureSpaceLimit(JavaElementInfo info, IJavaElement parent)
protected ElementCache<K> newInstance(int size, int newOverflow)
OverflowingLRUCachenewInstance in class OverflowingLRUCache<K extends IJavaElement & IOpenable,JavaElementInfo>protected void resetSpaceLimit(int defaultLimit,
IJavaElement parent)