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 CacheEngine
public void setBackupEngine(CacheBackupEngine engine)
public CacheBackupEngine getBackupEngine()
public void start()
CacheEngine
start
in interface CacheEngine
public int getSelfIndex()
public void initCache(CacheImpl cache)
initCache
in interface CacheEngine
public boolean isLocalExpired(CacheConfig config, HashKey key, MnodeEntry mnodeEntry, long now)
isLocalExpired
in interface CacheEngine
public void loadClusterDataBackground(DistCacheEntry entry, MnodeValue mnodeValue)
public MnodeEntry get(DistCacheEntry entry)
get
in interface CacheEngine
public void updateTime(HashKey key, HashKey cacheKey, MnodeEntry mnodeValue)
updateTime
in interface CacheEngine
public void put(HashKey key, HashKey cacheKey, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime)
put
in interface CacheEngine
public void remove(HashKey key, HashKey cacheKey, MnodeUpdate mnodeUpdate)
remove
in interface CacheEngine
public java.io.InputStream getAndPut(DistCacheEntry entry, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime)
getAndPut
in interface CacheEngine
public boolean compareAndPut(DistCacheEntry entry, long testValue, MnodeUpdate mnodeUpdate, long valueDataId, long valueDataTime)
compareAndPut
in interface CacheEngine
public void notifyLease(HashKey key, HashKey cacheKey, int leaseOwner)
notifyLease
in interface CacheEngine
protected StreamSource createDataSource(long valueIndex, long valueDataTime)