voldemort.store.bdb
Class BdbStorageConfiguration

java.lang.Object
  extended by voldemort.store.bdb.BdbStorageConfiguration
All Implemented Interfaces:
StorageConfiguration

public class BdbStorageConfiguration
extends java.lang.Object
implements StorageConfiguration

The configuration that is shared between berkeley db instances. This includes the db environment and the configuration


Field Summary
static java.lang.String TYPE_NAME
           
 
Constructor Summary
BdbStorageConfiguration(VoldemortConfig config)
           
 
Method Summary
 void checkPointAllEnvironments()
          Forceful checkpointing
 void cleanLogs()
          Forceful cleanup the logs
 void close()
          Close the storage configuration
 com.sleepycat.je.Environment getEnvironment(StoreDefinition storeDef)
           
 java.lang.String getEnvStatsAsString(java.lang.String storeName)
           
 java.lang.String getEnvStatsAsString(java.lang.String storeName, boolean fast)
           
 long getReservedCacheSize()
           
 java.lang.String getStats(java.lang.String storeName, boolean fast)
           
 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)
          Detect what has changed in the store definition and rewire BDB environments accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final java.lang.String TYPE_NAME
See Also:
Constant Field Values
Constructor Detail

BdbStorageConfiguration

public BdbStorageConfiguration(VoldemortConfig config)
Method Detail

getStore

public StorageEngine<ByteArray,byte[],byte[]> getStore(StoreDefinition storeDef,
                                                       RoutingStrategy strategy)
Description copied from interface: StorageConfiguration
Get an initialized storage implementation

Specified by:
getStore in interface StorageConfiguration
Parameters:
storeDef - store definition
strategy - routing strategy used for the store
Returns:
The storage engine

getEnvironment

public com.sleepycat.je.Environment getEnvironment(StoreDefinition storeDef)
                                            throws com.sleepycat.je.DatabaseException
Throws:
com.sleepycat.je.DatabaseException

getType

public java.lang.String getType()
Description copied from interface: StorageConfiguration
Get the type of stores returned by this configuration

Specified by:
getType in interface StorageConfiguration

getStats

public java.lang.String getStats(java.lang.String storeName,
                                 boolean fast)

getEnvStatsAsString

public java.lang.String getEnvStatsAsString(java.lang.String storeName)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

getEnvStatsAsString

public java.lang.String getEnvStatsAsString(java.lang.String storeName,
                                            boolean fast)
                                     throws java.lang.Exception
Throws:
java.lang.Exception

cleanLogs

public void cleanLogs()
Forceful cleanup the logs


checkPointAllEnvironments

public void checkPointAllEnvironments()
Forceful checkpointing


close

public void close()
Description copied from interface: StorageConfiguration
Close the storage configuration

Specified by:
close in interface StorageConfiguration

update

public void update(StoreDefinition storeDef)
Detect what has changed in the store definition and rewire BDB environments accordingly.

Specified by:
update in interface StorageConfiguration
Parameters:
storeDef - updated store definition

getReservedCacheSize

public long getReservedCacheSize()


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