voldemort.server
Class StoreRepository

java.lang.Object
  extended by voldemort.server.StoreRepository

public class StoreRepository
extends java.lang.Object

A wrapper class that holds all the server's stores--storage engines, routed stores, and remote stores. The store repository holds various store types:

  1. Local stores – These are the local stores used to perform reads and writes on the local node.
  2. Storage Engines – These are also local, but represent the lowest level of the storage chain (no wrappers).
  3. Routed Stores – Writes to these stores will be rerouted to the appropriate nodes.
  4. Node Stores – These represent socket stores for writing to individual nodes.


Constructor Summary
StoreRepository()
          Constructor invoked by tests
StoreRepository(boolean jmxEnabled)
           
 
Method Summary
 void addLocalStore(Store<ByteArray,byte[],byte[]> store)
           
 void addNodeStore(int nodeId, Store<ByteArray,byte[],byte[]> store)
           
 void addRedirectingSocketStore(int nodeId, Store<ByteArray,byte[],byte[]> store)
           
 void addRoutedStore(Store<ByteArray,byte[],byte[]> store)
           
 void addStorageEngine(StorageEngine<ByteArray,byte[],byte[]> engine)
           
 java.util.List<Store<ByteArray,byte[],byte[]>> getAllLocalStores()
           
 java.util.List<Pair<java.lang.Integer,Store<ByteArray,byte[],byte[]>>> getAllNodeStores()
           
 java.util.List<Store<ByteArray,byte[],byte[]>> getAllRoutedStores()
           
 java.util.List<StorageEngine<ByteArray,byte[],byte[]>> getAllStorageEngines()
           
 Store<ByteArray,byte[],byte[]> getLocalStore(java.lang.String storeName)
           
 Store<ByteArray,byte[],byte[]> getNodeStore(java.lang.String storeName, java.lang.Integer id)
           
 Store<ByteArray,byte[],byte[]> getRedirectingSocketStore(java.lang.String storeName, java.lang.Integer id)
           
 RepairJob getRepairJob()
           
 Store<ByteArray,byte[],byte[]> getRoutedStore(java.lang.String storeName)
           
 SlopStorageEngine getSlopStore()
           
 StorageEngine<ByteArray,byte[],byte[]> getStorageEngine(java.lang.String storeName)
           
 java.util.List<StorageEngine<ByteArray,byte[],byte[]>> getStorageEnginesByClass(java.lang.Class<? extends StorageEngine<?,?,?>> c)
           
 StreamingStats getStreamingStats(java.lang.String store)
           
 boolean hasLocalStore(java.lang.String name)
           
 boolean hasNodeStore(java.lang.String name, int nodeId)
           
 boolean hasRedirectingSocketStore(java.lang.String name, int nodeId)
           
 boolean hasRoutedStore(java.lang.String name)
           
 boolean hasSlopStore()
           
 boolean hasStorageEngine(java.lang.String name)
           
 void registerRepairJob(RepairJob job)
           
 Store<ByteArray,byte[],byte[]> removeLocalStore(java.lang.String storeName)
           
 Store<ByteArray,byte[],byte[]> removeNodeStore(java.lang.String storeName, int nodeId)
           
 Store<ByteArray,byte[],byte[]> removeRoutedStore(java.lang.String storeName)
           
 Store<ByteArray,byte[],byte[]> removeStorageEngine(java.lang.String storeName)
           
 void setSlopStore(SlopStorageEngine slopStore)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreRepository

public StoreRepository()
Constructor invoked by tests


StoreRepository

public StoreRepository(boolean jmxEnabled)
Method Detail

hasLocalStore

public boolean hasLocalStore(java.lang.String name)

getLocalStore

public Store<ByteArray,byte[],byte[]> getLocalStore(java.lang.String storeName)

removeLocalStore

public Store<ByteArray,byte[],byte[]> removeLocalStore(java.lang.String storeName)

addLocalStore

public void addLocalStore(Store<ByteArray,byte[],byte[]> store)

getAllLocalStores

public java.util.List<Store<ByteArray,byte[],byte[]>> getAllLocalStores()

hasStorageEngine

public boolean hasStorageEngine(java.lang.String name)

getStorageEngine

public StorageEngine<ByteArray,byte[],byte[]> getStorageEngine(java.lang.String storeName)

addStorageEngine

public void addStorageEngine(StorageEngine<ByteArray,byte[],byte[]> engine)

removeStorageEngine

public Store<ByteArray,byte[],byte[]> removeStorageEngine(java.lang.String storeName)

getAllStorageEngines

public java.util.List<StorageEngine<ByteArray,byte[],byte[]>> getAllStorageEngines()

getStorageEnginesByClass

public java.util.List<StorageEngine<ByteArray,byte[],byte[]>> getStorageEnginesByClass(java.lang.Class<? extends StorageEngine<?,?,?>> c)

hasRoutedStore

public boolean hasRoutedStore(java.lang.String name)

getRoutedStore

public Store<ByteArray,byte[],byte[]> getRoutedStore(java.lang.String storeName)

addRoutedStore

public void addRoutedStore(Store<ByteArray,byte[],byte[]> store)

getAllRoutedStores

public java.util.List<Store<ByteArray,byte[],byte[]>> getAllRoutedStores()

removeRoutedStore

public Store<ByteArray,byte[],byte[]> removeRoutedStore(java.lang.String storeName)

hasNodeStore

public boolean hasNodeStore(java.lang.String name,
                            int nodeId)

getNodeStore

public Store<ByteArray,byte[],byte[]> getNodeStore(java.lang.String storeName,
                                                   java.lang.Integer id)

removeNodeStore

public Store<ByteArray,byte[],byte[]> removeNodeStore(java.lang.String storeName,
                                                      int nodeId)

addNodeStore

public void addNodeStore(int nodeId,
                         Store<ByteArray,byte[],byte[]> store)

getAllNodeStores

public java.util.List<Pair<java.lang.Integer,Store<ByteArray,byte[],byte[]>>> getAllNodeStores()

hasRedirectingSocketStore

public boolean hasRedirectingSocketStore(java.lang.String name,
                                         int nodeId)

getRedirectingSocketStore

public Store<ByteArray,byte[],byte[]> getRedirectingSocketStore(java.lang.String storeName,
                                                                java.lang.Integer id)

addRedirectingSocketStore

public void addRedirectingSocketStore(int nodeId,
                                      Store<ByteArray,byte[],byte[]> store)

getSlopStore

public SlopStorageEngine getSlopStore()

setSlopStore

public void setSlopStore(SlopStorageEngine slopStore)

hasSlopStore

public boolean hasSlopStore()

getRepairJob

public RepairJob getRepairJob()

registerRepairJob

public void registerRepairJob(RepairJob job)

getStreamingStats

public StreamingStats getStreamingStats(java.lang.String store)


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