|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.data.LyCache
leon.data.cache.LySimpleCache
public class LySimpleCache
This class implements a simple cache in which objects are stored and unloaded on the fly, depending to dataSource needs.
Each object kept in the cache has a number of locks (uses) associated to it, when this number of locks become 0, the object is removed from the cache.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class leon.data.LyCache |
---|
LyCache.Result |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File version. |
Fields inherited from class leon.data.LyCache |
---|
NB_UNKNOWN_OBJECTS |
Constructor Summary | |
---|---|
LySimpleCache(LyClass cacheClass,
LyInfoCache policy)
Constructor of a simple cache of objects related to a given class description. |
Method Summary | |
---|---|
void |
allowLoaded(boolean allowLoaded)
Indicate if the cache can be marked as Loaded. |
LyObject |
getObjectFromPeer(java.lang.Object peer)
Gets an object from its physical representation (peer). |
int |
getSize(LyFilter filter)
Return the number of objects within this cache that match the given filter (all objects of the cache if filter is null). |
boolean |
isEmpty()
Tests if this cache is empty or not (contains no object). |
Methods inherited from class leon.data.LyCache |
---|
clearUnknownIdsCache, contains, contains, getCacheClass, getCount, getEnvironment, getObject, getObjectList, getObjects, getObjects, getPolicy, isLoaded, rehash, setLoaded |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LySimpleCache(LyClass cacheClass, LyInfoCache policy)
cacheClass
- Class description of objects stored in the cache.policy
- Description of th epolicy of thsi cache.Method Detail |
---|
public LyObject getObjectFromPeer(java.lang.Object peer)
getObjectFromPeer
in class LyCache
peer
- Physical representation of the searched object.
java.lang.IllegalStateException
- If this cache is not a cache that keep logical objects.public int getSize(LyFilter filter)
getSize
in class LyCache
filter
- Filter used for selecting objects. If filter is null, the total is returned.
public boolean isEmpty()
isEmpty
in class LyCache
public void allowLoaded(boolean allowLoaded)
allowLoaded
in class LyCache
allowLoaded
- the value of the allowLoaded attribute
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |