org.datanucleus.cache.spymemcached
Class SpymemcachedLevel2Cache

java.lang.Object
  extended by org.datanucleus.cache.AbstractLevel2Cache
      extended by org.datanucleus.cache.spymemcached.SpymemcachedLevel2Cache
All Implemented Interfaces:
Serializable, org.datanucleus.cache.Level2Cache

public class SpymemcachedLevel2Cache
extends org.datanucleus.cache.AbstractLevel2Cache

Plugin using Spymemcached implementation of "memcached" as a Level2 cache. We use the "cacheName" as the keyPrefix to distinguish our objects from others in memcached.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.datanucleus.cache.Level2Cache
org.datanucleus.cache.Level2Cache.PinnedClass
 
Field Summary
 
Fields inherited from class org.datanucleus.cache.AbstractLevel2Cache
cacheName, clearAtClose, LOCALISER, maxSize, nucleusCtx, timeout
 
Constructor Summary
SpymemcachedLevel2Cache(org.datanucleus.NucleusContext nucleusCtx)
           
 
Method Summary
 void close()
           
 boolean containsOid(Object oid)
           
 void evict(Object oid)
           
 void evictAll()
           
 void evictAll(Class arg0, boolean arg1)
           
 void evictAll(Collection oids)
           
 void evictAll(Object[] oids)
           
 org.datanucleus.cache.CachedPC get(Object oid)
           
protected  String getCacheKeyForId(Object id)
           
 int getSize()
           
 boolean isEmpty()
           
 org.datanucleus.cache.CachedPC put(Object oid, org.datanucleus.cache.CachedPC pc)
           
 
Methods inherited from class org.datanucleus.cache.AbstractLevel2Cache
getAll, getNumberOfPinnedObjects, getNumberOfUnpinnedObjects, pin, pinAll, pinAll, pinAll, putAll, unpin, unpinAll, unpinAll, unpinAll
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpymemcachedLevel2Cache

public SpymemcachedLevel2Cache(org.datanucleus.NucleusContext nucleusCtx)
Method Detail

close

public void close()

containsOid

public boolean containsOid(Object oid)

evict

public void evict(Object oid)

evictAll

public void evictAll()

evictAll

public void evictAll(Object[] oids)

evictAll

public void evictAll(Collection oids)

evictAll

public void evictAll(Class arg0,
                     boolean arg1)

get

public org.datanucleus.cache.CachedPC get(Object oid)

getSize

public int getSize()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface org.datanucleus.cache.Level2Cache
Overrides:
isEmpty in class org.datanucleus.cache.AbstractLevel2Cache

put

public org.datanucleus.cache.CachedPC put(Object oid,
                                          org.datanucleus.cache.CachedPC pc)

getCacheKeyForId

protected String getCacheKeyForId(Object id)


Copyright © 2011. All Rights Reserved.