Class AbstractWALBuffer

  • All Implemented Interfaces:
    java.lang.AutoCloseable, IWALBuffer
    Direct Known Subclasses:
    WALBuffer

    public abstract class AbstractWALBuffer
    extends java.lang.Object
    implements IWALBuffer
    • Field Detail

      • identifier

        protected final java.lang.String identifier
        WALNode identifier of this buffer
      • logDirectory

        protected final java.lang.String logDirectory
        directory to store .wal files
      • currentWALFileVersion

        protected final java.util.concurrent.atomic.AtomicLong currentWALFileVersion
        current wal file version id
      • currentSearchIndex

        protected volatile long currentSearchIndex
        current search index
      • currentWALFileWriter

        protected volatile WALWriter currentWALFileWriter
        current wal file log writer
    • Constructor Detail

      • AbstractWALBuffer

        public AbstractWALBuffer​(java.lang.String identifier,
                                 java.lang.String logDirectory,
                                 long startFileVersion,
                                 long startSearchIndex)
                          throws java.io.FileNotFoundException
        Throws:
        java.io.FileNotFoundException
    • Method Detail

      • rollLogWriter

        protected void rollLogWriter​(long searchIndex,
                                     WALFileStatus fileStatus)
                              throws java.io.IOException
        Notice: only called by syncBufferThread and old log writer will be closed by this function.
        Throws:
        java.io.IOException