Class StorageEngineFactory

  • Direct Known Subclasses:
    BlackHoleStorageEngineFactory, InMemoryStorageEngineFactory, RocksDBStorageEngineFactory

    public abstract class StorageEngineFactory
    extends java.lang.Object
    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 Detail

      • StorageEngineFactory

        public StorageEngineFactory()
    • Method Detail

      • 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

        public abstract java.util.Set<java.lang.String> getPersistedStoreNames()
        Retrieve all the stores persisted previously
        Returns:
        All the store names
      • close

        public abstract void close()
        Close the storage configuration
      • removeStorageEngine

        public abstract void removeStorageEngine​(AbstractStorageEngine engine)
        Remove the storage engine from the underlying storage configuration
        Parameters:
        engine - Specifies the storage engine to be removed
      • removeStorageEngine

        public abstract void removeStorageEngine​(java.lang.String storeName)
        Remove the storage engine without opening it.
      • removeStorageEnginePartition

        public abstract void removeStorageEnginePartition​(java.lang.String storeName,
                                                          int partition)
      • closeStorageEngine

        public abstract void closeStorageEngine​(AbstractStorageEngine engine)
        Close the storage engine from the underlying storage configuration
        Parameters:
        engine - Specifies the storage engine to be removed
      • getPersistenceType

        public abstract PersistenceType getPersistenceType()
        Return the persistence type current factory supports.
        Returns: