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

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.BufferCache
All Implemented Interfaces:
java.lang.Cloneable

public class BufferCache
extends OverflowingLRUCache

An LRU cache of IBuffers.


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
BufferCache(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
protected  boolean close(LRUCache.LRUCacheEntry entry)
          Returns true if the buffer is successfully closed and removed from the cache, otherwise false.
protected  LRUCache newInstance(int size, int newOverflow)
          Returns a new instance of the reciever.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.OverflowingLRUCache
clone, elements, fillingRatio, getEntryTable, getLoadFactor, getOverflow, makeSpace, printStats, privateRemoveEntry, privateRemoveEntry, put, 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

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 Detail

close

protected boolean close(LRUCache.LRUCacheEntry entry)
Returns true if the buffer is successfully closed and removed from the cache, otherwise false.

NOTE: this triggers an external removal of this buffer by closing the buffer.

Specified by:
close in class OverflowingLRUCache

newInstance

protected LRUCache newInstance(int size,
                               int newOverflow)
Returns a new instance of the reciever.

Specified by:
newInstance in class OverflowingLRUCache