Groovy 2.2.0

org.codehaus.groovy.runtime.memoize
[Java] Class LRUCache

java.lang.Object
  org.codehaus.groovy.runtime.memoize.LRUCache
All Implemented Interfaces:
MemoizeCache

public final class LRUCache
extends Object

A cache backed by a Collections.SynchronizedMap

Authors:
Vaclav Pech


Constructor Summary
LRUCache(int maxCacheSize)

 
Method Summary
void cleanUpNullReferences()

Replying on the Collections.SynchronizedMap thread-safe iteration implementation the method will remove all entries holding SoftReferences to gc-evicted objects.

Object get(Object key)

Object put(Object key, Object value)

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Constructor Detail

LRUCache

public LRUCache(int maxCacheSize)


 
Method Detail

cleanUpNullReferences

public void cleanUpNullReferences()
Replying on the Collections.SynchronizedMap thread-safe iteration implementation the method will remove all entries holding SoftReferences to gc-evicted objects.


get

public Object get(Object key)


put

public Object put(Object key, Object value)


 

Copyright © 2003-2013 The Codehaus. All rights reserved.