Documentation of 'org.mapdb.StoreWAL' Java class
StoreWAL
org.mapdb

Class StoreWAL

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, Engine


    public class StoreWAL
    extends StoreCached
    Write-Ahead-Log
    • Constructor Detail

      • StoreWAL

        public StoreWAL(java.lang.String fileName)
      • StoreWAL

        public StoreWAL(java.lang.String fileName,
                        Volume.VolumeFactory volumeFactory,
                        Store.Cache cache,
                        int lockScale,
                        int lockingStrategy,
                        boolean checksum,
                        boolean compress,
                        byte[] password,
                        boolean readonly,
                        boolean snapshotEnable,
                        boolean fileLockDisable,
                        DataIO.HeartbeatFileLock fileLockHeartbeat,
                        java.util.concurrent.ScheduledExecutorService executor,
                        long startSize,
                        long sizeIncrement,
                        boolean recidReuseDisable,
                        long executorScheduledRate,
                        int writeQueueSize)
    • Method Detail

      • initOpen

        public void initOpen()
      • rollback

        public void rollback()
                      throws java.lang.UnsupportedOperationException
        Description copied from interface: Engine
        Undoes all changes made in the current transaction. If transactions are disabled it throws UnsupportedOperationException.
        Specified by:
        rollback in interface Engine
        Overrides:
        rollback in class StoreDirect
        Throws:
        java.lang.UnsupportedOperationException - if transactions are disabled
      • commit

        public void commit()
        Description copied from interface: Engine
        Makes all changes made since the previous commit/rollback permanent. In transactional mode (on by default) it means creating journal file and replaying it to storage. In other modes it may flush disk caches or do nothing at all (check your config options)
        Specified by:
        commit in interface Engine
        Overrides:
        commit in class StoreDirect
      • close

        public void close()
        Description copied from interface: Engine

        Close store/cache. This method must be called before JVM exits to flush all caches and prevent store corruption. Also it releases resources used by MapDB (disk, memory..).

        Engine can no longer be used after this method was called. If Engine is used after closing, it may throw any exception including NullPointerException

        There is an configuration option DBMaker.Maker.closeOnJvmShutdown() which uses shutdown hook to automatically close Engine when JVM shutdowns.

        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface Engine
        Overrides:
        close in class StoreDirect

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.