public class CacheDataBackingImpl extends java.lang.Object implements CacheDataBacking
Constructor and Description |
---|
CacheDataBackingImpl(CacheStoreManager storeManager) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the backing.
|
DataStore |
getDataStore()
Returns the underlying DataStore, used for serialization.
|
java.util.Iterator<HashKey> |
getEntries(HashKey cacheKey) |
MnodeStore |
getMnodeStore() |
double |
getReaperCycleIdleToActiveUtilizationRatio() |
long |
getReaperCycleMaxActiveTime() |
long |
getReaperTimeout() |
long |
getStartupLastUpdateTime()
Returns the last update time on server startup.
|
long |
getStartupLastUpdateTime(HashKey cacheKey)
Returns the last update time on server startup.
|
java.util.ArrayList<CacheData> |
getUpdates(HashKey cacheKey,
long accessTime,
int offset)
Returns a set of entries since an access time.
|
java.util.ArrayList<CacheData> |
getUpdates(long accessTime,
int offset)
Returns a set of entries since an access time.
|
MnodeEntry |
insertLocalValue(HashKey key,
HashKey cacheKey,
MnodeEntry mnodeUpdate,
MnodeEntry oldEntryValue)
Sets a cache entry
|
boolean |
isDataAvailable(long valueIndex,
long valueDataTime) |
java.sql.Blob |
loadBlob(long valueDataId,
long valueDataTime) |
boolean |
loadData(long valueDataId,
long valueDataTime,
WriteStream os) |
MnodeEntry |
loadLocalEntryValue(HashKey key)
Returns the local value from the database
|
boolean |
putLocalValue(MnodeEntry mnodeEntry,
HashKey key,
HashKey cacheKey,
MnodeEntry oldEntryEntry,
MnodeUpdate mnodeUpdate)
Sets a cache entry
|
boolean |
removeData(long dataId,
long dataTime) |
DataStore.DataItem |
saveData(java.io.InputStream is,
int length) |
DataStore.DataItem |
saveData(StreamSource source,
int length) |
MnodeEntry |
saveLocalUpdateTime(HashKey keyHash,
MnodeEntry mnodeValue,
MnodeEntry oldMnodeValue) |
void |
setDataStore(DataStore dataStore) |
void |
setMnodeStore(MnodeStore mnodeStore) |
void |
setReaperCycleIdleToActiveUtilizationRatio(double ratio) |
void |
setReaperCycleMaxActiveTime(long ms) |
void |
setReaperTimeout(long ms) |
void |
start() |
java.lang.String |
toString() |
public CacheDataBackingImpl(CacheStoreManager storeManager)
public void setDataStore(DataStore dataStore)
public void setMnodeStore(MnodeStore mnodeStore)
public DataStore getDataStore()
CacheDataBacking
getDataStore
in interface CacheDataBacking
public MnodeStore getMnodeStore()
getMnodeStore
in interface CacheDataBacking
public long getReaperTimeout()
public void setReaperTimeout(long ms)
public long getReaperCycleMaxActiveTime()
public void setReaperCycleMaxActiveTime(long ms)
public double getReaperCycleIdleToActiveUtilizationRatio()
public void setReaperCycleIdleToActiveUtilizationRatio(double ratio)
public MnodeEntry loadLocalEntryValue(HashKey key)
loadLocalEntryValue
in interface CacheDataBacking
public MnodeEntry insertLocalValue(HashKey key, HashKey cacheKey, MnodeEntry mnodeUpdate, MnodeEntry oldEntryValue)
insertLocalValue
in interface CacheDataBacking
public boolean putLocalValue(MnodeEntry mnodeEntry, HashKey key, HashKey cacheKey, MnodeEntry oldEntryEntry, MnodeUpdate mnodeUpdate)
CacheDataBacking
putLocalValue
in interface CacheDataBacking
public MnodeEntry saveLocalUpdateTime(HashKey keyHash, MnodeEntry mnodeValue, MnodeEntry oldMnodeValue)
saveLocalUpdateTime
in interface CacheDataBacking
public boolean loadData(long valueDataId, long valueDataTime, WriteStream os) throws java.io.IOException
loadData
in interface CacheDataBacking
java.io.IOException
public java.sql.Blob loadBlob(long valueDataId, long valueDataTime)
loadBlob
in interface CacheDataBacking
public DataStore.DataItem saveData(StreamSource source, int length)
saveData
in interface CacheDataBacking
public DataStore.DataItem saveData(java.io.InputStream is, int length) throws java.io.IOException
saveData
in interface CacheDataBacking
java.io.IOException
public boolean removeData(long dataId, long dataTime)
removeData
in interface CacheDataBacking
public boolean isDataAvailable(long valueIndex, long valueDataTime)
isDataAvailable
in interface CacheDataBacking
public long getStartupLastUpdateTime()
getStartupLastUpdateTime
in interface CacheDataBacking
public long getStartupLastUpdateTime(HashKey cacheKey)
getStartupLastUpdateTime
in interface CacheDataBacking
public java.util.ArrayList<CacheData> getUpdates(long accessTime, int offset)
getUpdates
in interface CacheDataBacking
public java.util.ArrayList<CacheData> getUpdates(HashKey cacheKey, long accessTime, int offset)
getUpdates
in interface CacheDataBacking
public void start()
start
in interface CacheDataBacking
public void close()
CacheDataBacking
close
in interface CacheDataBacking
public java.lang.String toString()
toString
in class java.lang.Object