Package com.linkedin.davinci.store
Class StorageEngineFactory
java.lang.Object
com.linkedin.davinci.store.StorageEngineFactory
- Direct Known Subclasses:
BlackHoleStorageEngineFactory
,InMemoryStorageEngineFactory
,RocksDBStorageEngineFactory
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Close the storage configurationabstract void
Close the storage engine from the underlying storage configurationRetrieve all the stores persisted previouslyabstract PersistenceType
Return the persistence type current factory supports.abstract AbstractStorageEngine
getStorageEngine
(VeniceStoreVersionConfig storeDef) Get an initialized storage implementationgetStorageEngine
(VeniceStoreVersionConfig storeDef, boolean replicationMetadataEnabled) Replication metadata is only supported in RocksDB storage engine.abstract void
Remove the storage engine from the underlying storage configurationabstract void
removeStorageEngine
(String storeName) Remove the storage engine without opening it.abstract void
removeStorageEnginePartition
(String storeName, int partition) void
verifyPersistenceType
(VeniceStoreVersionConfig storeConfig) void
-
Constructor Details
-
StorageEngineFactory
public StorageEngineFactory()
-
-
Method Details
-
getStorageEngine
public abstract AbstractStorageEngine getStorageEngine(VeniceStoreVersionConfig storeDef) throws StorageInitializationException Get an initialized storage implementation- Parameters:
storeDef
- store definition- Returns:
- The storage engine
- Throws:
StorageInitializationException
-
getStorageEngine
public AbstractStorageEngine getStorageEngine(VeniceStoreVersionConfig storeDef, boolean replicationMetadataEnabled) Replication metadata is only supported in RocksDB storage engine. For other type of the storage engine, we will throw VeniceException here. -
getPersistedStoreNames
Retrieve all the stores persisted previously- Returns:
- All the store names
-
close
public abstract void close()Close the storage configuration -
removeStorageEngine
Remove the storage engine from the underlying storage configuration- Parameters:
engine
- Specifies the storage engine to be removed
-
removeStorageEngine
Remove the storage engine without opening it. -
removeStorageEnginePartition
-
closeStorageEngine
Close the storage engine from the underlying storage configuration- Parameters:
engine
- Specifies the storage engine to be removed
-
getPersistenceType
Return the persistence type current factory supports.- Returns:
-
verifyPersistenceType
-
verifyPersistenceType
-