com.ibm.rational.test.lt.kernel.util

Class WatchDog

    • Constructor Detail

      • WatchDog

        public WatchDog()
      • WatchDog

        public WatchDog(String name)
        Parameters:
        name -
    • Method Detail

      • setTimeout

        public void setTimeout(int timeout)
        Description copied from interface: IWatchDog
        Set the length of time a timer will wait before the timeout condition occurs
        Specified by:
        setTimeout in interface IWatchDog
        Parameters:
        timeout - milliseconds
      • startTimer

        public boolean startTimer()
        Description copied from interface: IWatchDog
        Start a timer.

        If the current value of the timeOut elapses before this timer is stopped the watchdog will increment the timeoutCount and call reportTimeout()

        Specified by:
        startTimer in interface IWatchDog
        Returns:
        true if a timer was successfully started, false if a timer is already active or if the thread is not started.
      • stopTimer

        public boolean stopTimer()
        Description copied from interface: IWatchDog
        Stops the current timer.
        Specified by:
        stopTimer in interface IWatchDog
        Returns:
        true if the timer was successfully stopped, false if there is not an active timer.
      • restartTimer

        public void restartTimer()
        Description copied from interface: IWatchDog
        Stops the current timer and starts another.
        Specified by:
        restartTimer in interface IWatchDog
      • getTimeoutCount

        public int getTimeoutCount()
        Description copied from interface: IWatchDog
        get the number of times a timeout condition has been encountered.
        Specified by:
        getTimeoutCount in interface IWatchDog
        Returns:
        the count of timeous encountered.
      • start

        public void start()
        Description copied from interface: IWatchDog
        starts the watchdog thread
        Specified by:
        start in interface IWatchDog
        Overrides:
        start in class Thread
      • run

        public void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.