Index
All Classes and Interfaces|All Packages
A
- AbstractTaskExecutor - Class in org.jtrim2.executor
-
Defines a convenient abstract base class for
TaskExecutorimplementations. - AbstractTaskExecutor() - Constructor for class org.jtrim2.executor.AbstractTaskExecutor
- AbstractTaskExecutor.SubmittedTask<V> - Class in org.jtrim2.executor
-
Defines the submitted task to be executed by subclasses of
AbstractTaskExecutor. - AbstractTaskExecutorService - Class in org.jtrim2.executor
-
Defines a convenient abstract base class for
TaskExecutorServiceimplementations. - AbstractTaskExecutorService() - Constructor for class org.jtrim2.executor.AbstractTaskExecutorService
- AbstractTerminateNotifierTaskExecutorService - Class in org.jtrim2.executor
-
An abstract base class for
TaskExecutorServiceimplementations which implements theAbstractTerminateNotifierTaskExecutorService.addTerminateListener(Runnable)method as well as the ones implemented byAbstractTaskExecutorService. - AbstractTerminateNotifierTaskExecutorService() - Constructor for class org.jtrim2.executor.AbstractTerminateNotifierTaskExecutorService
-
Initializes the
AbstractTerminateNotifierTaskExecutorServicewith no listeners currently registered. - addTerminateListener(Runnable) - Method in class org.jtrim2.executor.AbstractTerminateNotifierTaskExecutorService
-
Adds a listener which is to be notified after this
TaskExecutorServiceterminates. - addTerminateListener(Runnable) - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Adds a listener which is to be notified after this
TaskExecutorServiceterminates. - addTerminateListener(Runnable) - Method in interface org.jtrim2.executor.TaskExecutorService
-
Adds a listener which is to be notified after this
TaskExecutorServiceterminates. - asExecutorService(TaskExecutorService) - Static method in class org.jtrim2.executor.ExecutorConverter
-
Returns an
ExecutorServicebacked by the specifiedTaskExecutorService. - asExecutorService(TaskExecutorService, boolean) - Static method in class org.jtrim2.executor.ExecutorConverter
-
Returns an
ExecutorServicebacked by the specifiedTaskExecutorService. - asFuture() - Method in class org.jtrim2.executor.FutureResultHolder
-
Returns this
FutureResultHolderviewed as aFuture. - asTaskExecutor(Executor) - Static method in class org.jtrim2.executor.ExecutorConverter
-
Returns a
TaskExecutorbacked by the specifiedExecutor. - asTaskExecutorService(ExecutorService) - Static method in class org.jtrim2.executor.ExecutorConverter
-
Returns a
TaskExecutorServicebacked by the specifiedExecutorService. - asUnstoppableExecutor(ExecutorService) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Returns an
ExecutorServiceforwarding all of its methods to the givenExecutorServicebut the returnedExecutorServicecannot be shutted down. - asUnstoppableExecutor(TaskExecutorService) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns an
TaskExecutorServiceforwarding all of its methods to the givenTaskExecutorServicebut the returnedTaskExecutorServicecannot be shutted down. - awaitExecutor(ExecutorService) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Waits until the specified
ExecutorServiceterminates. - awaitExecutors(long, TimeUnit, Collection<? extends ExecutorService>) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Waits until all the
ExecutorServices in the specified collection terminate or the given timeout elapses. - awaitExecutors(long, TimeUnit, ExecutorService...) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Waits until all the specified
ExecutorServices terminate or the given timeout elapses. - awaitExecutors(Collection<? extends ExecutorService>) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Waits until all the
ExecutorServices in the specified collection terminate. - awaitExecutors(ExecutorService...) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Waits until all the specified
ExecutorServices terminate. - awaitTermination(CancellationToken) - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Waits until this
TaskExecutorServicewill not execute any more tasks. - awaitTermination(CancellationToken) - Method in interface org.jtrim2.executor.TaskExecutorService
-
Waits until this
TaskExecutorServicewill not execute any more tasks.
B
- blockAlwaysHandler() - Static method in interface org.jtrim2.executor.FullQueueHandler
-
Returns a handler never producing a failure, and thus always instructing the executor to block and wait.
- build() - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Creates and returns a new executor using the previously set properties.
C
- cancel() - Method in class org.jtrim2.executor.AbstractTaskExecutor.SubmittedTask
-
Completes the submitted task exceptionally with an
OperationCanceledException. - cancel(boolean) - Method in class org.jtrim2.executor.DoneFuture
-
This method does nothing but returns
false. - CancelableFunction<V> - Interface in org.jtrim2.executor
-
Defines a task which can return an object and be canceled through a
CancellationToken. - CancelableTask - Interface in org.jtrim2.executor
-
Defines a task which can be canceled through a
CancellationToken. - CancelableTasks - Class in org.jtrim2.executor
-
Defines static methods to return simple, convenient cancelable task related instances.
- canceledComplationStage() - Static method in class org.jtrim2.executor.CancelableTasks
-
Returns a
CompletionStagewhich was already completed exceptionally with anOperationCanceledException. - canceledFuture() - Static method in class org.jtrim2.executor.ExecutorsEx
-
Returns a future representing a canceled task.
- completeExceptionally(Throwable) - Method in class org.jtrim2.executor.AbstractTaskExecutor.SubmittedTask
-
Completes the submitted task exceptionally with the given exception.
- contextAware(TaskExecutor) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns an executor which submits tasks to the specified executor and is context aware.
- contextAwareIfNecessary(TaskExecutor) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns an executor which submits tasks to the specified executor and is context aware.
- ContextAwareTaskExecutor - Interface in org.jtrim2.executor
-
Defines a
TaskExecutorwhich is able to decide whether the currently running code is executing in the context of the executor or not. - ContextAwareTaskExecutorService - Interface in org.jtrim2.executor
-
Defines a
TaskExecutorServicewhich is able to decide whether the currently running code is executing in the context of the executor or not. - ContextAwareWrapper - Class in org.jtrim2.executor
-
A
TaskExecutorimplementation forwarding tasks to another task executor an being able to determine if tasks submitted to theContextAwareWrapperrun in the the context of the sameContextAwareWrapper. - create(String, Consumer<? super ThreadPoolBuilder>) - Static method in class org.jtrim2.executor.ThreadPoolBuilder
-
Creates a thread pool executor using a
ThreadPoolBuilder.
D
- debugExecutor(TaskExecutor) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns a
TaskExecutorwhich forwards tasks to the specifiedTaskExecutorbut always logs exceptions thrown by tasks sheduled to the returned executor. - debugExecutorService(TaskExecutorService) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns a
TaskExecutorServicewhich forwards tasks to the specifiedTaskExecutorServicebut always logs exceptions thrown by tasks sheduled to the returned executor. - DelegatedTaskExecutorService - Class in org.jtrim2.executor
-
An
TaskExecutorServiceimplementation which delegates all of its methods to anotherTaskExecutorServicespecified at construction time. - DelegatedTaskExecutorService(TaskExecutorService) - Constructor for class org.jtrim2.executor.DelegatedTaskExecutorService
-
Initializes the
wrappedExecutorfield with the specified argument. - dispatchTasks() - Method in class org.jtrim2.executor.TaskScheduler
-
Calling this method ensures that previously scheduled tasks will be submitted to the executor specified at construction time.
- DoneFuture<ResultType> - Class in org.jtrim2.executor
-
Defines a future of an already done task.
- DoneFuture(ResultType) - Constructor for class org.jtrim2.executor.DoneFuture
-
Creates a new
DoneFuturewith the given result. - dontNeedShutdown() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Specifies that this
SingleThreadedExecutordoes not need to be shut down. - dontNeedShutdown() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Specifies that this
ThreadPoolTaskExecutordoes not need to be shut down.
E
- execute(Runnable) - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
- execute(Runnable) - Method in class org.jtrim2.executor.GenericUpdateTaskExecutor
-
Submits a task which is to be executed in the future.
- execute(Runnable) - Method in interface org.jtrim2.executor.TaskExecutor
- execute(Runnable) - Method in interface org.jtrim2.executor.UpdateTaskExecutor
-
Submits a task which is to be executed in the future.
- execute(CancellationToken) - Method in class org.jtrim2.executor.AbstractTaskExecutor.SubmittedTask
-
Executes the submitted tasks and completes this
SubmittedTask. - execute(CancellationToken) - Method in interface org.jtrim2.executor.CancelableFunction
-
Executes the the implementation dependent task and returns the result of the computation.
- execute(CancellationToken) - Method in interface org.jtrim2.executor.CancelableTask
-
Executes the the implementation dependent task.
- execute(CancellationToken, CancelableTask) - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Executes the task at some time in the future.
- execute(CancellationToken, CancelableTask) - Method in interface org.jtrim2.executor.TaskExecutor
-
Executes the task at some time in the future.
- executeCurrentlySubmitted() - Method in class org.jtrim2.executor.ManualTaskExecutor
-
Executes every currently submitted task found in the task queue.
- executeFunction(CancellationToken, CancelableFunction<? extends V>) - Method in class org.jtrim2.executor.AbstractTaskExecutor
-
Executes the function at some time in the future.
- executeFunction(CancellationToken, CancelableFunction<? extends V>) - Method in class org.jtrim2.executor.AbstractTaskExecutorService
-
Executes the function at some time in the future.
- executeFunction(CancellationToken, CancelableFunction<? extends V>) - Method in class org.jtrim2.executor.ContextAwareWrapper
-
Executes the function at some time in the future.
- executeFunction(CancellationToken, CancelableFunction<? extends V>) - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Executes the function at some time in the future.
- executeFunction(CancellationToken, CancelableFunction<? extends V>) - Method in interface org.jtrim2.executor.TaskExecutor
-
Executes the function at some time in the future.
- executeStaged(Runnable) - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
- executeStaged(Runnable) - Method in interface org.jtrim2.executor.TaskExecutor
-
Executes an non-cancelable task at some time in the future.
- ExecutorConverter - Class in org.jtrim2.executor
-
Defines static method to convert between the executors of JTrim and the executors of Java.
- ExecutorsEx - Class in org.jtrim2.executor
-
This class contains static helper and factory methods for
Executors andExecutorServices. - ExecutorsEx.NamedThreadFactory - Class in org.jtrim2.executor
-
A
ThreadFactorywhich creates thread with names containing a specified string and a given daemon status and also belong to the same thread group.
F
- FullQueueHandler - Interface in org.jtrim2.executor
-
Defines a handler to create a custom exception, when a thread pool finds its task queue full.
- FutureResultHolder<ResultType> - Class in org.jtrim2.executor
-
Stores the result of some possibly asynchronous computation.
- FutureResultHolder() - Constructor for class org.jtrim2.executor.FutureResultHolder
-
Creates a new
FutureResultHolderwith no result or error set.
G
- GenericUpdateTaskExecutor - Class in org.jtrim2.executor
-
An
UpdateTaskExecutorimplementation which forwards tasks scheduled to it to a givenExecutororTaskExecutor. - GenericUpdateTaskExecutor(Executor) - Constructor for class org.jtrim2.executor.GenericUpdateTaskExecutor
-
Creates a new
GenericUpdateTaskExecutorwhich will forward its tasks to the givenTaskExecutor. - get() - Method in class org.jtrim2.executor.DoneFuture
-
This method returns the result specified at construction time.
- get(long, TimeUnit) - Method in class org.jtrim2.executor.DoneFuture
-
This method returns the result specified at construction time.
- getDefaultInstance() - Static method in class org.jtrim2.executor.SyncTaskExecutor
-
Returns an
TaskExecutorServicewhich executes tasks synchronously on the calling thread and cannot be shutted down. - getFuture() - Method in class org.jtrim2.executor.AbstractTaskExecutor.SubmittedTask
-
Returns the future of the submitted task.
- getIdleTimeout(TimeUnit) - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Returns the currently set timeout value after idle threads should stop.
- getIdleTimeout(TimeUnit) - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns the currently set timeout value after idle threads should stop.
- getMaxQueueSize() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Returns the currently set maximum size for the queue of tasks scheduled to be executed.
- getMaxQueueSize() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns the currently set maximum size for the queue of tasks scheduled to be executed.
- getMaxThreadCount() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns the currently set maximum thread to be used by this executor.
- getNumberOfExecutingTasks() - Method in interface org.jtrim2.executor.MonitorableTaskExecutor
-
Returns the approximate number of tasks currently being executed.
- getNumberOfExecutingTasks() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Returns the approximate number of tasks currently being executed.
- getNumberOfExecutingTasks() - Method in class org.jtrim2.executor.SyncTaskExecutor
-
Returns the approximate number of tasks currently being executed.
- getNumberOfExecutingTasks() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns the approximate number of tasks currently being executed.
- getNumberOfQueuedTasks() - Method in interface org.jtrim2.executor.MonitorableTaskExecutor
-
Returns the approximate number of tasks currently queued to this executor.
- getNumberOfQueuedTasks() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Returns the approximate number of tasks currently queued to this executor.
- getNumberOfQueuedTasks() - Method in class org.jtrim2.executor.SyncTaskExecutor
-
Returns the approximate number of tasks currently queued to this executor.
- getNumberOfQueuedTasks() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns the approximate number of tasks currently queued to this executor.
- getPoolName() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Returns the name of this
SingleThreadedExecutoras specified at construction time. - getPoolName() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns the name of this
ThreadPoolTaskExecutoras specified at construction time. - getSimpleExecutor() - Static method in class org.jtrim2.executor.SyncTaskExecutor
-
Returns a plain and efficient
TaskExecutorwhich executes tasks synchronously on the calling thread.
H
- hasCompleted() - Method in class org.jtrim2.executor.FutureResultHolder
-
Checks whether this computation has completed or not.
- hasCompletedWithError() - Method in class org.jtrim2.executor.FutureResultHolder
-
Returns
trueif this computation has failed due to a previoustrySetError(Throwable)method call. - hasCompletedWithSuccess() - Method in class org.jtrim2.executor.FutureResultHolder
-
Returns
trueif this computation has been successfully completed with a previoustryStoreResultmethod call.
I
- inOrderExecutor(TaskExecutor) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns an executor which forwards task to a given executor and executes tasks without running them concurrently.
- inOrderSimpleExecutor(TaskExecutor) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns an executor which forwards task to a given executor and executes tasks without running them concurrently (this method differs from
TaskExecutors.inOrderExecutor(TaskExecutor)only by not necessarily returning aMonitorableTaskExecutor). - inOrderSyncExecutor() - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns an executor which invokes tasks in the order they were scheduled to it.
- isCancelled() - Method in class org.jtrim2.executor.DoneFuture
-
This method does nothing but returns
false. - isCurrentThreadDispatching() - Method in class org.jtrim2.executor.TaskScheduler
-
Checks whether this method was invoked from a
dispatchTasks()method call (i.e.: a task is being submitted on the current calling thread). - isDone() - Method in class org.jtrim2.executor.DoneFuture
-
This method does nothing but returns
true. - isExecutingInThis() - Method in interface org.jtrim2.executor.ContextAwareTaskExecutor
-
Returns
trueif the calling code is executing in the context of this executor. - isExecutingInThis() - Method in class org.jtrim2.executor.ContextAwareWrapper
-
Returns
trueif the calling code is executing in the context of this executor. - isExecutingInThis() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Returns
trueif the calling code is executing in the context of this executor. - isExecutingInThis() - Method in class org.jtrim2.executor.SyncTaskExecutor
-
Returns
trueif the calling code is executing in the context of this executor. - isExecutingInThis() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns
trueif the calling code is executing in the context of this executor. - isShutdown() - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Checks whether this
TaskExecutorServiceaccepts newly submitted tasks or not. - isShutdown() - Method in interface org.jtrim2.executor.TaskExecutorService
-
Checks whether this
TaskExecutorServiceaccepts newly submitted tasks or not. - isTerminated() - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Checks whether this
TaskExecutorServicemay execute tasks submitted to it tasks or not. - isTerminated() - Method in interface org.jtrim2.executor.TaskExecutorService
-
Checks whether this
TaskExecutorServicemay execute tasks submitted to it tasks or not.
M
- ManualTaskExecutor - Class in org.jtrim2.executor
-
Defines a
TaskExecutorwhere client code can determine where and when submitted tasks are executed. - ManualTaskExecutor(boolean) - Constructor for class org.jtrim2.executor.ManualTaskExecutor
-
Creates a new
ManualTaskExecutorwith an empty task queue. - MonitorableTaskExecutor - Interface in org.jtrim2.executor
-
Defines a
TaskExecutorwhich is able to provide a few statistical information about the currently queued tasks. - MonitorableTaskExecutorService - Interface in org.jtrim2.executor
-
Defines a
TaskExecutorwhich is able to provide a few statistical information about the currently queued tasks.
N
- NamedThreadFactory(boolean) - Constructor for class org.jtrim2.executor.ExecutorsEx.NamedThreadFactory
-
Creates a new thread factory with the specified daemon status and a default name.
- NamedThreadFactory(boolean, String) - Constructor for class org.jtrim2.executor.ExecutorsEx.NamedThreadFactory
-
Creates a new thread factory with the specified daemon status and name.
- newMultiThreadedExecutor(int, boolean) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Creates a new
ThreadPoolExecutorwhich will use at most the specified maximum thread count and daemon status. - newMultiThreadedExecutor(int, boolean, String) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Creates a new
ThreadPoolExecutorwhich will use at most the specified maximum thread count, daemon status and name. - newMultiThreadedExecutor(int, long, boolean) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Creates a new
ThreadPoolExecutorwhich will use at most the specified maximum thread count, daemon status, and thread keep alive time. - newMultiThreadedExecutor(int, long, boolean, String) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Creates a new
ThreadPoolExecutorwhich will use at most the specified maximum thread count, daemon status, name and thread keep alive time. - newSchedulerThreadedExecutor(int, boolean) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Creates a new
ScheduledThreadPoolExecutorwhich will use at most the specified maximum thread count and daemon status. - newSchedulerThreadedExecutor(int, boolean, String) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Creates a new
ScheduledThreadPoolExecutorwhich will use at most the specified maximum thread count, daemon status and name. - newSyncScheduler() - Static method in class org.jtrim2.executor.TaskScheduler
-
A convenience method effectively equivalent to
new TaskScheduler(SyncTaskExecutor.getSimpleExecutor()). - newThread(Runnable) - Method in class org.jtrim2.executor.ExecutorsEx.NamedThreadFactory
-
Creates a new thread with the properties given in the constructor.
- newThreadExecutor(boolean) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns a
TaskExecutorcreating a new dedicated thread for each submitted task. - newThreadExecutor(boolean, String) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns a
TaskExecutorcreating a new dedicated thread for each submitted task. - newThreadExecutor(ThreadFactory) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns a
TaskExecutorcreating a new dedicated thread for each submitted task. - noOpCancelableTask() - Static method in class org.jtrim2.executor.CancelableTasks
-
Returns a
CancelableTaskwhoseexecutemethod does nothing but returns immediately to the caller. - notifyTerminateListeners() - Method in class org.jtrim2.executor.AbstractTerminateNotifierTaskExecutorService
-
Notifies the currently registered terminate listeners.
O
- org.jtrim2.executor - package org.jtrim2.executor
-
Contains classes and interfaces for executing tasks asynchronously.
R
- runOnceCancelableTask(CancelableTask) - Static method in class org.jtrim2.executor.CancelableTasks
-
Returns a
CancelableTaskwhich will execute the specifiedCancelableTask(forwarding the arguments passed to it) but will execute the specifiedCancelableTaskonly once. - runOnceCancelableTaskStrict(CancelableTask) - Static method in class org.jtrim2.executor.CancelableTasks
-
Returns a
CancelableTaskwhich will execute the specifiedCancelableTask(forwarding the arguments passed to it) but will execute the specifiedCancelableTaskonly once, failing on multiple execute attempts.
S
- sameContextExecutor(TaskExecutor) - Method in class org.jtrim2.executor.ContextAwareWrapper
-
Returns an executor which submits tasks to the given executor and executes tasks in the same context as this executor.
- scheduleTask(Runnable) - Method in class org.jtrim2.executor.TaskScheduler
-
Schedules a single task for submitting to the executor specified at construction time.
- scheduleTasks(List<? extends Runnable>) - Method in class org.jtrim2.executor.TaskScheduler
-
Schedules a list of tasks for submitting to the executor specified at construction time.
- setDaemon(boolean) - Method in class org.jtrim2.executor.ThreadPoolBuilder.ThreadFactoryConfig
-
Sets and overwrites previously set value to mark new threads daemon or not.
- setFullQueueHandler(FullQueueHandler) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set handler defining a custom exception to be thrown in case the task queue of the executor is full.
- setFullQueueHandlerToFallback(TaskExecutor) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set handler falling back to the given executor when the task queue of the built executor is full.
- setIdleTimeout(long, TimeUnit) - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Sets the timeout value after idle threads should terminate.
- setIdleTimeout(long, TimeUnit) - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Sets the timeout value after idle threads should terminate.
- setIdleTimeout(TimeDuration) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set timeout value for threads to expire after they had nothing to do for the given amount of time.
- setManualShutdownRequired(boolean) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set value marking the executor to require explicit shutdown or not.
- setMaxQueueSize(int) - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Sets the maximum number of tasks allowed to be stored in the internal queue.
- setMaxQueueSize(int) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set maximum queue size for the queue holding tasks to be executed once there is an available thread.
- setMaxQueueSize(int) - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Sets the maximum number of tasks allowed to be stored in the internal queue.
- setMaxThreadCount(int) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set maximum allowed thread count.
- setMaxThreadCount(int) - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Sets the maximum number of threads allowed to execute submitted tasks concurrently.
- setThreadFactory(ThreadFactory) - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Sets the
ThreadFactorywhich is used to create worker threads for this executor. - setThreadFactory(ThreadFactory) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set factory to create new threads when the executor needs them.
- setThreadFactory(ThreadFactory) - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Sets the
ThreadFactorywhich is used to create worker threads for this executor. - setThreadFactoryWithConfig(Consumer<? super ThreadPoolBuilder.ThreadFactoryConfig>) - Method in class org.jtrim2.executor.ThreadPoolBuilder
-
Sets and overwrites previously set factory to create new threads when the executor needs them.
- shutdown() - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Shuts down this
TaskExecutorService, so that it will not execute tasks submitted to it after this method call returns. - shutdown() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Shuts down this
TaskExecutorService, so that it will not execute tasks submitted to it after this method call returns. - shutdown() - Method in interface org.jtrim2.executor.TaskExecutorService
-
Shuts down this
TaskExecutorService, so that it will not execute tasks submitted to it after this method call returns. - shutdown() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Shuts down this
TaskExecutorService, so that it will not execute tasks submitted to it after this method call returns. - shutdownAndCancel() - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Shuts down this
TaskExecutorServiceand cancels already submitted tasks, so that it will not execute tasks submitted to it after this method call returns. - shutdownAndCancel() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Shuts down this
TaskExecutorServiceand cancels already submitted tasks, so that it will not execute tasks submitted to it after this method call returns. - shutdownAndCancel() - Method in interface org.jtrim2.executor.TaskExecutorService
-
Shuts down this
TaskExecutorServiceand cancels already submitted tasks, so that it will not execute tasks submitted to it after this method call returns. - shutdownAndCancel() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Shuts down this
TaskExecutorServiceand cancels already submitted tasks, so that it will not execute tasks submitted to it after this method call returns. - shutdownExecutorsNow(Collection<? extends ExecutorService>) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Invokes the
shutdownNow()method of all the executors in the given collection. - shutdownExecutorsNow(ExecutorService...) - Static method in class org.jtrim2.executor.ExecutorsEx
-
Invokes the
shutdownNow()method of all the specified executors. - SingleThreadedExecutor - Class in org.jtrim2.executor
-
Defines a
TaskExecutorServiceexecuting submitted tasks on a single background thread. - SingleThreadedExecutor(String) - Constructor for class org.jtrim2.executor.SingleThreadedExecutor
-
Creates a new
SingleThreadedExecutorinitialized with the specified name. - SingleThreadedExecutor(String, int) - Constructor for class org.jtrim2.executor.SingleThreadedExecutor
-
Creates a new
SingleThreadedExecutorinitialized with the given properties. - SingleThreadedExecutor(String, int, long, TimeUnit) - Constructor for class org.jtrim2.executor.SingleThreadedExecutor
-
Creates a new
SingleThreadedExecutorinitialized with the given properties. - submitTask(CancellationToken, AbstractTaskExecutor.SubmittedTask<?>) - Method in class org.jtrim2.executor.AbstractTaskExecutor
-
Implementations must override this method to actually execute submitted tasks.
- submitTask(CancellationToken, AbstractTaskExecutor.SubmittedTask<?>) - Method in class org.jtrim2.executor.ManualTaskExecutor
-
Implementations must override this method to actually execute submitted tasks.
- SubmittedTask(CancelableFunction<? extends V>) - Constructor for class org.jtrim2.executor.AbstractTaskExecutor.SubmittedTask
-
Creates a new
SubmittedTaskwith the given underlying function. - syncNonRecursiveExecutor() - Static method in class org.jtrim2.executor.ExecutorsEx
-
Returns an executor executing synchronously on the calling thread without calling task recursively.
- syncNonRecursiveExecutor() - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns an executor executing synchronously on the calling thread without calling task recursively.
- SyncTaskExecutor - Class in org.jtrim2.executor
-
Defines an executor which executes tasks synchronously on the calling thread which submits them (by the
executeor one of thesubmitmethods). - SyncTaskExecutor() - Constructor for class org.jtrim2.executor.SyncTaskExecutor
-
Creates a new executor which executes tasks synchronously on the calling thread.
T
- TaskExecutor - Interface in org.jtrim2.executor
-
Executes tasks at some time in the future.
- TaskExecutors - Class in org.jtrim2.executor
-
Contains static helper and factory methods for various useful
TaskExecutorandTaskExecutorServiceimplementations. - TaskExecutorService - Interface in org.jtrim2.executor
-
Defines a
TaskExecutorwith additional methods to better manage submitted tasks. - TaskScheduler - Class in org.jtrim2.executor
- TaskScheduler(Executor) - Constructor for class org.jtrim2.executor.TaskScheduler
-
Creates a new task scheduler (without any task scheduled) with the given backing executor.
- ThreadPoolBuilder - Class in org.jtrim2.executor
-
Defines a convenient build to create an executor relying on pooled threads.
- ThreadPoolBuilder(String) - Constructor for class org.jtrim2.executor.ThreadPoolBuilder
-
Creates and initializes the build with the given pool name, and
maxThreadCount= 1maxQueueSize=Integer.MAX_VALUEidleTimeout= 5 secondsmanualShutdownRequired= truethreadFactory= a factory creating non-daemon threads. - ThreadPoolBuilder.ThreadFactoryConfig - Class in org.jtrim2.executor
-
Defines a configurer to create a simple
ThreadFactoryinstance. - ThreadPoolTaskExecutor - Class in org.jtrim2.executor
-
A
TaskExecutorServiceimplementation which executes submitted tasks on a group of threads. - ThreadPoolTaskExecutor(String) - Constructor for class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Creates a new
ThreadPoolTaskExecutorinitialized with specified name. - ThreadPoolTaskExecutor(String, int) - Constructor for class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Creates a new
ThreadPoolTaskExecutorinitialized with the given properties. - ThreadPoolTaskExecutor(String, int, int) - Constructor for class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Creates a new
ThreadPoolTaskExecutorinitialized with the given properties. - ThreadPoolTaskExecutor(String, int, int, long, TimeUnit) - Constructor for class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Creates a new
ThreadPoolTaskExecutorinitialized with the given properties. - toAsync(TaskExecutor, CancelableFunction<? extends R>) - Static method in class org.jtrim2.executor.CancelableTasks
-
Returns an asynchronous task executing the given synchronous task on the given executor.
- toString() - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
- toString() - Method in class org.jtrim2.executor.GenericUpdateTaskExecutor
-
Returns the string representation of this executor in no particular format.
- toString() - Method in class org.jtrim2.executor.SingleThreadedExecutor
-
Returns the string representation of this executor in no particular format.
- toString() - Method in class org.jtrim2.executor.TaskScheduler
-
Returns the string representation of this
TaskSchedulerin no particular format. - toString() - Method in class org.jtrim2.executor.ThreadPoolTaskExecutor
-
Returns the string representation of this executor in no particular format.
- tryAwaitTermination(CancellationToken, long, TimeUnit) - Method in class org.jtrim2.executor.DelegatedTaskExecutorService
-
Waits until this
TaskExecutorServicewill not execute any more tasks or the given timeout elapses. - tryAwaitTermination(CancellationToken, long, TimeUnit) - Method in interface org.jtrim2.executor.TaskExecutorService
-
Waits until this
TaskExecutorServicewill not execute any more tasks or the given timeout elapses. - tryExecuteOne() - Method in class org.jtrim2.executor.ManualTaskExecutor
-
Removes a single task from the task queue of this executor and executes it (along with its completion handler) unless the queue is empty.
- tryGetFullQueueException(CancellationToken) - Method in interface org.jtrim2.executor.FullQueueHandler
-
Creates an exception to be thrown to signal that the executor queue is full, or returns
nullto instruct the executor to block and wait until it can execute the task. - tryGetResult() - Method in class org.jtrim2.executor.FutureResultHolder
-
Returns the result of the computation if it is available or
nullif it is not. - trySetError(Throwable) - Method in class org.jtrim2.executor.FutureResultHolder
-
Signals the the computation has failed and the failure is described by the specified exception.
- tryStoreResult(ResultType) - Method in class org.jtrim2.executor.FutureResultHolder
-
Stores the result of a computation if it has not completed yet.
U
- UpdateTaskExecutor - Interface in org.jtrim2.executor
-
An interface for executing tasks when only the last task is important.
- upgradeToStoppable(TaskExecutor) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns a
TaskExecutorServicewhich upgrades the specifiedTaskExecutorto provide all the features of aTaskExecutorService. - upgradeToUnstoppable(TaskExecutor) - Static method in class org.jtrim2.executor.TaskExecutors
-
Returns a
TaskExecutorServicewhich upgrades the specifiedTaskExecutorto provide all the features of aTaskExecutorServiceexcept that the returned executer cannot be shut down.
W
- waitResult() - Method in class org.jtrim2.executor.FutureResultHolder
-
Waits until the computation has been completed or the current thread has been interrupted and returns the result of the computation (if not interrupted).
- waitResult(long, TimeUnit) - Method in class org.jtrim2.executor.FutureResultHolder
-
Waits until the computation has been completed or the current thread has been interrupted or the specified timeout expires and returns the result of the computation (if the timeout did not expire and the current thread was not interrupted).
- wrappedExecutor - Variable in class org.jtrim2.executor.DelegatedTaskExecutorService
-
The
TaskExecutorServiceto which the methods are forwarded.
All Classes and Interfaces|All Packages