|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.tbee.cache.simple.LifespanCache
public class LifespanCache
This cache holds items only for a specified number of seconds accessing the item does NOT restart the counter (see TimeoutCache)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static char |
MODE_SOFT
|
static char |
MODE_STRONG
|
static char |
MODE_WEAK
|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Constructor Summary | |
|---|---|
LifespanCache()
This constructor uses a life span specified in as a system property, or a default value (60 seconds) if the property is not present. |
|
LifespanCache(char pMode)
This constructor uses a life span specified in as a system property, or a default value (60 seconds) if the property is not present. |
|
LifespanCache(char pMode,
int pLifespan)
The life span in milleseconds |
|
LifespanCache(int pLifespan)
The life span in milleseconds |
|
| Method Summary | |
|---|---|
void |
addAssociation(Object association)
|
void |
addCacheListener(CacheListener pCacheListener)
A cache listener listens to both finalize and remove events |
void |
clear()
|
Object |
clone()
|
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
Set |
entrySet()
|
Object |
get(Object key)
|
Vector |
getAssociations()
|
String |
getName()
|
boolean |
isEmpty()
|
Set |
keySet()
|
Object |
put(Object key,
Object value)
|
void |
putAll(Map t)
|
Object |
remove(Object key)
|
void |
removeCacheListener(CacheListener pCacheListener)
|
void |
removeValue(Object value)
|
void |
setName(String pName)
|
int |
size()
|
String |
toString()
|
Collection |
values()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.tbee.cache.simple.Cache |
|---|
addAssociation, getName, setName |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
public static char MODE_STRONG
public static char MODE_SOFT
public static char MODE_WEAK
| Constructor Detail |
|---|
public LifespanCache()
public LifespanCache(char pMode)
public LifespanCache(char pMode,
int pLifespan)
public LifespanCache(int pLifespan)
| Method Detail |
|---|
public void addCacheListener(CacheListener pCacheListener)
addCacheListener in interface Cachepublic void removeCacheListener(CacheListener pCacheListener)
removeCacheListener in interface Cachepublic void clear()
clear in interface Mappublic Object clone()
clone in class Objectpublic boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic Set entrySet()
entrySet in interface Mappublic Object get(Object key)
get in interface Mappublic boolean isEmpty()
isEmpty in interface Mappublic Set keySet()
keySet in interface Map
public Object put(Object key,
Object value)
put in interface Mappublic void putAll(Map t)
putAll in interface Mappublic Object remove(Object key)
remove in interface Mappublic void removeValue(Object value)
removeValue in interface Cachepublic int size()
size in interface Mappublic String toString()
toString in class Objectpublic Collection values()
values in interface Mappublic void addAssociation(Object association)
public Vector getAssociations()
public String getName()
public void setName(String pName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||