public final class Threading extends Object
|Modifier and Type||Class and Description|
Interface that a callback handler needs to implement.
Provides methods that are available during the execution of a
|Modifier and Type||Method and Description|
public static void registerRecurringCallback(long interval, TimeUnit unit, Threading.RecurringCallback callback)
callback handlerthat is called by the current thread approximately at the provided interval. Only one callback can be active per thread. Each thread can have its own callback with a different interval (or none at all). No guarantees are made about the actual interval. For example, when the thread is waiting for a lock or executing native code, no callback can be done. Exceptions that are thrown during the execution of the callback are caught and ignored, unless they are thrown via a call to
callback clears the current thread's callback (in which
case, the values of
unit are ignored).