|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvoldemort.store.socket.SocketStore
public class SocketStore
The client implementation of a socket store--translates each request into a network operation to be handled by the socket server on the other side.
SocketStore handles both blocking and non-blocking styles of requesting. For non-blocking requests, SocketStore checks out aClientRequestExecutor instance from the
pool and adds an appropriate
request to be processed by the NIO thread.
| Constructor Summary | |
|---|---|
SocketStore(java.lang.String storeName,
long timeoutMs,
SocketDestination dest,
ClientRequestExecutorPool pool,
RequestRoutingType requestRoutingType)
|
|
| Method Summary | |
|---|---|
void |
close()
Close the store. |
boolean |
delete(ByteArray key,
Version version)
Delete all entries prior to the given version |
java.util.List<Versioned<byte[]>> |
get(ByteArray key,
byte[] transforms)
Get the value associated with the given key |
java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> |
getAll(java.lang.Iterable<ByteArray> keys,
java.util.Map<ByteArray,byte[]> transforms)
Get the values associated with the given keys and returns them in a Map of keys to a list of versioned values. |
java.lang.Object |
getCapability(StoreCapabilityType capability)
Get some capability of the store. |
java.lang.String |
getName()
|
java.util.List<Version> |
getVersions(ByteArray key)
|
void |
put(ByteArray key,
Versioned<byte[]> versioned,
byte[] transforms)
Associate the value with the key and version in this store |
void |
submitDeleteRequest(ByteArray key,
Version version,
NonblockingStoreCallback callback,
long timeoutMs)
|
void |
submitGetAllRequest(java.lang.Iterable<ByteArray> keys,
java.util.Map<ByteArray,byte[]> transforms,
NonblockingStoreCallback callback,
long timeoutMs)
|
void |
submitGetRequest(ByteArray key,
byte[] transforms,
NonblockingStoreCallback callback,
long timeoutMs)
|
void |
submitGetVersionsRequest(ByteArray key,
NonblockingStoreCallback callback,
long timeoutMs)
|
void |
submitPutRequest(ByteArray key,
Versioned<byte[]> value,
byte[] transforms,
NonblockingStoreCallback callback,
long timeoutMs)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SocketStore(java.lang.String storeName,
long timeoutMs,
SocketDestination dest,
ClientRequestExecutorPool pool,
RequestRoutingType requestRoutingType)
| Method Detail |
|---|
public void submitDeleteRequest(ByteArray key,
Version version,
NonblockingStoreCallback callback,
long timeoutMs)
submitDeleteRequest in interface NonblockingStore
public void submitGetRequest(ByteArray key,
byte[] transforms,
NonblockingStoreCallback callback,
long timeoutMs)
submitGetRequest in interface NonblockingStore
public void submitGetAllRequest(java.lang.Iterable<ByteArray> keys,
java.util.Map<ByteArray,byte[]> transforms,
NonblockingStoreCallback callback,
long timeoutMs)
submitGetAllRequest in interface NonblockingStore
public void submitGetVersionsRequest(ByteArray key,
NonblockingStoreCallback callback,
long timeoutMs)
submitGetVersionsRequest in interface NonblockingStore
public void submitPutRequest(ByteArray key,
Versioned<byte[]> value,
byte[] transforms,
NonblockingStoreCallback callback,
long timeoutMs)
submitPutRequest in interface NonblockingStore
public boolean delete(ByteArray key,
Version version)
throws VoldemortException
Store
delete in interface Store<ByteArray,byte[],byte[]>key - The key to deleteversion - The current value of the key
VoldemortException
public java.util.List<Versioned<byte[]>> get(ByteArray key,
byte[] transforms)
throws VoldemortException
Store
get in interface Store<ByteArray,byte[],byte[]>key - The key to check for
VoldemortException
public java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> getAll(java.lang.Iterable<ByteArray> keys,
java.util.Map<ByteArray,byte[]> transforms)
throws VoldemortException
Store
getAll in interface Store<ByteArray,byte[],byte[]>keys - The keys to check for.
VoldemortExceptionpublic java.util.List<Version> getVersions(ByteArray key)
getVersions in interface Store<ByteArray,byte[],byte[]>
public void put(ByteArray key,
Versioned<byte[]> versioned,
byte[] transforms)
throws VoldemortException
Store
put in interface Store<ByteArray,byte[],byte[]>key - The key to useversioned - The value to store and its version.
VoldemortExceptionpublic java.lang.Object getCapability(StoreCapabilityType capability)
Store
getCapability in interface Store<ByteArray,byte[],byte[]>capability - The capability type to retrieve
public java.lang.String getName()
getName in interface Store<ByteArray,byte[],byte[]>
public void close()
throws VoldemortException
Store
close in interface NonblockingStoreclose in interface Store<ByteArray,byte[],byte[]>VoldemortException - If closing fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||