org.apache.jdo.impl.fostore
Class Main.TimeoutRunnable

java.lang.Object
  extended byorg.apache.jdo.impl.fostore.Main.TimeoutRunnable
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Main

class Main.TimeoutRunnable
extends java.lang.Object
implements java.lang.Runnable

The Timeout Runnable class. This class watches a timer, and whent the timer expires, the thread terminates. This causes the Main thread to fall through its join on the timeout thread and completes the shutdown process.


Field Summary
(package private)  int timeoutMillis
          The number of milliseconds to sleep before terminating this thread.
 
Constructor Summary
(package private) Main.TimeoutRunnable(int timeout)
          Construct an instance of the TimeoutRunnable with the specified number of seconds to sleep before terminating.
 
Method Summary
 void run()
          Run the timeout thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeoutMillis

int timeoutMillis
The number of milliseconds to sleep before terminating this thread. Another thread wishing to reset the timeout will interrupt this thread.

Constructor Detail

Main.TimeoutRunnable

Main.TimeoutRunnable(int timeout)
Construct an instance of the TimeoutRunnable with the specified number of seconds to sleep before terminating.

Parameters:
timeout - the number of seconds before timeout.
Method Detail

run

public void run()
Run the timeout thread.

Specified by:
run in interface java.lang.Runnable