voldemort.store.routed
Class RoutedStore

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

public abstract class RoutedStore
extends AbstractStore<ByteArray,byte[],byte[]>

A Store which multiplexes requests to different internal Stores


Field Summary
protected  FailureDetector failureDetector
           
protected  java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores
           
protected  org.apache.log4j.Logger logger
           
protected  ReadRepairer<ByteArray,byte[]> readRepairer
           
protected  boolean repairReads
           
protected  RoutingStrategy routingStrategy
           
protected  StoreDefinition storeDef
           
protected  Time time
           
protected  TimeoutConfig timeoutConfig
           
 
Constructor Summary
protected RoutedStore(java.lang.String name, java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores, Cluster cluster, StoreDefinition storeDef, boolean repairReads, TimeoutConfig timeoutConfig, FailureDetector failureDetector, Time time)
           
 
Method Summary
 void close()
          Close the store.
 java.lang.Object getCapability(StoreCapabilityType capability)
          Get some capability of the store.
 java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> getInnerStores()
           
 void updateRoutingStrategy(RoutingStrategy routingStrategy)
           
 
Methods inherited from class voldemort.store.AbstractStore
delete, delete, get, get, getAll, getAll, getName, getVersions, put, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

innerStores

protected final java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores

repairReads

protected final boolean repairReads

readRepairer

protected final ReadRepairer<ByteArray,byte[]> readRepairer

timeoutConfig

protected final TimeoutConfig timeoutConfig

time

protected final Time time

storeDef

protected final StoreDefinition storeDef

failureDetector

protected final FailureDetector failureDetector

routingStrategy

protected volatile RoutingStrategy routingStrategy

logger

protected final org.apache.log4j.Logger logger
Constructor Detail

RoutedStore

protected RoutedStore(java.lang.String name,
                      java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> innerStores,
                      Cluster cluster,
                      StoreDefinition storeDef,
                      boolean repairReads,
                      TimeoutConfig timeoutConfig,
                      FailureDetector failureDetector,
                      Time time)
Method Detail

updateRoutingStrategy

public void updateRoutingStrategy(RoutingStrategy routingStrategy)

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 AbstractStore<ByteArray,byte[],byte[]>

getInnerStores

public java.util.Map<java.lang.Integer,Store<ByteArray,byte[],byte[]>> getInnerStores()

getCapability

public java.lang.Object getCapability(StoreCapabilityType capability)
Description copied from interface: Store
Get some capability of the store. Examples would be the serializer used, or the routing strategy. This provides a mechanism to verify that the store hierarchy has some set of capabilities without knowing the precise layering.

Specified by:
getCapability in interface Store<ByteArray,byte[],byte[]>
Overrides:
getCapability in class AbstractStore<ByteArray,byte[],byte[]>
Parameters:
capability - The capability type to retrieve
Returns:
The given capaiblity


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