Logo Search packages:      
Sourcecode: jmock2 version File versions  Download package

org::jmock::lib::concurrent::DeterministicScheduler Class Reference

Inherits java::util::concurrent::ScheduledExecutorService.

List of all members.

Detailed Description

A ScheduledExecutorService that executes commands on the thread that calls runNextPendingCommand, runUntilIdle or tick. Objects of this class can also be used as Executors or ExecutorServices if you just want to control background execution and don't need to schedule commands, but it may be simpler to use a DeterministicExecutor.


Definition at line 28 of file DeterministicScheduler.java.

Public Member Functions

boolean awaitTermination (long timeout, TimeUnit unit) throws InterruptedException
void execute (Runnable command)
boolean isIdle ()
boolean isShutdown ()
boolean isTerminated ()
void runNextPendingCommand ()
void runUntilIdle ()
ScheduledFuture<?> schedule (Runnable command, long delay, TimeUnit unit)
ScheduledFuture<?> scheduleAtFixedRate (Runnable command, long initialDelay, long period, TimeUnit unit)
ScheduledFuture<?> scheduleWithFixedDelay (Runnable command, long initialDelay, long delay, TimeUnit unit)
void shutdown ()
List< Runnable > shutdownNow ()
Future<?> submit (Runnable command)
void tick (long duration, TimeUnit timeUnit)

Package Functions

public< T > List< Future< T > > invokeAll (Collection< Callable< T >> tasks, long timeout, TimeUnit unit) throws InterruptedException
public< T > List< Future< T > > invokeAll (Collection< Callable< T >> tasks) throws InterruptedException
public< T > T invokeAny (Collection< Callable< T >> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
public< T > T invokeAny (Collection< Callable< T >> tasks) throws InterruptedException, ExecutionException
public< V > ScheduledFuture< V > schedule (Callable< V > callable, long delay, TimeUnit unit)
public< T > Future< T > submit (Runnable command, T result)
public< T > Future< T > submit (Callable< T > callable)

Private Member Functions

UnsupportedSynchronousOperationException blockingOperationsNotSupported ()
UnsupportedOperationException shutdownNotSupported ()
long toTicks (long duration, TimeUnit timeUnit)

Private Attributes

final DeltaQueue
< ScheduledTask<?> > 
deltaQueue = new DeltaQueue<ScheduledTask<?>>()


class  CallableRunnableAdapter< T >
class  ScheduledTask< T >

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index