public class LocalStoreImpl<T> extends Object implements Persistence<T>
Modifier and Type | Class and Description |
---|---|
class |
LocalStoreImpl.RecentCacheStats |
Modifier and Type | Field and Description |
---|---|
protected voldemort.store.cachestore.BlockSize |
blockSize |
protected boolean |
delay |
protected String |
filename |
protected AtomicLong |
getFreq |
protected AtomicLong |
getTimes |
protected boolean |
isSorted |
protected static org.apache.commons.logging.Log |
logger |
protected String |
logPath |
protected LinkedBlockingQueue<voldemort.store.cachestore.voldeimpl.KeyValue> |
logQueue |
protected int |
mode |
protected boolean |
needLogThread |
protected boolean |
needPstThread |
protected String |
path |
protected LinkedBlockingQueue<voldemort.store.cachestore.voldeimpl.KeyValue> |
pstQueue |
protected AtomicLong |
putFreq |
protected AtomicLong |
putTimes |
protected LocalStoreImpl.RecentCacheStats |
recentCacheStats |
protected AtomicLong |
removeFreq |
protected AtomicLong |
removeTimes |
protected List<ReplicaClient> |
replicaClientList |
protected Serializer |
serializer |
protected List<Long> |
statList |
protected voldemort.store.cachestore.impl.CacheStore |
store |
Constructor and Description |
---|
LocalStoreImpl() |
LocalStoreImpl(voldemort.store.cachestore.impl.CacheStore cacheStore,
boolean delay,
int mode) |
LocalStoreImpl(String filename,
Serializer serializer,
boolean delay,
int mode) |
LocalStoreImpl(String filename,
Serializer serializer,
int mode) |
LocalStoreImpl(String filename,
Serializer serializer,
String path,
boolean delay,
voldemort.store.cachestore.BlockSize blockSize,
int mode) |
LocalStoreImpl(String filename,
Serializer serializer,
String path,
boolean delay,
voldemort.store.cachestore.BlockSize blockSize,
int mode,
boolean isSorted) |
Modifier and Type | Method and Description |
---|---|
void |
backup(String path,
int rate) |
void |
close() |
boolean |
containsKey(voldemort.store.cachestore.Key key) |
protected void |
createPath(String path)
make sure the path is exist, otherwise create it
|
String |
dumpLinkQueue() |
T |
get(voldemort.store.cachestore.Key key) |
String |
getBackupDuration() |
String |
getBackupEndTime() |
String |
getBackupStartTime() |
long |
getBlockOverflow() |
String |
getCache() |
long |
getCacheHitPercentage() |
long |
getCacheHits() |
long |
getCacheMisses() |
int |
getDelayQueueCapacity() |
long |
getFileSize() |
long |
getGetFreq() |
String |
getGetMetric() |
long |
getGetTimes() |
Iterator |
getKeyIterator() |
String |
getPackDuration() |
String |
getPackEndTime() |
String |
getPackStartTime() |
String |
getPuregeDuration() |
String |
getPurgeEndTime() |
String |
getPurgeStartTime() |
long |
getPurgeTrigger() |
long |
getPutFreq() |
String |
getPutMetric() |
long |
getPutTimes() |
long |
getRecentCacheHitPercentage() |
long |
getRecentCacheHits() |
long |
getRecentCacheMisses() |
long |
getRecentCount() |
long |
getRecentEmpty() |
long |
getRecentSkips() |
protected voldemort.store.cachestore.Value |
getRemote(voldemort.store.cachestore.Key key) |
long |
getRemoveFreq() |
String |
getRemoveMetric() |
long |
getRemoveTimes() |
String |
getReplicaClientInfo() |
List<ReplicaClient> |
getReplicaClientList() |
Serializer |
getSerializer() |
voldemort.store.cachestore.impl.CacheStore |
getStore() |
String |
getStoreInfo() |
String |
getStoreName() |
String |
getStoreStat() |
long |
getTotalActiveRecords() |
long |
getTotalActiveRecordsPercentage() |
long |
getTotalDeletedRecords() |
long |
getTotalRecords() |
String |
getWriteBackThread() |
protected void |
init() |
protected void |
init(voldemort.store.cachestore.impl.CacheStore cacheStore) |
void |
pack(int rate) |
void |
purge() |
void |
put(voldemort.store.cachestore.Key key,
T object) |
void |
put(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value) |
void |
putInMap(voldemort.store.cachestore.Key key,
T object) |
boolean |
remove(voldemort.store.cachestore.Key key) |
void |
resetIndex(int index,
String url,
int record) |
void |
restartReplicaClients() |
void |
setPurge(voldemort.store.cachestore.impl.Purge purge) |
void |
setReplicaBatcSize(int size) |
protected void |
shutdownClient()
shutdown replica client
|
int |
size() |
void |
startPstLogThread(String logPath,
List<String> urls) |
void |
startWriteLogThread(String logPath,
List<String> urls) |
void |
startWriteThread(int no) |
void |
stopReplicaClients() |
String |
validateLink() |
protected static org.apache.commons.logging.Log logger
protected voldemort.store.cachestore.impl.CacheStore store
protected String path
protected String filename
protected Serializer serializer
protected boolean delay
protected voldemort.store.cachestore.BlockSize blockSize
protected LocalStoreImpl.RecentCacheStats recentCacheStats
protected int mode
protected AtomicLong getFreq
protected AtomicLong getTimes
protected AtomicLong putFreq
protected AtomicLong putTimes
protected AtomicLong removeFreq
protected AtomicLong removeTimes
protected boolean isSorted
protected LinkedBlockingQueue<voldemort.store.cachestore.voldeimpl.KeyValue> logQueue
protected volatile boolean needLogThread
protected List<ReplicaClient> replicaClientList
protected String logPath
protected LinkedBlockingQueue<voldemort.store.cachestore.voldeimpl.KeyValue> pstQueue
protected volatile boolean needPstThread
public LocalStoreImpl()
public LocalStoreImpl(String filename, Serializer serializer, String path, boolean delay, voldemort.store.cachestore.BlockSize blockSize, int mode, boolean isSorted)
public LocalStoreImpl(String filename, Serializer serializer, String path, boolean delay, voldemort.store.cachestore.BlockSize blockSize, int mode)
public LocalStoreImpl(String filename, Serializer serializer, boolean delay, int mode)
public LocalStoreImpl(String filename, Serializer serializer, int mode)
public LocalStoreImpl(voldemort.store.cachestore.impl.CacheStore cacheStore, boolean delay, int mode)
protected void init(voldemort.store.cachestore.impl.CacheStore cacheStore)
protected void init()
public Serializer getSerializer()
public void put(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value)
public void put(voldemort.store.cachestore.Key key, T object)
put
in interface Persistence<T>
public void putInMap(voldemort.store.cachestore.Key key, T object)
protected voldemort.store.cachestore.Value getRemote(voldemort.store.cachestore.Key key)
public T get(voldemort.store.cachestore.Key key)
get
in interface Persistence<T>
public boolean remove(voldemort.store.cachestore.Key key)
remove
in interface Persistence<T>
public boolean containsKey(voldemort.store.cachestore.Key key)
public void close()
close
in interface Persistence<T>
public Iterator getKeyIterator()
getKeyIterator
in interface Persistence<T>
public int size()
size
in interface Persistence<T>
public voldemort.store.cachestore.impl.CacheStore getStore()
public void pack(int rate)
pack
in interface Persistence<T>
public void backup(String path, int rate)
backup
in interface Persistence<T>
public String getStoreStat()
public String getStoreName()
public long getTotalRecords()
public long getTotalDeletedRecords()
public long getTotalActiveRecords()
public long getTotalActiveRecordsPercentage()
public long getFileSize()
public long getBlockOverflow()
public long getPurgeTrigger()
public long getCacheHits()
public long getCacheMisses()
public long getCacheHitPercentage()
public long getRecentCacheHits()
public long getRecentCacheMisses()
public long getRecentCacheHitPercentage()
public String getPackStartTime()
public String getPackEndTime()
public String getPackDuration()
public String getBackupStartTime()
public String getBackupEndTime()
public String getBackupDuration()
public String getPurgeStartTime()
public String getPurgeEndTime()
public String getPuregeDuration()
public String getStoreInfo()
public long getRecentCount()
public long getRecentSkips()
public long getRecentEmpty()
public long getGetFreq()
public long getGetTimes()
public long getPutFreq()
public long getPutTimes()
public long getRemoveFreq()
public long getRemoveTimes()
public int getDelayQueueCapacity()
public String validateLink()
public String getCache()
public String dumpLinkQueue()
public String getWriteBackThread()
public void startWriteThread(int no)
public void purge()
public void setPurge(voldemort.store.cachestore.impl.Purge purge)
public void startWriteLogThread(String logPath, List<String> urls)
logPath
- - for write ahead log which appends log path with current data pathurls
- - list of url for replica client, format (machine:port)protected void createPath(String path)
path
- of data directorypublic void stopReplicaClients()
public void restartReplicaClients()
public void resetIndex(int index, String url, int record)
public List<ReplicaClient> getReplicaClientList()
public String getReplicaClientInfo()
public void setReplicaBatcSize(int size)
protected void shutdownClient()
public String getGetMetric()
public String getPutMetric()
public String getRemoveMetric()
Copyright © 2016. All rights reserved.