Home » concurrent-sources » EDU.oswego.cs.dl.util.concurrent » [javadoc | source]
EDU.oswego.cs.dl.util.concurrent
public class: TimedCallable [javadoc | source]
java.lang.Object
   EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser
      EDU.oswego.cs.dl.util.concurrent.TimedCallable

All Implemented Interfaces:
    Callable

TimedCallable runs a Callable function for a given length of time. The function is run in its own thread. If the function completes in time, its result is returned; otherwise the thread is interrupted and an InterruptedException is thrown.

Note: TimedCallable will always return within the given time limit (modulo timer inaccuracies), but whether or not the worker thread stops in a timely fashion depends on the interrupt handling in the Callable function's implementation.

Fields inherited from EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser:
threadFactory_
Constructor:
 public TimedCallable(Callable function,
    long millis) 
Method from EDU.oswego.cs.dl.util.concurrent.TimedCallable Summary:
call
Methods from EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser:
getThreadFactory,   setThreadFactory
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from EDU.oswego.cs.dl.util.concurrent.TimedCallable Detail:
 public Object call() throws Exception