|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.feature.persistence.cache.SimpleFeatureStoreCache
public class SimpleFeatureStoreCache
FeatureStoreCache
that uses a Java's SoftReference
as eviction strategy and allows to limit the maximum
number of cached objects.
FeatureStore
Constructor Summary | |
---|---|
SimpleFeatureStoreCache()
Creates a new SimpleFeatureStoreCache instance that allows to store a default number of entries. |
|
SimpleFeatureStoreCache(int maxEntries)
Creates a new SimpleFeatureStoreCache instance that allows to store the specified number of entries. |
Method Summary | |
---|---|
void |
add(GMLObject obj)
Adds the given object to the cache. |
void |
clear()
Clears the cache, removing all objects. |
GMLObject |
get(String id)
Returns the object with the specified id (if it exists in the cache). |
void |
remove(String id)
Removes the object with the specified id from the cache (if it exists). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleFeatureStoreCache()
SimpleFeatureStoreCache
instance that allows to store a default number of entries.
public SimpleFeatureStoreCache(int maxEntries)
SimpleFeatureStoreCache
instance that allows to store the specified number of entries.
maxEntries
- maximum number of cached objectsMethod Detail |
---|
public GMLObject get(String id)
FeatureStoreCache
get
in interface FeatureStoreCache
id
- id of the object, must not be null
null
if it is not present in the cachepublic void add(GMLObject obj)
FeatureStoreCache
add
in interface FeatureStoreCache
obj
- object, must not be null
public void remove(String id)
FeatureStoreCache
remove
in interface FeatureStoreCache
id
- id of the object, must not be null
public void clear()
FeatureStoreCache
clear
in interface FeatureStoreCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |