public final class ClusterCacheEngine extends java.lang.Object implements CacheEngine
| Constructor and Description |
|---|
ClusterCacheEngine(CacheStoreManager cacheService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAndPut(DistCacheEntry entry,
long testValue,
MnodeUpdate mnodeUpdate,
long valueDataId,
long valueDataTime) |
protected StreamSource |
createDataSource(long valueIndex,
long valueDataTime) |
MnodeEntry |
get(DistCacheEntry entry) |
java.io.InputStream |
getAndPut(DistCacheEntry entry,
MnodeUpdate mnodeUpdate,
long valueDataId,
long valueDataTime)
Sets a cache entry
|
CacheBackupEngine |
getBackupEngine() |
int |
getSelfIndex()
Returns the self index
|
int |
getServerIndex() |
void |
initCache(CacheImpl cache) |
boolean |
isLocalExpired(CacheConfig config,
HashKey key,
MnodeEntry mnodeEntry,
long now) |
void |
loadClusterDataBackground(DistCacheEntry entry,
MnodeValue mnodeValue) |
void |
notifyLease(HashKey key,
HashKey cacheKey,
int leaseOwner) |
void |
put(HashKey key,
HashKey cacheKey,
MnodeUpdate mnodeUpdate,
long valueDataId,
long valueDataTime) |
void |
remove(HashKey key,
HashKey cacheKey,
MnodeUpdate mnodeUpdate) |
void |
setBackupEngine(CacheBackupEngine engine) |
void |
start()
Starts the service
|
void |
updateTime(HashKey key,
HashKey cacheKey,
MnodeEntry mnodeValue) |
public ClusterCacheEngine(CacheStoreManager cacheService)
public int getServerIndex()
getServerIndex in interface CacheEnginepublic void setBackupEngine(CacheBackupEngine engine)
public CacheBackupEngine getBackupEngine()
public void start()
CacheEnginestart in interface CacheEnginepublic int getSelfIndex()
public void initCache(CacheImpl cache)
initCache in interface CacheEnginepublic boolean isLocalExpired(CacheConfig config, HashKey key, MnodeEntry mnodeEntry, long now)
isLocalExpired in interface CacheEnginepublic void loadClusterDataBackground(DistCacheEntry entry, MnodeValue mnodeValue)
public MnodeEntry get(DistCacheEntry entry)
get in interface CacheEnginepublic void updateTime(HashKey key, HashKey cacheKey, MnodeEntry mnodeValue)
updateTime in interface CacheEnginepublic void put(HashKey key, HashKey cacheKey, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime)
put in interface CacheEnginepublic void remove(HashKey key, HashKey cacheKey, MnodeUpdate mnodeUpdate)
remove in interface CacheEnginepublic java.io.InputStream getAndPut(DistCacheEntry entry, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime)
getAndPut in interface CacheEnginepublic boolean compareAndPut(DistCacheEntry entry, long testValue, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime)
compareAndPut in interface CacheEnginepublic void notifyLease(HashKey key, HashKey cacheKey, int leaseOwner)
notifyLease in interface CacheEngineprotected StreamSource createDataSource(long valueIndex, long valueDataTime)