Class RegularJanitor

java.lang.Object
org.cip4.jdflib.util.thread.RegularJanitor

public final class RegularJanitor extends Object
asynchronous janitor class
  • Constructor Details

    • RegularJanitor

      protected RegularJanitor()
  • Method Details

    • setInterval

      public void setInterval(int interval)
      set the interval between sweeps in seconds
      Parameters:
      interval -
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also:
    • numSweepers

      public int numSweepers()
      Returns:
    • addSweeper

      public void addSweeper(Sweeper sweeper, boolean singleClass)
      add a new sweeper
      Parameters:
      sweeper -
      singleClass - if true, make sure we only have one of sweeper of this type running at any given time
    • hasSweeper

      public boolean hasSweeper(Object sweeper)
      Parameters:
      sweeper -
      Returns:
    • startSweep

      public void startSweep(int firstInterval)
      Parameters:
      firstInterval - the time in seconds to wait prior to the first sweep, if 0 then don't wait if<0 then use interval
    • feierabend

      public static void feierabend()
    • getJanitor

      public static RegularJanitor getJanitor()
      get the singleton janitor
      Returns: