com.caucho.server.distcache
Class AbstractCacheEngine
java.lang.Object
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
Method Summary |
boolean |
compareAndPut(DistCacheEntry entry,
long testValue,
MnodeUpdate mnodeUpdate,
long valueDataId)
|
MnodeValue |
get(DistCacheEntry entry)
|
java.io.InputStream |
getAndPut(DistCacheEntry entry,
MnodeUpdate mnodeValue,
long valueDataId)
|
int |
getServerIndex()
|
void |
initCache(CacheImpl cache)
|
boolean |
isLocalExpired(CacheConfig config,
HashKey key,
MnodeEntry mnodeEntry,
long now)
|
void |
notifyLease(HashKey key,
HashKey cacheKey,
int leaseOwner)
|
void |
put(HashKey key,
HashKey cacheKey,
MnodeUpdate mnodeUpdate,
long valueDataId)
|
void |
remove(HashKey key,
HashKey cacheKey,
MnodeUpdate mnodeUpdate)
|
void |
start()
Starts the service |
void |
updateTime(HashKey key,
HashKey cacheKey,
MnodeEntry mnodeValue)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractCacheEngine
public AbstractCacheEngine()
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
getServerIndex
public int getServerIndex()
- Specified by:
getServerIndex
in interface CacheEngine
isLocalExpired
public boolean isLocalExpired(CacheConfig config,
HashKey key,
MnodeEntry mnodeEntry,
long now)
- Specified by:
isLocalExpired
in interface CacheEngine
get
public MnodeValue get(DistCacheEntry entry)
- Specified by:
get
in interface CacheEngine
put
public void put(HashKey key,
HashKey cacheKey,
MnodeUpdate mnodeUpdate,
long valueDataId)
- Specified by:
put
in interface CacheEngine
remove
public void remove(HashKey key,
HashKey cacheKey,
MnodeUpdate mnodeUpdate)
- Specified by:
remove
in interface CacheEngine
updateTime
public void updateTime(HashKey key,
HashKey cacheKey,
MnodeEntry mnodeValue)
- Specified by:
updateTime
in interface CacheEngine
compareAndPut
public boolean compareAndPut(DistCacheEntry entry,
long testValue,
MnodeUpdate mnodeUpdate,
long valueDataId)
- Specified by:
compareAndPut
in interface CacheEngine
getAndPut
public java.io.InputStream getAndPut(DistCacheEntry entry,
MnodeUpdate mnodeValue,
long valueDataId)
- Specified by:
getAndPut
in interface CacheEngine
notifyLease
public void notifyLease(HashKey key,
HashKey cacheKey,
int leaseOwner)
- Specified by:
notifyLease
in interface CacheEngine