voldemort.store.routed
Class ThreadPoolRoutedStore

java.lang.Object
  extended by voldemort.store.AbstractStore<ByteArray,byte[],byte[]>
      extended by voldemort.store.routed.RoutedStore
          extended by voldemort.store.routed.ThreadPoolRoutedStore
All Implemented Interfaces:
Store<ByteArray,byte[],byte[]>

Deprecated.

@Deprecated
public class ThreadPoolRoutedStore
extends RoutedStore

A Store which multiplexes requests to different internal Stores


Field Summary
 
Fields inherited from class voldemort.store.routed.RoutedStore
failureDetector, innerStores, logger, readRepairer, repairReads, routingStrategy, storeDef, time, timeoutConfig
 
Constructor Summary
ThreadPoolRoutedStore(java.lang.String name, java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores, Cluster cluster, StoreDefinition storeDef, boolean repairReads, java.util.concurrent.ExecutorService threadPool, TimeoutConfig timeoutConfig, FailureDetector failureDetector, Time time)
          Deprecated. Create a RoutedStoreClient
ThreadPoolRoutedStore(java.lang.String name, java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores, Cluster cluster, StoreDefinition storeDef, int numberOfThreads, boolean repairReads, TimeoutConfig timeoutConfig, FailureDetector failureDetector)
          Deprecated. Create a RoutedStoreClient
 
Method Summary
 boolean delete(ByteArray key, Version version)
          Deprecated. Delete all entries prior to the given version
 java.util.List<Versioned<byte[]>> get(ByteArray key, byte[] transforms)
          Deprecated. 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)
          Deprecated. Get the values associated with the given keys and returns them in a Map of keys to a list of versioned values.
 java.util.List<Version> getVersions(ByteArray key)
          Deprecated. Get the versions associated with the given key.
 void put(ByteArray key, Versioned<byte[]> versioned, byte[] transforms)
          Deprecated. Associate the value with the key and version in this store
 
Methods inherited from class voldemort.store.routed.RoutedStore
close, getCapability, getInnerStores, updateRoutingStrategy
 
Methods inherited from class voldemort.store.AbstractStore
delete, get, getAll, getName, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolRoutedStore

public ThreadPoolRoutedStore(java.lang.String name,
                             java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores,
                             Cluster cluster,
                             StoreDefinition storeDef,
                             int numberOfThreads,
                             boolean repairReads,
                             TimeoutConfig timeoutConfig,
                             FailureDetector failureDetector)
Deprecated. 
Create a RoutedStoreClient

Parameters:
name - The name of the store
innerStores - The mapping of node to client
cluster - The cluster metadata
storeDef - The store definition
numberOfThreads - The number of threads in the threadpool
repairReads - Do we want to do read repairs?
timeoutConfig - The timeout configuration
failureDetector - The failure detector implementation

ThreadPoolRoutedStore

public ThreadPoolRoutedStore(java.lang.String name,
                             java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores,
                             Cluster cluster,
                             StoreDefinition storeDef,
                             boolean repairReads,
                             java.util.concurrent.ExecutorService threadPool,
                             TimeoutConfig timeoutConfig,
                             FailureDetector failureDetector,
                             Time time)
Deprecated. 
Create a RoutedStoreClient

Parameters:
name - The name of the store
innerStores - The mapping of node to client
cluster - The cluster metadata
storeDef - The store definition
repairReads - Do we want to do read repairs?
threadPool - The threadpool to use
timeoutConfig - The timeout configuration
failureDetector - The failure detector implementation
time - Time instance
Method Detail

delete

public boolean delete(ByteArray key,
                      Version version)
               throws VoldemortException
Deprecated. 
Description copied from interface: Store
Delete all entries prior to the given version

Specified by:
delete in interface Store<ByteArray,byte[],byte[]>
Overrides:
delete in class AbstractStore<ByteArray,byte[],byte[]>
Parameters:
key - The key to delete
version - The current value of the key
Returns:
True if anything was deleted
Throws:
VoldemortException

getAll

public java.util.Map<ByteArray,java.util.List<Versioned<byte[]>>> getAll(java.lang.Iterable<ByteArray> keys,
                                                                         java.util.Map<ByteArray,byte[]> transforms)
                                                                  throws VoldemortException
Deprecated. 
Description copied from interface: Store
Get the values associated with the given keys and returns them in a Map of keys to a list of versioned values. Note that the returned map will only contain entries for the keys which have a value associated with them.

Specified by:
getAll in interface Store<ByteArray,byte[],byte[]>
Overrides:
getAll in class AbstractStore<ByteArray,byte[],byte[]>
Parameters:
keys - The keys to check for.
Returns:
A Map of keys to a list of versioned values.
Throws:
VoldemortException

get

public java.util.List<Versioned<byte[]>> get(ByteArray key,
                                             byte[] transforms)
Deprecated. 
Description copied from interface: Store
Get the value associated with the given key

Specified by:
get in interface Store<ByteArray,byte[],byte[]>
Overrides:
get in class AbstractStore<ByteArray,byte[],byte[]>
Parameters:
key - The key to check for
Returns:
The value associated with the key or an empty list if no values are found.

put

public void put(ByteArray key,
                Versioned<byte[]> versioned,
                byte[] transforms)
         throws VoldemortException
Deprecated. 
Description copied from interface: Store
Associate the value with the key and version in this store

Specified by:
put in interface Store<ByteArray,byte[],byte[]>
Overrides:
put in class AbstractStore<ByteArray,byte[],byte[]>
Parameters:
key - The key to use
versioned - The value to store and its version.
Throws:
VoldemortException

getVersions

public java.util.List<Version> getVersions(ByteArray key)
Deprecated. 
Description copied from interface: Store
Get the versions associated with the given key. This is used in a put call to write a new value for this key

Specified by:
getVersions in interface Store<ByteArray,byte[],byte[]>
Overrides:
getVersions in class AbstractStore<ByteArray,byte[],byte[]>
Parameters:
key - The key to retrieve the versions for
Returns:
List of Versions associated with this key.


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu