Interface Storage

  • All Superinterfaces:
    AutoCloseable, Backupable, Closeable
    All Known Implementing Classes:
    JEStorage

    public interface Storage
    extends Backupable, Closeable
    This interface abstracts the underlying storage engine, isolating the pluggable backend generic code from a particular storage engine implementation.
    • Method Detail

      • read

        <T> T read​(ReadOperation<T> readOperation)
            throws Exception
        Executes a read operation. In case of a read operation rollback, implementations must ensure the read operation is retried until it succeeds.
        Type Parameters:
        T - type of the value returned
        Parameters:
        readOperation - the read operation to execute
        Returns:
        the value read by the read operation
        Throws:
        Exception - if a problem occurs with the underlying storage engine
      • write

        void write​(WriteOperation writeOperation)
            throws Exception
        Executes a write operation. In case of a write operation rollback, implementations must ensure the write operation is retried until it succeeds.
        Parameters:
        writeOperation - the write operation to execute
        Throws:
        Exception - if a problem occurs with the underlying storage engine
      • write

        void write​(WriteOperation writeOperation,
                   WriteableTransaction.WriteTransactionOption option)
            throws Exception
        Executes a write operation. In case of a write operation rollback, implementations must ensure the write operation is retried until it succeeds.
        Parameters:
        writeOperation - the write operation to execute
        option - the option to apply to this transaction
        Throws:
        Exception - if a problem occurs with the underlying storage engine
      • getStorageStatus

        StorageStatus getStorageStatus()
        Returns the current status of the storage.
        Returns:
        the current status of the storage
      • listTrees

        Set<TreeName> listTrees()
        Lists the trees that exist in this storage.
        Returns:
        a set of TreeNames representing the trees that exist in this storage