voldemort.store
Interface StorageConfiguration

All Known Implementing Classes:
BdbStorageConfiguration, CacheStorageConfiguration, FileBackedCachingStorageConfiguration, InMemoryStorageConfiguration, MysqlStorageConfiguration, ReadOnlyStorageConfiguration, ViewStorageConfiguration

public interface StorageConfiguration

An abstraction that represents the shared resources of a persistence engine. This could include file handles, db connection pools, caches, etc. For example for BDB it holds the various environments, for jdbc it holds a connection pool reference This should be called StorageEngineFactory but that would leave us with the indignity of having a StorageEngineFactoryFactory to handle the mapping of store type => factory. And we can't have that.


Method Summary
 void close()
          Close the storage configuration
 StorageEngine<ByteArray,byte[],byte[]> getStore(StoreDefinition storeDef, RoutingStrategy strategy)
          Get an initialized storage implementation
 java.lang.String getType()
          Get the type of stores returned by this configuration
 void update(StoreDefinition storeDef)
          Update the storage configuration at runtime
 

Method Detail

getStore

StorageEngine<ByteArray,byte[],byte[]> getStore(StoreDefinition storeDef,
                                                RoutingStrategy strategy)
Get an initialized storage implementation

Parameters:
storeDef - store definition
strategy - routing strategy used for the store
Returns:
The storage engine

getType

java.lang.String getType()
Get the type of stores returned by this configuration


update

void update(StoreDefinition storeDef)
Update the storage configuration at runtime

Parameters:
storeDef - new store definition object

close

void close()
Close the storage configuration



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