activemq-cpp-3.6.0
decaf::util::concurrent::AbstractExecutorService Class Reference

Provides a default implementation for the methods of the ExecutorService interface. More...

#include <src/main/decaf/util/concurrent/AbstractExecutorService.h>

Inheritance diagram for decaf::util::concurrent::AbstractExecutorService:

Public Member Functions

 AbstractExecutorService ()
virtual ~AbstractExecutorService ()
- Public Member Functions inherited from decaf::util::concurrent::ExecutorService
virtual ~ExecutorService ()
virtual bool awaitTermination (long long timeout, const TimeUnit &unit)=0
 The caller will block until the executor has completed termination meaning all tasks that where scheduled before shutdown have now completed and the executor is ready for deletion.
virtual void shutdown ()=0
 Performs an orderly shutdown of this Executor.
virtual ArrayList
< decaf::lang::Runnable * > 
shutdownNow ()=0
 Attempts to stop all currently executing tasks and returns an ArrayList containing the Runnables that did not get executed, these object become the property of the caller and are not deleted by this class, they are removed from the work queue and forgotten about.
virtual bool isShutdown () const =0
 Returns whether this executor has been shutdown or not.
virtual bool isTerminated () const =0
 Returns whether all tasks have completed after this executor was shut down.
template<typename E >
Future< E > * submit (Callable< E > *task, bool takeOwnership=true)
 Submits a value-returning task for execution and returns a Future pointer representing the pending results of the task.
template<typename E >
Future< E > * submit (decaf::lang::Runnable *task, const E &result, bool takeOwnership=true)
 Submits a Runnable task for execution and returns a Future representing that task.
template<typename E >
Future< E > * submit (decaf::lang::Runnable *task, bool takeOwnership=true)
 Submits a Runnable object for execution.
- Public Member Functions inherited from decaf::util::concurrent::Executor
virtual ~Executor ()
virtual void execute (decaf::lang::Runnable *command)=0
 This method is the same as calling the two param execute method and passing true as the second argument.
virtual void execute (decaf::lang::Runnable *command, bool takeOwnership)=0
 Executes the given command at some time in the future.

Protected Member Functions

virtual void doSubmit (FutureType *future)
 Perform the actual submit of a FutureType instance, the caller is responsible for creating the properly typed Future<E> object and returning that to its caller.

Detailed Description

Provides a default implementation for the methods of the ExecutorService interface.

Use this class as a starting point for implementations of custom executor service implementations.

Since
1.0

Constructor & Destructor Documentation

decaf::util::concurrent::AbstractExecutorService::AbstractExecutorService ( )
virtual decaf::util::concurrent::AbstractExecutorService::~AbstractExecutorService ( )
virtual

Member Function Documentation

virtual void decaf::util::concurrent::AbstractExecutorService::doSubmit ( FutureType future)
protectedvirtual

Perform the actual submit of a FutureType instance, the caller is responsible for creating the properly typed Future<E> object and returning that to its caller.

The pointer provided is the property of this Executor and must be deleted by this executor once its completed.

Parameters
futurePointer to a base FutureType instance that is to be submitted to the Executor.

Implements decaf::util::concurrent::ExecutorService.


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