public abstract class RemoteClientImpl extends Object implements RemotePersistence
Modifier and Type | Field and Description |
---|---|
protected Client |
client |
protected Serializer |
embeddedSerializer |
protected int |
index |
protected boolean |
nio |
protected AtomicLong |
seqno |
protected Serializer |
serializer |
protected String |
store |
protected long |
timeout |
protected Header.SerializableType |
type |
protected String |
url |
protected String[] |
urlArrays |
Constructor and Description |
---|
RemoteClientImpl() |
Modifier and Type | Method and Description |
---|---|
void |
backup(String path,
int rate) |
void |
close() |
protected Request |
createRequest(byte[] payload,
Request.RequestType requestType) |
voldemort.store.cachestore.Value |
get(voldemort.store.cachestore.Key key) |
voldemort.store.cachestore.Value |
get4Php(voldemort.store.cachestore.Key key)
return the value and bypass the serializer
|
protected Client |
getClient() |
Iterator |
getKeyIterator() |
List<voldemort.store.cachestore.Key> |
getKeyList() |
long |
getSeqNo(voldemort.store.cachestore.Key key) |
long |
getSeqNoBlock(voldemort.store.cachestore.Key key,
int block) |
int |
getSeqNoBlockInt(voldemort.store.cachestore.Key key,
int block) |
int |
getSeqNoInt(voldemort.store.cachestore.Key key) |
String |
getStore() |
protected abstract void |
getTCPClient() |
protected void |
init() |
void |
insert(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value) |
Object |
invoke(Invoker invoker) |
void |
pack(int rate) |
void |
put(voldemort.store.cachestore.Key key,
Object data) |
void |
put(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value) |
void |
put4Php(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value) |
void |
put4Value(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value)
put4Value is primary to put Value into KeyStore
KeyStore value is encoded different, It bypass the serializer
use Utils.putLong and putInt to encode byte[], use RemoteValue to construct value object
|
List<voldemort.store.cachestore.voldeimpl.KeyValue> |
query(String queryStr) |
String |
query4Json(String queryStr) |
boolean |
remove(voldemort.store.cachestore.Key key) |
voldemort.store.cachestore.Value |
selectQuery(voldemort.store.cachestore.Key key,
String queryStr) |
void |
sendPayload(byte[] bytes) |
protected Response |
sendRequest(Request request) |
protected void |
setClient(Client client) |
void |
setType(Header.SerializableType type) |
int |
size() |
String |
toString() |
void |
updateQuery(voldemort.store.cachestore.Key key,
voldemort.store.cachestore.Value value,
String queryStr) |
protected String store
protected String url
protected Serializer serializer
protected Client client
protected AtomicLong seqno
protected int index
protected String[] urlArrays
protected Serializer embeddedSerializer
protected boolean nio
protected long timeout
protected Header.SerializableType type
protected void init()
protected abstract void getTCPClient()
protected Client getClient()
protected void setClient(Client client)
public String getStore()
public void setType(Header.SerializableType type)
public void put(voldemort.store.cachestore.Key key, Object data)
put
in interface Persistence
protected Request createRequest(byte[] payload, Request.RequestType requestType)
public void put(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value)
put
in interface StorePersistence
public void updateQuery(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value, String queryStr)
public void sendPayload(byte[] bytes)
public void put4Php(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value)
public void put4Value(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value)
key
- value
- public voldemort.store.cachestore.Value get4Php(voldemort.store.cachestore.Key key)
key
- public voldemort.store.cachestore.Value get(voldemort.store.cachestore.Key key)
get
in interface Persistence
get
in interface StorePersistence
public voldemort.store.cachestore.Value selectQuery(voldemort.store.cachestore.Key key, String queryStr)
public void insert(voldemort.store.cachestore.Key key, voldemort.store.cachestore.Value value)
insert
in interface StorePersistence
key
- value
- throw store exception if key is existpublic boolean remove(voldemort.store.cachestore.Key key)
remove
in interface Persistence
public void close()
close
in interface Persistence
public Iterator getKeyIterator()
getKeyIterator
in interface Persistence
public int size()
size
in interface Persistence
public void pack(int rate)
pack
in interface Persistence
public long getSeqNo(voldemort.store.cachestore.Key key)
getSeqNo
in interface RemotePersistence
public int getSeqNoInt(voldemort.store.cachestore.Key key)
getSeqNoInt
in interface RemotePersistence
public long getSeqNoBlock(voldemort.store.cachestore.Key key, int block)
getSeqNoBlock
in interface RemotePersistence
public int getSeqNoBlockInt(voldemort.store.cachestore.Key key, int block)
getSeqNoBlockInt
in interface RemotePersistence
public Object invoke(Invoker invoker)
invoke
in interface RemotePersistence
public void backup(String path, int rate)
backup
in interface Persistence
public List<voldemort.store.cachestore.Key> getKeyList()
getKeyList
in interface RemotePersistence
Copyright © 2016. All rights reserved.