org.apache.openejb.util
Class Memoizer<K,V>
java.lang.Object
org.apache.openejb.util.Memoizer<K,V>
- All Implemented Interfaces:
- Computable<K,V>
public class Memoizer<K,V>
- extends Object
- implements Computable<K,V>
|
Constructor Summary |
Memoizer(Computable<K,V> c)
Constructs a new Memoizer with the specified cache source. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Memoizer
public Memoizer(Computable<K,V> c)
- Constructs a new
Memoizer with the specified cache source.
- Parameters:
c - is the cache value source algorithm
- Throws:
NullPointerException - if c is null
compute
public V compute(K key)
throws InterruptedException
- Specified by:
compute in interface Computable<K,V>
- Throws:
InterruptedException
Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.