com.caucho.server.distcache
Class AbstractCacheEngine

java.lang.Object
  extended by com.caucho.server.distcache.AbstractCacheEngine
All Implemented Interfaces:
CacheEngine
Direct Known Subclasses:
MemcachedCacheEngine

public class AbstractCacheEngine
extends java.lang.Object
implements CacheEngine

Manages the distributed cache


Constructor Summary
AbstractCacheEngine()
           
 
Method Summary
 HashKey compareAndPut(DistCacheEntry entry, HashKey testValue, MnodeUpdate mnodeUpdate, java.lang.Object value, CacheConfig config)
           
 MnodeEntry get(DistCacheEntry entry, CacheConfig config)
           
 HashKey getAndPut(DistCacheEntry entry, MnodeUpdate mnodeUpdate, java.lang.Object value, long leaseTimeout, int leaseOwner)
           
 void initCache(CacheImpl cache)
           
 boolean isLocalExpired(CacheConfig config, HashKey key, MnodeEntry mnodeEntry, long now)
           
 boolean loadData(HashKey valueKey, int flags)
           
 void put(HashKey key, MnodeUpdate mnodeUpdate, MnodeEntry mnodeValue)
           
 void remove(HashKey key, MnodeUpdate mnodeUpdate, MnodeEntry mnodeEntry)
           
 void start()
          Starts the service
 void updateTime(HashKey key, MnodeEntry mnodeValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCacheEngine

public AbstractCacheEngine()
Method Detail

start

public void start()
Description copied from interface: CacheEngine
Starts the service

Specified by:
start in interface CacheEngine

initCache

public void initCache(CacheImpl cache)
Specified by:
initCache in interface CacheEngine

isLocalExpired

public boolean isLocalExpired(CacheConfig config,
                              HashKey key,
                              MnodeEntry mnodeEntry,
                              long now)
Specified by:
isLocalExpired in interface CacheEngine

loadData

public boolean loadData(HashKey valueKey,
                        int flags)
Specified by:
loadData in interface CacheEngine

get

public MnodeEntry get(DistCacheEntry entry,
                      CacheConfig config)
Specified by:
get in interface CacheEngine

put

public void put(HashKey key,
                MnodeUpdate mnodeUpdate,
                MnodeEntry mnodeValue)
Specified by:
put in interface CacheEngine

remove

public void remove(HashKey key,
                   MnodeUpdate mnodeUpdate,
                   MnodeEntry mnodeEntry)
Specified by:
remove in interface CacheEngine

updateTime

public void updateTime(HashKey key,
                       MnodeEntry mnodeValue)
Specified by:
updateTime in interface CacheEngine

compareAndPut

public HashKey compareAndPut(DistCacheEntry entry,
                             HashKey testValue,
                             MnodeUpdate mnodeUpdate,
                             java.lang.Object value,
                             CacheConfig config)
Specified by:
compareAndPut in interface CacheEngine

getAndPut

public HashKey getAndPut(DistCacheEntry entry,
                         MnodeUpdate mnodeUpdate,
                         java.lang.Object value,
                         long leaseTimeout,
                         int leaseOwner)
Specified by:
getAndPut in interface CacheEngine