public class SimpleCache extends Object implements IComputable<Object,Object>
| Constructor and Description |
|---|
SimpleCache(IComputable<Object,Object> computable) |
SimpleCache(IComputable<Object,Object> computable,
int initialCapacity) |
| Modifier and Type | Method and Description |
|---|---|
Object |
compute(Object key)
Compute an object of type V identified by the key of type K
|
Class<? super Object> |
getValueClass()
Getting the
Class of the value this computable produces. |
public SimpleCache(IComputable<Object,Object> computable)
public SimpleCache(IComputable<Object,Object> computable, int initialCapacity)
public Object compute(Object key) throws InterruptedException
IComputablecompute in interface IComputable<Object,Object>key - the key to identify the objectInterruptedException - When computation was interruptedpublic Class<? super Object> getValueClass()
IComputableClass of the value this computable produces.getValueClass in interface IComputable<Object,Object>Copyright © 2020. All rights reserved.