Class BufferCache<K>
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.LRUCache<K,IBuffer>
org.aspectj.org.eclipse.jdt.internal.core.OverflowingLRUCache<K,IBuffer>
org.aspectj.org.eclipse.jdt.internal.core.BufferCache<K>
- All Implemented Interfaces:
Cloneable
An LRU cache of
IBuffers.-
Nested Class Summary
Nested classes/interfaces inherited from class LRUCache
LRUCache.LRUCacheEntry<K,V>, LRUCache.Stats -
Field Summary
Fields inherited from class OverflowingLRUCache
loadFactor, overflow, timestampsOnFields inherited from class LRUCache
currentSpace, DEFAULT_SPACELIMIT, entryQueue, entryQueueTail, entryTable, spaceLimit, timestampCounter -
Constructor Summary
ConstructorsConstructorDescriptionBufferCache(int size) Constructs a new buffer cache of the given size.BufferCache(int size, int overflow) Constructs a new buffer cache of the given size. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanclose(LRUCache.LRUCacheEntry<K, IBuffer> entry) Returns true if the element is successfully closed and removed from the cache, otherwise false.newInstance(int size, int newOverflow) Returns a new instance of the reciever.Methods inherited from class OverflowingLRUCache
clone, elements, fillingRatio, getEntryTable, getLoadFactor, getOverflow, makeSpace, printStats, privateRemoveEntry, privateRemoveEntry, put, remove, setLoadFactor, setSpaceLimit, shrink, toString, updateTimestampMethods inherited from class LRUCache
flush, flush, get, getCurrentSpace, getKey, getNewestTimestampCounter, getOldestElement, getOldestTimestampCounter, getSpaceLimit, keys, keysAndValues, newInstance, peek, privateAdd, privateAddEntry, removeKey, spaceFor, toStringContents, toStringFillingRation
-
Constructor Details
-
BufferCache
public BufferCache(int size) Constructs a new buffer cache of the given size. -
BufferCache
public BufferCache(int size, int overflow) Constructs a new buffer cache of the given size.
-
-
Method Details
-
close
Description copied from class:OverflowingLRUCacheReturns true if the element is successfully closed and removed from the cache, otherwise false.NOTE: this triggers an external remove from the cache by closing the object.
- Specified by:
closein classOverflowingLRUCache<K,IBuffer>
-
newInstance
Description copied from class:OverflowingLRUCacheReturns a new instance of the reciever.- Specified by:
newInstancein classOverflowingLRUCache<K,IBuffer>
-