public interface Cache<K,V>
extends java.util.Map<K,V>
Cache
is a collection of values that are indexed by keys and that are stored for an
unspecified amount of time (which the implementor of Cache
may further specify).Modifier and Type | Method and Description |
---|---|
long |
getCapacity()
Returns the maximum number of elements the cache can hold.
|
void |
setCapacity(long capacity)
Sets the maximum number of elements the cache can hold.
|