org.aspectj.org.eclipse.jdt.internal.core
Class VerboseElementCache

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.util.LRUCache
      extended by org.aspectj.org.eclipse.jdt.internal.core.OverflowingLRUCache
          extended by org.aspectj.org.eclipse.jdt.internal.core.ElementCache
              extended by org.aspectj.org.eclipse.jdt.internal.core.VerboseElementCache
All Implemented Interfaces:
java.lang.Cloneable

public class VerboseElementCache
extends ElementCache


Nested Class Summary
 
Nested classes/interfaces inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.LRUCache
LRUCache.LRUCacheEntry, LRUCache.Stats
 
Field Summary
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.OverflowingLRUCache
loadFactor, overflow, timestampsOn
 
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.LRUCache
currentSpace, DEFAULT_SPACELIMIT, entryQueue, entryQueueTail, entryTable, spaceLimit, timestampCounter
 
Constructor Summary
VerboseElementCache(int size, java.lang.String name)
           
 
Method Summary
protected  boolean makeSpace(int space)
          Ensures there is the specified amount of free space in the receiver, by removing old entries if necessary.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Sets the value in the cache at the given key.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.ElementCache
close, ensureSpaceLimit, newInstance, resetSpaceLimit
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.OverflowingLRUCache
clone, elements, fillingRatio, getEntryTable, getLoadFactor, getOverflow, printStats, privateRemoveEntry, privateRemoveEntry, remove, setLoadFactor, setSpaceLimit, shrink, toString, updateTimestamp
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.LRUCache
flush, flush, get, getCurrentSpace, getKey, getNewestTimestampCounter, getOldestElement, getOldestTimestampCounter, getSpaceLimit, keys, keysAndValues, newInstance, peek, privateAdd, privateAddEntry, removeKey, spaceFor, toStringContents, toStringFillingRation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VerboseElementCache

public VerboseElementCache(int size,
                           java.lang.String name)
Method Detail

makeSpace

protected boolean makeSpace(int space)
Description copied from class: OverflowingLRUCache
Ensures there is the specified amount of free space in the receiver, by removing old entries if necessary. Returns true if the requested space was made available, false otherwise. May not be able to free enough space since some elements cannot be removed until they are saved.

Overrides:
makeSpace in class OverflowingLRUCache
Parameters:
space - Amount of space to free up

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Description copied from class: OverflowingLRUCache
Sets the value in the cache at the given key. Returns the value.

Overrides:
put in class OverflowingLRUCache
Parameters:
key - Key of object to add.
value - Value of object to add.
Returns:
added value.