|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jpox.cache.EhcacheClassBasedLevel2Cache
public class EhcacheClassBasedLevel2Cache
Plugin for EHCache that allows the user to use different caches for different classes. Based on the EhcacheLevel2Cache class. This is dependent on JDO and so cannot be used for JPA.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jpox.cache.Level2Cache |
|---|
org.jpox.cache.Level2Cache.PinnedClass |
| Constructor Summary | |
|---|---|
EhcacheClassBasedLevel2Cache(org.jpox.OMFContext omfCtx)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Method to clear the cache. |
boolean |
containsOid(java.lang.Object oid)
Accessor for whether an object with the specified id is in the cache |
void |
evict(java.lang.Object oid)
Evict the parameter instance from the second-level cache. |
void |
evictAll()
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.lang.Class pcClass,
boolean subclasses)
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.util.Collection oids)
Evict the parameter instances from the second-level cache. |
void |
evictAll(java.lang.Object[] oids)
Evict the parameter instances from the second-level cache. |
org.jpox.cache.CachedPC |
get(java.lang.Object oid)
Accessor for an object from the cache. |
int |
getNumberOfPinnedObjects()
Accessor for the number of pinned objects - not supported by Ehcache. |
int |
getNumberOfUnpinnedObjects()
Accessor for the number of unpinned objects - not supported by Ehcache. |
int |
getSize()
Accessor for the size of the cache. |
boolean |
isEmpty()
Accessor for whether the cache is empty |
void |
pin(java.lang.Object oid)
Pin the parameter instance in the second-level cache. |
void |
pinAll(java.lang.Class pcClass,
boolean subclasses)
Pin instances in the second-level cache. |
void |
pinAll(java.util.Collection oids)
Pin the parameter instances in the second-level cache. |
void |
pinAll(java.lang.Object[] oids)
Pin the parameter instances in the second-level cache. |
org.jpox.cache.CachedPC |
put(java.lang.Object oid,
org.jpox.cache.CachedPC pc)
Method to add an object to the cache under its id |
void |
unpin(java.lang.Object oid)
Unpin the parameter instance from the second-level cache. |
void |
unpinAll(java.lang.Class pcClass,
boolean subclasses)
Unpin instances from the second-level cache. |
void |
unpinAll(java.util.Collection oids)
Unpin the parameter instance from the second-level cache. |
void |
unpinAll(java.lang.Object[] oids)
Unpin the parameter instance from the second-level cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EhcacheClassBasedLevel2Cache(org.jpox.OMFContext omfCtx)
omfCtx - OMF Context| Method Detail |
|---|
public void clear()
clear in interface org.jpox.cache.Level2Cachepublic boolean containsOid(java.lang.Object oid)
containsOid in interface org.jpox.cache.Level2Cacheoid - The object id
public org.jpox.cache.CachedPC get(java.lang.Object oid)
get in interface org.jpox.cache.Level2Cacheoid - The Object ID
public int getNumberOfPinnedObjects()
getNumberOfPinnedObjects in interface org.jpox.cache.Level2CacheLevel2Cache.getNumberOfPinnedObjects()public int getNumberOfUnpinnedObjects()
getNumberOfUnpinnedObjects in interface org.jpox.cache.Level2CacheLevel2Cache.getNumberOfUnpinnedObjects()public int getSize()
getSize in interface org.jpox.cache.Level2CacheLevel2Cache.getSize()public boolean isEmpty()
isEmpty in interface org.jpox.cache.Level2CacheLevel2Cache.isEmpty()
public org.jpox.cache.CachedPC put(java.lang.Object oid,
org.jpox.cache.CachedPC pc)
put in interface org.jpox.cache.Level2Cacheoid - The identitypc - The cacheable objectpublic void evict(java.lang.Object oid)
evict in interface org.jpox.cache.Level2Cacheoid - the object id of the instance to evict.public void evictAll()
evictAll in interface org.jpox.cache.Level2Cache
public void evictAll(java.lang.Class pcClass,
boolean subclasses)
evictAll in interface org.jpox.cache.Level2CachepcClass - the class of instances to evictsubclasses - if true, evict instances of subclasses alsopublic void evictAll(java.util.Collection oids)
evictAll in interface org.jpox.cache.Level2Cacheoids - the object ids of the instance to evict.public void evictAll(java.lang.Object[] oids)
evictAll in interface org.jpox.cache.Level2Cacheoids - the object ids of the instance to evict.public void pin(java.lang.Object oid)
pin in interface org.jpox.cache.Level2Cacheoid - the object id of the instance to pin.
public void pinAll(java.lang.Class pcClass,
boolean subclasses)
pinAll in interface org.jpox.cache.Level2CachepcClass - the class of instances to pinsubclasses - if true, pin instances of subclasses alsopublic void pinAll(java.util.Collection oids)
pinAll in interface org.jpox.cache.Level2Cacheoids - the object ids of the instances to pin.public void pinAll(java.lang.Object[] oids)
pinAll in interface org.jpox.cache.Level2Cacheoids - the object ids of the instances to pin.public void unpin(java.lang.Object oid)
unpin in interface org.jpox.cache.Level2Cacheoid - the object id of the instance to unpin.
public void unpinAll(java.lang.Class pcClass,
boolean subclasses)
unpinAll in interface org.jpox.cache.Level2CachepcClass - the class of instances to unpinsubclasses - if true, unpin instances of subclasses alsopublic void unpinAll(java.util.Collection oids)
unpinAll in interface org.jpox.cache.Level2Cacheoids - the object id of the instance to evict.public void unpinAll(java.lang.Object[] oids)
unpinAll in interface org.jpox.cache.Level2Cacheoids - the object id of the instance to evict.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||