Class DelayedPersist

java.lang.Object
java.lang.Thread
org.cip4.jdflib.util.thread.DelayedPersist
All Implemented Interfaces:
Runnable

public class DelayedPersist extends Thread
class to persist stuff later either an IPersistable or Runnable may be queued
  • Method Details

    • getDelayedPersist

      public static DelayedPersist getDelayedPersist()
      Returns:
    • getCurrentDelayedPersist

      public static DelayedPersist getCurrentDelayedPersist()
      Returns:
    • shutDown

      public static void shutDown()
    • queueRunnable

      public void queueRunnable(Runnable r, long deltaTime)
      Parameters:
      persistable - the thing to send off
      deltaTime - max wait time in milliseconds - if<=null persist immediately
    • queue

      public void queue(IPersistable persistable, long deltaTime)
      Parameters:
      persistable - the thing to send off
      deltaTime - max wait time in milliseconds - if<=null persist immediately
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Thread
      Returns:
      See Also: