18#ifndef _DECAF_UTIL_CONCURRENT_EXECUTORSERVICE_H_
19#define _DECAF_UTIL_CONCURRENT_EXECUTORSERVICE_H_
151 ex.
setMark(__FILE__, __LINE__);
199 ex.
setMark(__FILE__, __LINE__);
245 ex.
setMark(__FILE__, __LINE__);
Definition Exception.h:38
virtual void setMark(const char *file, const int lineNumber)
Adds a file/line number to the stack trace.
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
T * release()
Releases the Pointer held and resets the internal pointer value to Null.
Definition Pointer.h:174
PointerType get() const
Gets the real pointer that is contained within this Pointer.
Definition Pointer.h:188
Interface for a runnable object - defines a task that can be run by a thread.
Definition Runnable.h:29
Definition NullPointerException.h:32
Definition ArrayList.h:39
A task that returns a result and may throw an exception.
Definition Callable.h:47
An object that executes submitted decaf.lang.Runnable tasks.
Definition Executor.h:87
An Executor that provides methods to manage termination and methods that can produce a Future for tra...
Definition ExecutorService.h:56
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.
Definition ExecutorService.h:178
Future< E > * submit(Callable< E > *task, bool takeOwnership=true)
Submits a value-returning task for execution and returns a Future pointer representing the pending re...
Definition ExecutorService.h:130
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 sched...
Future< E > * submit(decaf::lang::Runnable *task, bool takeOwnership=true)
Submits a Runnable object for execution.
Definition ExecutorService.h:224
virtual void shutdown()=0
Performs an orderly shutdown of this Executor.
virtual ~ExecutorService()
Definition ExecutorService.h:59
virtual void doSubmit(FutureType *future)=0
Perform the actual submit of a FutureType instance, the caller is responsible for creating the proper...
virtual ArrayList< decaf::lang::Runnable * > shutdownNow()=0
Attempts to stop all currently executing tasks and returns an ArrayList containing the Runnables that...
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.
A Future represents the result of an asynchronous computation.
Definition Future.h:88
A cancellable asynchronous computation.
Definition FutureTask.h:58
Definition RejectedExecutionException.h:31
A TimeUnit represents time durations at a given unit of granularity and provides utility methods to c...
Definition TimeUnit.h:62
#define DECAF_CATCH_RETHROW(type)
Macro for catching and rethrowing an exception of a given type.
Definition ExceptionDefines.h:27
#define DECAF_CATCHALL_THROW(type)
A catch-all that throws a known exception.
Definition ExceptionDefines.h:50
#define DECAF_API
Definition Config.h:29
Definition AbstractExecutorService.h:28
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25