voldemort.store.routed
Class PipelineRoutedStore

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

public class PipelineRoutedStore
extends RoutedStore

A Store which multiplexes requests to different internal Stores


Field Summary
 
Fields inherited from class voldemort.store.routed.RoutedStore
failureDetector, innerStores, logger, name, readRepairer, repairReads, routingStrategy, storeDef, time, timeoutConfig
 
Constructor Summary
PipelineRoutedStore(java.lang.String name, java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores, java.util.Map<java.lang.Integer,NonblockingStore> nonblockingStores, java.util.Map<java.lang.Integer,Store<ByteArray,Slop,byte[]>> slopStores, java.util.Map<java.lang.Integer,NonblockingStore> nonblockingSlopStores, Cluster cluster, StoreDefinition storeDef, boolean repairReads, int clientZoneId, TimeoutConfig timeoutConfig, FailureDetector failureDetector, boolean jmxEnabled, int jmxId)
          Create a PipelineRoutedStore
 
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.util.List<Version> getVersions(ByteArray key)
           
 boolean isHintedHandoffEnabled()
           
 void put(ByteArray key, Versioned<byte[]> versioned, byte[] transforms)
          Associate the value with the key and version in this store
 
Methods inherited from class voldemort.store.routed.RoutedStore
getCapability, getInnerStores, getName, updateRoutingStrategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelineRoutedStore

public PipelineRoutedStore(java.lang.String name,
                           java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores,
                           java.util.Map<java.lang.Integer,NonblockingStore> nonblockingStores,
                           java.util.Map<java.lang.Integer,Store<ByteArray,Slop,byte[]>> slopStores,
                           java.util.Map<java.lang.Integer,NonblockingStore> nonblockingSlopStores,
                           Cluster cluster,
                           StoreDefinition storeDef,
                           boolean repairReads,
                           int clientZoneId,
                           TimeoutConfig timeoutConfig,
                           FailureDetector failureDetector,
                           boolean jmxEnabled,
                           int jmxId)
Create a PipelineRoutedStore

Parameters:
name - The name of the store
innerStores - The mapping of node to client
nonblockingStores -
slopStores - The stores for hints
cluster - Cluster definition
storeDef - Store definition
repairReads - Is read repair enabled?
clientZoneId - Zone the client is in
timeoutMs - Routing timeout
failureDetector - Failure detector object
jmxEnabled - is monitoring enabled
jmxId - unique ID for the factory instance
Method Detail

get

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

Parameters:
key - The key to check for
Returns:
The value associated with the key or an empty list if no values are found.

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
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.

Parameters:
keys - The keys to check for.
Returns:
A Map of keys to a list of versioned values.
Throws:
VoldemortException

getVersions

public java.util.List<Version> getVersions(ByteArray key)

delete

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

Parameters:
key - The key to delete
version - The current value of the key
Returns:
True if anything was deleted
Throws:
VoldemortException

isHintedHandoffEnabled

public boolean isHintedHandoffEnabled()

put

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

Parameters:
key - The key to use
versioned - The value to store and its version.
Throws:
VoldemortException

close

public void close()
Description copied from interface: Store
Close the store.

Specified by:
close in interface Store<ByteArray,byte[],byte[]>
Overrides:
close in class RoutedStore


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