|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.query.QueryObjectCachePool
QueryObjectCachePool, based on LinkedHashMap This cache has a fixed maximum number of elements (poolSize). If the cache pool has reached its maximum size and another entry is added, the LRU (least recently used) entry is removed.
Constructor Summary | |
QueryObjectCachePool(int poolSize)
Creates a new LRU cache. |
Method Summary | |
void |
clear()
Clears the cache. |
QueryObjectCache |
get(QueryObject key)
Retrieves a QueryObjectCache from the pool |
java.util.Collection |
getAll()
Returns a Collection that contains a copy of all cache entries. |
void |
put(QueryObject key,
QueryObjectCache value)
Adds an entry to this cache. |
int |
usedEntries()
Returns the number of used entries in the cache. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QueryObjectCachePool(int poolSize)
Method Detail |
public void clear()
public QueryObjectCache get(QueryObject key)
key
- the key of the QueryObjectCache to be returned.
public java.util.Collection getAll()
Collection
that contains a copy of all cache entries.
Collection
with a copy of the cache content.public void put(QueryObject key, QueryObjectCache value)
key
- the key with which the specified value is to be associated.value
- a value to be associated with the specified key.public int usedEntries()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.