|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
org.deegree_impl.tools.Cache_Impl
This class provides a cache for feature collections created by the wms filter services.
-----------------------------------------------------
Field Summary | |
protected java.util.Map |
data
|
protected java.util.Map |
lastCallTime
|
private int |
maxCacheSize
|
private int |
maxLifeTime
|
private int |
updateInterval
|
Fields inherited from class java.util.TimerTask |
|
Constructor Summary | |
Cache_Impl()
|
|
Cache_Impl(int maxEntries)
|
|
Cache_Impl(int maxEntries,
int maxLifeTime)
|
Method Summary | |
void |
clear()
removes all entries from the cache |
protected java.lang.Object |
deleteOldest()
removes the feature collection from the cache that hasn't been called for the longest time. |
java.lang.Object |
get(java.lang.Object identifier)
gets an entry from the cache. |
int |
getCurrentSize()
returns the actual amount of entries within the cache |
int |
getMaxEntries()
returns the number of entries maximal allowed within the cache |
int |
getMaxLifeTime()
returns the maximal time a feature collection is stored within the cache without being called |
int |
getUpdateInterval()
returns the time interval the internal thread is looking for feature collection that exeeds the max life time |
void |
push(java.lang.Object identifier,
java.lang.Object data)
pushes a new entry to the cache. |
java.lang.Object |
remove(java.lang.Object identifier)
removes an entry from the cache. |
void |
run()
|
void |
setMaxEntries(int maxCacheSize)
sets the maximal number of objects that will be stored within the cache. |
void |
setMaxLifeTime(int maxLifeTime)
sets the maximal time a feature collection is stored within the cache without being called |
void |
setUpdateInterval(int updateInterval)
sets the time interval the internal thread is looking for feature collection that exeeds the max life time |
java.lang.String |
toString()
|
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.Map data
protected java.util.Map lastCallTime
private int maxLifeTime
private int updateInterval
private int maxCacheSize
Constructor Detail |
public Cache_Impl()
public Cache_Impl(int maxEntries)
public Cache_Impl(int maxEntries, int maxLifeTime)
Method Detail |
public java.lang.Object get(java.lang.Object identifier)
get
in interface Cache
public void push(java.lang.Object identifier, java.lang.Object data)
push
in interface Cache
protected java.lang.Object deleteOldest()
public int getCurrentSize()
getCurrentSize
in interface Cache
public int getMaxLifeTime()
getMaxLifeTime
in interface Cache
public void setMaxLifeTime(int maxLifeTime)
setMaxLifeTime
in interface Cache
public int getUpdateInterval()
public void setUpdateInterval(int updateInterval)
public int getMaxEntries()
getMaxEntries
in interface Cache
public void setMaxEntries(int maxCacheSize)
setMaxEntries
in interface Cache
public void clear()
clear
in interface Cache
public java.lang.Object remove(java.lang.Object identifier)
remove
in interface Cache
public java.lang.String toString()
public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |