Class WALManager

  • All Implemented Interfaces:
    org.apache.iotdb.commons.service.IService

    public class WALManager
    extends java.lang.Object
    implements org.apache.iotdb.commons.service.IService
    This class is used to manage and allocate wal nodes
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTotalDiskUsage​(long size)  
      IWALNode applyForWALNode​(java.lang.String applicantUniqueId)
      Apply for a wal node
      void clear()  
      void deleteOutdatedWALFiles()
      submit delete outdated wal files task and wait for result
      void deleteWALNode​(java.lang.String applicantUniqueId)
      WAL node will be deleted only when using multi-leader consensus protocol
      org.apache.iotdb.commons.service.ServiceType getID()  
      static WALManager getInstance()  
      long getTotalDiskUsage()  
      void rebootWALDeleteThread()
      reboot wal delete thread to hot modify delete wal period
      void registerWALNode​(java.lang.String applicantUniqueId, java.lang.String logDirectory, long startFileVersion, long startSearchIndex)
      WAL node will be registered only when using multi-leader consensus protocol
      void start()  
      void stop()  
      void subtractTotalDiskUsage​(long size)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.iotdb.commons.service.IService

        shutdown, waitAndStop
    • Method Detail

      • applyForWALNode

        public IWALNode applyForWALNode​(java.lang.String applicantUniqueId)
        Apply for a wal node
      • registerWALNode

        public void registerWALNode​(java.lang.String applicantUniqueId,
                                    java.lang.String logDirectory,
                                    long startFileVersion,
                                    long startSearchIndex)
        WAL node will be registered only when using multi-leader consensus protocol
      • deleteWALNode

        public void deleteWALNode​(java.lang.String applicantUniqueId)
        WAL node will be deleted only when using multi-leader consensus protocol
      • start

        public void start()
                   throws org.apache.iotdb.commons.exception.StartupException
        Specified by:
        start in interface org.apache.iotdb.commons.service.IService
        Throws:
        org.apache.iotdb.commons.exception.StartupException
      • rebootWALDeleteThread

        public void rebootWALDeleteThread()
        reboot wal delete thread to hot modify delete wal period
      • deleteOutdatedWALFiles

        public void deleteOutdatedWALFiles()
        submit delete outdated wal files task and wait for result
      • getTotalDiskUsage

        public long getTotalDiskUsage()
      • addTotalDiskUsage

        public void addTotalDiskUsage​(long size)
      • subtractTotalDiskUsage

        public void subtractTotalDiskUsage​(long size)
      • stop

        public void stop()
        Specified by:
        stop in interface org.apache.iotdb.commons.service.IService
      • clear

        public void clear()
      • getID

        public org.apache.iotdb.commons.service.ServiceType getID()
        Specified by:
        getID in interface org.apache.iotdb.commons.service.IService
      • getInstance

        public static WALManager getInstance()