| 
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The main interface for the cache. Provides administrative methods as well as methods to add, lookup, and remove entries from a cache.
| Inner classes inherited from class java.util.Map | 
java.util.Map.Entry | 
| Method Summary | |
 void | 
addEntry(java.lang.Object key,
         java.lang.Object value)
Deprecated. use put  | 
 void | 
addEntry(java.lang.Object key,
         java.lang.Object value,
         long ttl)
Deprecated. use put  | 
 boolean | 
containsEntry(java.lang.Object key)
Deprecated. use containsKey  | 
 void | 
disable()
Disable the cache.  | 
 void | 
enable()
Enable the cache.  | 
 java.lang.Object | 
fetchEntry(java.lang.Object key)
Deprecated. use get  | 
 int | 
getEntryCount()
Deprecated. use size  | 
 long | 
getHitCount()
Reset the hitCount  | 
 int | 
getHitRate()
Percent of cache calls which hit - a whole number percentage.  | 
 int | 
getMaxEntries()
Set the max number of items the cache can have.  | 
 long | 
getMissCount()
Reset the missCount  | 
 long | 
getTtl()
Get the time-to-live, in milliseconds, of the cache  | 
 boolean | 
isEnabled()
Is the cache enabled.  | 
 boolean | 
isFull()
Is the cache full.  | 
 java.lang.Object | 
put(java.lang.Object key,
    java.lang.Object value,
    long ttl)
Put a value into the cache.  | 
 void | 
remove(java.lang.Object[] keys)
Remove an array of entries.  | 
 void | 
removeAllEntries()
Deprecated. use clear  | 
 void | 
removeEntry(java.lang.Object key)
Deprecated. use remove  | 
 void | 
resetStats()
Reset hitCount and missCount  | 
 void | 
setMaxEntries(int maxEntries)
Set the max number of items the cache can have.  | 
 void | 
setTtl(long ttlMillis)
Set a time-to-live for entries in this cache.  | 
| Methods inherited from interface java.util.Map | 
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values | 
| Method Detail | 
public boolean containsEntry(java.lang.Object key)
key - the entry to look forboolean, true if the entry exists in the cachepublic java.lang.Object fetchEntry(java.lang.Object key)
key - the key of the entry to retrieveObject the value associated with the key
public void addEntry(java.lang.Object key,
                     java.lang.Object value)
key - the key of the entry to createvalue - the value to associate with the key
public void addEntry(java.lang.Object key,
                     java.lang.Object value,
                     long ttl)
key - the key of the entry to createvalue - the value to associate with the keyttl - a time-to-live value for this entry
public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value,
                            long ttl)
key - the key of the entry to createvalue - the value to associate with the keyttl - a time-to-live value for this entryObject the previous value for the keypublic void removeEntry(java.lang.Object key)
key - the key of the entry to removepublic void remove(java.lang.Object[] keys)
keys - the keys to removepublic boolean isFull()
boolean, true if it is fullpublic boolean isEnabled()
boolean, true if it is enabledpublic void setTtl(long ttlMillis)
put method which
 takes a ttl parameter.ttlMillis - The time-to-live, in milliseconds, of entries in the cachepublic long getTtl()
public void disable()
public void enable()
public void resetStats()
public long getHitCount()
public long getMissCount()
public int getHitRate()
public void setMaxEntries(int maxEntries)
maxEntries - the maximimum size of the cachepublic int getMaxEntries()
public int getEntryCount()
public void removeAllEntries()
  | 
© 2001 BEA Systems, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||