org.opcfoundation.ua.utils
Class TimerUtil

java.lang.Object
  extended by org.opcfoundation.ua.utils.TimerUtil

public class TimerUtil
extends Object

TimerUtil class.

Author:
Toni Kalajainen (toni.kalajainen@vtt.fi)

Field Summary
static WeakReference<Timer> timer
          Constant timer
 
Constructor Summary
TimerUtil()
           
 
Method Summary
static Timer getTimer()
          Getter for the field timer.
protected static void purge()
          purge.
static TimerTask schedule(Runnable run, Executor executor, long systemTime)
          schedule.
static TimerTask schedule(Timer timer, Runnable run, Executor executor, long systemTime)
          schedule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timer

public static WeakReference<Timer> timer
Constant timer

Constructor Detail

TimerUtil

public TimerUtil()
Method Detail

getTimer

public static Timer getTimer()

Getter for the field timer.

Returns:
a Timer object.

schedule

public static TimerTask schedule(Runnable run,
                                 Executor executor,
                                 long systemTime)

schedule.

Parameters:
run - a Runnable object.
executor - a Executor object.
systemTime - a long.
Returns:
a TimerTask object.

purge

protected static void purge()

purge.


schedule

public static TimerTask schedule(Timer timer,
                                 Runnable run,
                                 Executor executor,
                                 long systemTime)

schedule.

Parameters:
timer - a Timer object.
run - a Runnable object.
executor - a Executor object.
systemTime - a long.
Returns:
a TimerTask object.


Copyright © 2018. All rights reserved.