Class ThreadUtil

java.lang.Object
jodd.util.ThreadUtil

public class ThreadUtil extends Object
Thread utilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    join(Thread thread)
     
    static void
    join(Thread thread, long millis)
     
    static void
    join(Thread thread, long millis, int nanos)
     
    static void
    Notifies an object for synchronization purposes.
    static void
    Notifies an object for synchronization purposes.
    static void
    Puts a thread to sleep forever.
    static void
    sleep(long ms)
    Puts a thread to sleep, without throwing an InterruptedException.
    static void
    wait(Object obj)
    Waits for a object for synchronization purposes.
    static void
    wait(Object obj, long timeout)
    Waits for a object or a timeout for synchronization purposes.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadUtil

      public ThreadUtil()
  • Method Details

    • sleep

      public static void sleep(long ms)
      Puts a thread to sleep, without throwing an InterruptedException.
      Parameters:
      ms - the length of time to sleep in milliseconds
    • sleep

      public static void sleep()
      Puts a thread to sleep forever.
    • wait

      public static void wait(Object obj)
      Waits for a object for synchronization purposes.
    • wait

      public static void wait(Object obj, long timeout)
      Waits for a object or a timeout for synchronization purposes.
    • notify

      public static void notify(Object obj)
      Notifies an object for synchronization purposes.
    • notifyAll

      public static void notifyAll(Object obj)
      Notifies an object for synchronization purposes.
    • join

      public static void join(Thread thread)
    • join

      public static void join(Thread thread, long millis)
    • join

      public static void join(Thread thread, long millis, int nanos)