com.palantir.opensource.sysmon.util
Class InterruptTimerTask

java.lang.Object
  extended by java.util.TimerTask
      extended by com.palantir.opensource.sysmon.util.InterruptTimerTask
All Implemented Interfaces:
Runnable

public class InterruptTimerTask
extends TimerTask

Task class that wraps the act of setting a timer to trigger a thread interrupt a later date.


Method Summary
 boolean cancel()
          Cancels this timer and clears the interrupt state of this thread .
 boolean cancel(boolean clearInterrupt)
           
 void run()
           
static InterruptTimerTask setInterruptTimer(long timeToSleep)
           
 
Methods inherited from class java.util.TimerTask
scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

run

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

cancel

public boolean cancel()
Cancels this timer and clears the interrupt state of this thread .

Overrides:
cancel in class TimerTask

cancel

public boolean cancel(boolean clearInterrupt)

setInterruptTimer

public static InterruptTimerTask setInterruptTimer(long timeToSleep)


Copyright © 2012 Palantir Technologies. All Rights Reserved.