public class RemoteStore extends LocalStoreImpl implements StorePersistence
LocalStoreImpl.RecentCacheStats
Modifier and Type | Field and Description |
---|---|
protected boolean |
blockValue |
static long |
DELAY_TIMEOUT |
protected DeleteTrigger |
deleteTrigger |
protected String |
deleteTriggerName |
protected Delta |
delta |
protected Serializer |
embeddedSerializer |
protected GetTrigger |
getTrigger |
protected String |
getTriggerName |
protected PutTrigger |
putTrigger |
protected String |
putTriggerName |
protected ThreadLoader |
threadLoader |
blockSize, delay, filename, getFreq, getTimes, isSorted, logPath, logQueue, mode, needLogThread, needPstThread, path, pstQueue, putFreq, putTimes, recentCacheStats, removeFreq, removeTimes, replicaClientList, serializer, statList, store
Constructor and Description |
---|
RemoteStore() |
RemoteStore(voldemort.store.cachestore.impl.CacheStore cacheStore,
boolean delay,
int mode) |
RemoteStore(String filename,
Serializer serializer,
boolean delay,
int mode) |
RemoteStore(String filename,
Serializer serializer,
int mode) |
RemoteStore(String filename,
Serializer serializer,
String path,
boolean delay,
voldemort.store.cachestore.BlockSize blockSize,
int mode) |
Modifier and Type | Method and Description |
---|---|
void |
close()
close remote server, replica client and server if it existed
|
static int |
decodeRecord(long rv) |
static long |
decodeVersion(long rv) |
static long |
encodeRV(long version,
int record) |
voldemort.store.cachestore.Value |
get(voldemort.store.cachestore.Key key) |
DeleteTrigger |
getDeleteTrigger() |
Delta |
getDelta() |
GetTrigger |
getGetTrigger() |
PutTrigger |
getPutTrigger() |
void |
insert(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value)
insert will perform get to make sure key did not exist
|
List<voldemort.store.cachestore.voldeimpl.KeyValue> |
multiGets(List<voldemort.store.cachestore.Key> keys) |
List<voldemort.store.cachestore.voldeimpl.KeyValue> |
multiPuts(List<voldemort.store.cachestore.voldeimpl.KeyValue> list) |
List<voldemort.store.cachestore.voldeimpl.KeyValue> |
multiRemove(List<voldemort.store.cachestore.Key> keys) |
void |
put(voldemort.store.cachestore.Key key,
Object object)
we don't support this for remote client
|
void |
put(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value) |
void |
reloadTrigger() |
boolean |
remove(voldemort.store.cachestore.Key key) |
void |
setBlockValue(boolean blockValue) |
void |
setDeleteTrigger(String triggerName) |
void |
setDelta(Delta delta) |
void |
setGetTrigger(String triggerName) |
void |
setGetTrigger(String triggerName,
StoreConfig storeConfig) |
void |
setPutTrigger(String triggerName) |
void |
setupTrigger2Cache(StoreConfig storeConfig)
look up storeConfig to determine if trigger had been defined or not
if it is, load each interface implementation use Class.forName
also if useMaxCache set to true, it use FIFO queue and getMaxCacheMemory to configure the cache by number
of objects, not the capacity of memory bytes
useLRU flag to determine LRU algorithm had been used or not
all implementations ars located at Scan4CallBack handler when request message wree processed
|
void |
startPstReplica(String logPath,
List<String> urls) |
void |
startReplica(String logPath,
List<String> urls) |
backup, containsKey, createPath, dumpLinkQueue, getBackupDuration, getBackupEndTime, getBackupStartTime, getBlockOverflow, getCache, getCacheHitPercentage, getCacheHits, getCacheMisses, getDelayQueueCapacity, getFileSize, getGetFreq, getGetMetric, getGetTimes, getKeyIterator, getPackDuration, getPackEndTime, getPackStartTime, getPuregeDuration, getPurgeEndTime, getPurgeStartTime, getPurgeTrigger, getPutFreq, getPutMetric, getPutTimes, getRecentCacheHitPercentage, getRecentCacheHits, getRecentCacheMisses, getRecentCount, getRecentEmpty, getRecentSkips, getRemote, getRemoveFreq, getRemoveMetric, getRemoveTimes, getReplicaClientInfo, getReplicaClientList, getSerializer, getStore, getStoreInfo, getStoreName, getStoreStat, getTotalActiveRecords, getTotalActiveRecordsPercentage, getTotalDeletedRecords, getTotalRecords, getWriteBackThread, init, init, pack, purge, putInMap, resetIndex, restartReplicaClients, setPurge, setReplicaBatcSize, shutdownClient, size, startPstLogThread, startWriteLogThread, startWriteThread, stopReplicaClients, validateLink
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
backup, getKeyIterator, pack, size
protected volatile GetTrigger getTrigger
protected volatile PutTrigger putTrigger
protected volatile DeleteTrigger deleteTrigger
protected volatile Delta delta
public static final long DELAY_TIMEOUT
protected Serializer embeddedSerializer
protected ThreadLoader threadLoader
protected String getTriggerName
protected String putTriggerName
protected String deleteTriggerName
protected volatile boolean blockValue
public RemoteStore()
public RemoteStore(String filename, Serializer serializer, int mode)
public RemoteStore(String filename, Serializer serializer, String path, boolean delay, voldemort.store.cachestore.BlockSize blockSize, int mode)
public RemoteStore(String filename, Serializer serializer, boolean delay, int mode)
public RemoteStore(voldemort.store.cachestore.impl.CacheStore cacheStore, boolean delay, int mode)
public GetTrigger getGetTrigger()
public PutTrigger getPutTrigger()
public void setGetTrigger(String triggerName)
public void setGetTrigger(String triggerName, StoreConfig storeConfig)
public void setPutTrigger(String triggerName)
public DeleteTrigger getDeleteTrigger()
public void setDeleteTrigger(String triggerName)
public Delta getDelta()
public void setDelta(Delta delta)
public void setBlockValue(boolean blockValue)
public void setupTrigger2Cache(StoreConfig storeConfig)
storeConfig
- public void reloadTrigger()
public void startReplica(String logPath, List<String> urls)
logPath
- - path for WAGurls
- - urls for replica clientpublic void close()
close
in interface Persistence
close
in class LocalStoreImpl
public void put(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value)
put
in interface StorePersistence
put
in class LocalStoreImpl
key
- value
- CacheValuepublic static long encodeRV(long version, int record)
public static int decodeRecord(long rv)
public static long decodeVersion(long rv)
public boolean remove(voldemort.store.cachestore.Key key) throws voldemort.store.cachestore.StoreException
remove
in interface Persistence
remove
in class LocalStoreImpl
key
- voldemort.store.cachestore.StoreException
public voldemort.store.cachestore.Value get(voldemort.store.cachestore.Key key)
get
in interface Persistence
get
in interface StorePersistence
get
in class LocalStoreImpl
key
- public void insert(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value)
insert
in interface StorePersistence
key
- value
- public void put(voldemort.store.cachestore.Key key, Object object)
put
in interface Persistence
put
in class LocalStoreImpl
key
- object
- public List<voldemort.store.cachestore.voldeimpl.KeyValue> multiGets(List<voldemort.store.cachestore.Key> keys)
keys
- public List<voldemort.store.cachestore.voldeimpl.KeyValue> multiRemove(List<voldemort.store.cachestore.Key> keys)
keys
- - list of keyCopyright © 2016. All rights reserved.