|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
K - V - public interface Cache<K,V>
An object cache, indexed using a key value K, and returning a cached value V.
Copyright 2009 Partner Software, Inc.
| Method Summary | |
|---|---|
V |
cachedValueFor(K index)
Get the object associated with the given index, keeping the returned item in cache subject to capacity and other settings. |
void |
clear()
Clears all items from the cache, so that they must be reloaded. |
int |
getByteSize()
Gets an estimate of the size of the cached values, in bytes. |
int |
getCapacity()
Gets the maximum number of cached values. |
java.lang.String |
getName()
|
java.util.List<V> |
listCachedValues()
Lists the values currently in cache. |
void |
setCapacity(int newSize)
Sets the maximum number of cached values. |
int |
size()
Returns the current cache size (number of cached values). |
V |
uncachedValueFor(K index)
Get the object associated with the given index, without regard to the cache. |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
java.lang.String getName()
V cachedValueFor(K index)
V uncachedValueFor(K index)
void clear()
java.util.List<V> listCachedValues()
int size()
int getCapacity()
void setCapacity(int newSize)
int getByteSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||