Class Runner

java.lang.Object
org.jgroups.util.Runner
All Implemented Interfaces:
Closeable, AutoCloseable, Runnable

public class Runner extends Object implements Runnable, Closeable
Runs a given function in a loop (in a separate thread) until it is stopped
Since:
4.0
  • Field Details

    • factory

      protected final ThreadFactory factory
    • thread_name

      protected String thread_name
    • function

      protected final Runnable function
    • stop_function

      protected final Runnable stop_function
    • running

      protected volatile boolean running
    • thread

      protected Thread thread
    • daemon

      protected boolean daemon
    • join_timeout

      protected long join_timeout
  • Constructor Details

  • Method Details

    • getThread

      public Thread getThread()
    • isRunning

      public boolean isRunning()
    • daemon

      public boolean daemon()
    • daemon

      public Runner daemon(boolean d)
    • threadName

      public String threadName()
    • threadName

      public Runner threadName(String n)
    • getJoinTimeout

      public long getJoinTimeout()
    • setJoinTimeout

      public Runner setJoinTimeout(long t)
    • start

      public Runner start()
    • stop

      public Runner stop()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • run

      public void run()
      Specified by:
      run in interface Runnable