|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvoldemort.store.DelegatingStore<ByteArray,byte[],byte[]>
voldemort.store.rebalancing.RedirectingStore
public class RedirectingStore
The RedirectingStore extends DelegatingStore
If current server_state is MetadataStore.VoldemortState.REBALANCING_MASTER_SERVER
then before serving any client request do a remote get() call, put it locally
ignoring any ObsoleteVersionException and then serve the client
requests. This piece of code is run on the stealer nodes.
| Constructor Summary | |
|---|---|
RedirectingStore(Store<ByteArray,byte[],byte[]> innerStore,
MetadataStore metadata,
StoreRepository storeRepository,
FailureDetector detector,
SocketStoreFactory storeFactory)
|
|
| Method Summary | |
|---|---|
boolean |
delete(ByteArray key,
Version version)
TODO : Handle delete correctly. |
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. |
boolean |
getIsRedirectingStoreEnabled()
|
java.util.List<Version> |
getVersions(ByteArray key)
|
void |
put(ByteArray key,
Versioned<byte[]> value,
byte[] transforms)
Associate the value with the key and version in this store |
void |
setIsRedirectingStoreEnabled(boolean isRedirectingStoreEnabled)
|
| Methods inherited from class voldemort.store.DelegatingStore |
|---|
close, getCapability, getInnerStore, getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RedirectingStore(Store<ByteArray,byte[],byte[]> innerStore,
MetadataStore metadata,
StoreRepository storeRepository,
FailureDetector detector,
SocketStoreFactory storeFactory)
| Method Detail |
|---|
public void setIsRedirectingStoreEnabled(boolean isRedirectingStoreEnabled)
public boolean getIsRedirectingStoreEnabled()
public void put(ByteArray key,
Versioned<byte[]> value,
byte[] transforms)
throws VoldemortException
Store
put in interface Store<ByteArray,byte[],byte[]>put in class DelegatingStore<ByteArray,byte[],byte[]>key - The key to usevalue - The value to store and its version.
VoldemortException
public java.util.List<Versioned<byte[]>> get(ByteArray key,
byte[] transforms)
throws VoldemortException
Store
get in interface Store<ByteArray,byte[],byte[]>get in class DelegatingStore<ByteArray,byte[],byte[]>key - The key to check for
VoldemortExceptionpublic java.util.List<Version> getVersions(ByteArray key)
getVersions in interface Store<ByteArray,byte[],byte[]>getVersions in class DelegatingStore<ByteArray,byte[],byte[]>
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[]>getAll in class DelegatingStore<ByteArray,byte[],byte[]>keys - The keys to check for.
VoldemortException
public boolean delete(ByteArray key,
Version version)
throws VoldemortException
The options are:
delete in interface Store<ByteArray,byte[],byte[]>delete in class DelegatingStore<ByteArray,byte[],byte[]>key - The key to deleteversion - The current value of the key
VoldemortException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||