A C D E F G H I J L M N O P R S T V W
A
- abort() - Method in class org.refcodes.controlflow.RetryCounterImpl
- abort() - Method in class org.refcodes.controlflow.RetryTimeoutImpl
- APPLICATION - org.refcodes.controlflow.ThreadMode
-
Stands for an application thread not being shut down even when none other
Thread
is active any more. - awaitTermination(long, TimeUnit) - Method in class org.refcodes.controlflow.ManagedExecutorService
C
- catchException() - Method in interface org.refcodes.controlflow.ExceptionWatchdog
-
This methods awaits an
Exception
. - catchException() - Method in class org.refcodes.controlflow.ExceptionWatchdogImpl
-
This methods awaits an
Exception
. - ControlFlowUtility - Class in org.refcodes.controlflow
-
Utility class addressing control flow related issues.
- createCachedExecutorService(boolean) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Returns a default
ExecutorService
retrieved from theExecutors
. - createScheduledExecutorService(int, boolean) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Returns a default
ExecutorService
retrieved from theExecutors
.
D
- DAEMON - org.refcodes.controlflow.ThreadMode
-
Stands for a daemon thread being shut down when the last application
Thread
shut down. - dispose() - Method in class org.refcodes.controlflow.ExceptionWatchdogImpl
E
- ExceptionWatchdog<E extends java.lang.Exception> - Interface in org.refcodes.controlflow
-
The
ExceptionWatchdog
allows any number of threads to wait (sleep) when callingExceptionWatchdog.catchException()
till theExceptionWatchdog
is fed with a nextException
withExceptionWatchdog.throwException(Exception)
or till all waiting threads are released by callingReleaseable.releaseAll()
. - ExceptionWatchdogImpl<E extends java.lang.Exception> - Class in org.refcodes.controlflow
- ExceptionWatchdogImpl() - Constructor for class org.refcodes.controlflow.ExceptionWatchdogImpl
- execute(Runnable) - Method in class org.refcodes.controlflow.ManagedExecutorService
- ExecutionStrategy - Enum in org.refcodes.controlflow
-
The Enum ExecutionStrategy.
- ExecutionStrategyAccessor - Interface in org.refcodes.controlflow
-
Provides an accessor for an
ExecutionStrategy
property. - ExecutionStrategyAccessor.ExecutionStrategyMutator - Interface in org.refcodes.controlflow
-
Provides a mutator for an
ExecutionStrategy
property. - ExecutionStrategyAccessor.ExecutionStrategyProperty - Interface in org.refcodes.controlflow
-
Provides an
ExecutionStrategy
property. - ExecutorServiceAccessor - Interface in org.refcodes.controlflow
-
Provides an accessor for a
ExecutorService
property. - ExecutorServiceAccessor.ExecutorServiceBuilder<B extends ExecutorServiceAccessor.ExecutorServiceBuilder<B>> - Interface in org.refcodes.controlflow
-
Provides a builder method for a
ExecutorService
property returning the builder for applying multiple build operations. - ExecutorServiceAccessor.ExecutorServiceMutator - Interface in org.refcodes.controlflow
-
Provides a mutator for a
ExecutorService
property. - ExecutorServiceAccessor.ExecutorServiceProperty - Interface in org.refcodes.controlflow
-
Provides a
ExecutorService
property.
F
- FIRST_TO_LAST - org.refcodes.controlflow.InvocationStrategy
-
Start with the first instance and invoke it till it cannot be invoked any more.
G
- getCurrentRetryDelayInMs() - Method in interface org.refcodes.controlflow.RetryCounter
-
Returns the current delay before each retry to wait in milliseconds.
- getCurrentRetryDelayInMs() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Returns the current delay before each retry to wait in milliseconds.
- getExecutionStrategy() - Method in interface org.refcodes.controlflow.ExecutionStrategyAccessor
-
Retrieves the execution-strategy from the execution-strategy property.
- getExecutorService() - Method in interface org.refcodes.controlflow.ExecutorServiceAccessor
-
Retrieves the
ExecutorService
from theExecutorService
property. - getExpRetryDelayExtensionInMs() - Method in interface org.refcodes.controlflow.RetryCounter
-
Returns the exponential retry delay extension time in milliseconds.
- getExpRetryDelayExtensionInMs() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Returns the exponential retry delay extension time in milliseconds.
- getInitialRetryDelayInMs() - Method in interface org.refcodes.controlflow.RetryCounter
-
Returns the initial delay before each retry to wait in milliseconds.
- getInitialRetryDelayInMs() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Returns the initial delay before each retry to wait in milliseconds.
- getNextRetryDelayInMs() - Method in interface org.refcodes.controlflow.RetryCounter
-
Calculates the next retry delay in milliseconds.
- getNextRetryDelayInMs() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Calculates the next retry delay in milliseconds.
- getRetryCount() - Method in interface org.refcodes.controlflow.Retryable
-
The current state regarding the retires.
- getRetryCount() - Method in interface org.refcodes.controlflow.RetryCounter
-
The current state regarding the retires.
- getRetryCount() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
The current state regarding the retires.
- getRetryCount() - Method in class org.refcodes.controlflow.RetryTimeoutImpl
-
The current state regarding the retires.
- getRetryDelayInMs() - Method in interface org.refcodes.controlflow.RetryTimeout
-
Returns retry to wait in milliseconds upon calling
Retryable.nextRetry()
). - getRetryDelayInMs() - Method in class org.refcodes.controlflow.RetryTimeoutImpl
-
Returns retry to wait in milliseconds upon calling
Retryable.nextRetry()
). - getRetryNumber() - Method in interface org.refcodes.controlflow.RetryCounter
-
Returns the number of retires this instance allows altogether.
- getRetryNumber() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Returns the number of retires this instance allows altogether.
- getTimeoutInMs() - Method in interface org.refcodes.controlflow.RetryTimeout
-
Returns the timeout altogether the
RetryTimeout
is waiting while iterating through theRetryTimeout
viaRetryable.hasNextRetry()
andRetryable.nextRetry()
. - getTimeoutInMs() - Method in class org.refcodes.controlflow.RetryTimeoutImpl
-
Returns the timeout altogether the
RetryTimeout
is waiting while iterating through theRetryTimeout
viaRetryable.hasNextRetry()
andRetryable.nextRetry()
.
H
- hasNextRetry() - Method in interface org.refcodes.controlflow.Retryable
-
Returns true in case not all retires have been used up.
- hasNextRetry() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Returns true in case not all retires have been used up.
- hasNextRetry() - Method in class org.refcodes.controlflow.RetryTimeoutImpl
-
Returns true in case not all retires have been used up.
I
- InvocationStrategy - Enum in org.refcodes.controlflow
-
The Enum InvocationStrategy.
- invokeAll(Collection<? extends Callable<T>>) - Method in class org.refcodes.controlflow.ManagedExecutorService
- invokeAll(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class org.refcodes.controlflow.ManagedExecutorService
- invokeAny(Collection<? extends Callable<T>>) - Method in class org.refcodes.controlflow.ManagedExecutorService
- invokeAny(Collection<? extends Callable<T>>, long, TimeUnit) - Method in class org.refcodes.controlflow.ManagedExecutorService
- isShutdown() - Method in class org.refcodes.controlflow.ManagedExecutorService
- isTerminated() - Method in class org.refcodes.controlflow.ManagedExecutorService
J
- JOIN - org.refcodes.controlflow.ExecutionStrategy
-
Similar to
ExecutionStrategy.PARALLEL
: TheExecutionStrategy.JOIN
ExecutionStrategy
causes state change requests to be applied on the contained components in parallel, each state change request is applied in its own thread. - joinFutures(Collection<? extends Future<?>>) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Future
instances contained in the givenCollection
. - joinFutures(Future<?>...) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Future
instances contained in the givenCollection
. - joinThreads(Thread...) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Thread
instances contained in the givenCollection
. - joinThreads(Collection<? extends Thread>) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Thread
instances contained in the givenCollection
.
L
- LAST_TO_FIRST - org.refcodes.controlflow.InvocationStrategy
-
Start with the last instance and invoke it till it cannot be invoked any more.
- lastException() - Method in interface org.refcodes.controlflow.ExceptionWatchdog
-
Returns the last exception which was pushed via
ExceptionWatchdog.throwException(Exception)
. - lastException() - Method in class org.refcodes.controlflow.ExceptionWatchdogImpl
-
Returns the last exception which was pushed via
ExceptionWatchdog.throwException(Exception)
.
M
- ManagedExecutorService - Class in org.refcodes.controlflow
-
Usually
ExecutorService
instances originating from an application server are wrapped with thisManagedExecutorService
. - ManagedExecutorService(ExecutorService) - Constructor for class org.refcodes.controlflow.ManagedExecutorService
-
Instantiates a new managed executor service.
- MULTI - org.refcodes.controlflow.ThreadingModel
-
Stands for a multi-threaded thread model.
N
- newThread(Runnable) - Method in class org.refcodes.controlflow.ThreadFactoryImpl
- nextRetry() - Method in interface org.refcodes.controlflow.Retryable
-
Tests whether a next retry is possible.
- nextRetry() - Method in interface org.refcodes.controlflow.RetryCounter
-
Tests whether a next retry is possible.
- nextRetry() - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Tests whether a next retry is possible.
- nextRetry() - Method in class org.refcodes.controlflow.RetryTimeoutImpl
-
Tests whether a next retry is possible.
- nextRetry(Object) - Method in interface org.refcodes.controlflow.RetryTimeout
-
Tests whether a next retry is possible.
- nextRetry(Object) - Method in class org.refcodes.controlflow.RetryTimeoutImpl
-
Tests whether a next retry is possible.
O
- org.refcodes.controlflow - package org.refcodes.controlflow
P
- PARALLEL - org.refcodes.controlflow.ExecutionStrategy
-
The
ExecutionStrategy.PARALLEL
ExecutionStrategy
causes state change requests to be applied on the contained components in parallel, each state change request is applied in its own thread.
R
- releaseAll() - Method in class org.refcodes.controlflow.ExceptionWatchdogImpl
- restart() - Method in class org.refcodes.controlflow.RetryCounterImpl
- restart() - Method in class org.refcodes.controlflow.RetryTimeoutImpl
- Retryable - Interface in org.refcodes.controlflow
-
The
Retryable
provides methods for performing various retry iterations, be it based on retry counts or retry timeouts. - RetryCounter - Interface in org.refcodes.controlflow
-
The
RetryCounter
can be used in loops to test whether a retry should take place and in case a retry is to take place, then a given period of time (delay) is waited and the internal retry counter is decremented. - RetryCounterImpl - Class in org.refcodes.controlflow
-
Implementation of the
RetryCounter
interface. - RetryCounterImpl(int) - Constructor for class org.refcodes.controlflow.RetryCounterImpl
-
Constructs a retry retry counter by providing the number of retries with no delay before each retry.
- RetryCounterImpl(int, long) - Constructor for class org.refcodes.controlflow.RetryCounterImpl
-
Constructs a retry timeout counter by providing the number of retries and the delay before each retry.
- RetryCounterImpl(int, long, long) - Constructor for class org.refcodes.controlflow.RetryCounterImpl
-
Constructs a retry timeout counter by providing the number of retries and the delay before each retry and taking an exponential delay extension into calculation: ------------------------------------------------------------------------- "(getRetryDelayInMs() + (Math.pow( 4, getRetryCount() - 1 ) * getExpRetryDelayExtensionInMs())" ------------------------------------------------------------------------- In case a delay greater than 0 is set, then each retry is being delayed by the according amount of milliseconds, in case no retries are left, then delaying is skipped.
- RetryCounterImpl(long, long) - Constructor for class org.refcodes.controlflow.RetryCounterImpl
-
Constructs a retry timeout counter by providing the total delay time and the delay before each retry.
- RetryTimeout - Interface in org.refcodes.controlflow
-
The
RetryTimeout
can be used in loops to test whether a timeout has been reached, if the timeout has not been reached, then a given period of time (delay) is waited. - RetryTimeoutImpl - Class in org.refcodes.controlflow
-
Implementation of the
RetryTimeout
interface. - RetryTimeoutImpl(long, int) - Constructor for class org.refcodes.controlflow.RetryTimeoutImpl
-
Constructs the
RetryTimeoutImpl
with the given timeout and the given number of retry loops. - RetryTimeoutImpl(long, long) - Constructor for class org.refcodes.controlflow.RetryTimeoutImpl
-
Constructs the
RetryTimeoutImpl
with the given timeout and the given retry delay. - ROUND_ROBIN - org.refcodes.controlflow.InvocationStrategy
-
Invoke the next instance.
S
- SEQUENTIAL - org.refcodes.controlflow.ExecutionStrategy
-
The
ExecutionStrategy.SEQUENTIAL
ExecutionStrategy
causes state change requests to be applied on the contained components in sequential order one after the other. - setExecutionStrategy(ExecutionStrategy) - Method in interface org.refcodes.controlflow.ExecutionStrategyAccessor.ExecutionStrategyMutator
-
Sets the execution-strategy for the execution-strategy property.
- setExecutorService(ExecutorService) - Method in interface org.refcodes.controlflow.ExecutorServiceAccessor.ExecutorServiceMutator
-
Sets the
ExecutorService
for theExecutorService
property. - setRetryDelyInMs(long) - Method in class org.refcodes.controlflow.RetryCounterImpl
-
Sets the delay before each retry to wait in milliseconds.
- shutdown() - Method in class org.refcodes.controlflow.ManagedExecutorService
- shutdownGracefully(ExecutorService) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Tries to orderly shutdown (
ExecutorService.shutdown()
) all tasks of anExecutorService
, after a timeout ofIoRetryCount.NORM
milliseconds, shutdown is forced as ofExecutorService.shutdownNow()
. ------------------------------------------------------------------------- CAUTION: Do only invoke this methods onExecutorService
instances you manage exclusively yourself, do not apply this method onExecutorService
instances provided to you by your application server (e.g. an JEE server) - shutdownGracefully(ExecutorService, long) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Tries to orderly shutdown (
ExecutorService.shutdown()
) all tasks of anExecutorService
, after a given timeout in milliseconds, shutdown is forced as ofExecutorService.shutdownNow()
. - shutdownNow() - Method in class org.refcodes.controlflow.ManagedExecutorService
- SINGLE - org.refcodes.controlflow.ThreadingModel
-
Stands for a single-threaded thread model.
- submit(Runnable) - Method in class org.refcodes.controlflow.ManagedExecutorService
- submit(Runnable, T) - Method in class org.refcodes.controlflow.ManagedExecutorService
- submit(Callable<T>) - Method in class org.refcodes.controlflow.ManagedExecutorService
T
- ThreadFactoryImpl - Class in org.refcodes.controlflow
- ThreadFactoryImpl(boolean) - Constructor for class org.refcodes.controlflow.ThreadFactoryImpl
-
Constructs the
ThreadFactoryImpl
with the given attributes. - ThreadFactoryImpl(int) - Constructor for class org.refcodes.controlflow.ThreadFactoryImpl
-
Constructs the
ThreadFactoryImpl
with the given attributes. - ThreadFactoryImpl(int, boolean) - Constructor for class org.refcodes.controlflow.ThreadFactoryImpl
-
Constructs the
ThreadFactoryImpl
with the given attributes. - ThreadingModel - Enum in org.refcodes.controlflow
-
Verbose readable threading model.
- ThreadMode - Enum in org.refcodes.controlflow
-
Verbose readable thread mode.
- throwException(E) - Method in interface org.refcodes.controlflow.ExceptionWatchdog
-
Passes an exception to the
ExceptionWatchdog
notifying all awaiting threads inside theExceptionWatchdog.catchException()
method to be provided with thatException
. - throwException(E) - Method in class org.refcodes.controlflow.ExceptionWatchdogImpl
-
Passes an exception to the
ExceptionWatchdog
notifying all awaiting threads inside theExceptionWatchdog.catchException()
method to be provided with thatException
. - throwIllegalStateException(boolean) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Code redundancy preventing code snippet (in terms of aspect) throwing an
IllegalStateException
in case an illegal statefalse
is being provided. - toManagedExecutorService(ExecutorService) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Converts an
ExecutorService
to be aManagedExecutorService
with methodsExecutorService.shutdown()
andExecutorService.shutdownNow()
being disabled as them are to be managed by an application server.
V
- valueOf(String) - Static method in enum org.refcodes.controlflow.ExecutionStrategy
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.refcodes.controlflow.InvocationStrategy
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.refcodes.controlflow.ThreadingModel
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.refcodes.controlflow.ThreadMode
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum org.refcodes.controlflow.ExecutionStrategy
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum org.refcodes.controlflow.InvocationStrategy
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum org.refcodes.controlflow.ThreadingModel
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum org.refcodes.controlflow.ThreadMode
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- waitForFutures(Collection<? extends Future<?>>) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Future
instances contained in the givenCollection
. - waitForFutures(Future<?>...) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Future
instances contained in the givenCollection
. - withExecutorService(ExecutorService) - Method in interface org.refcodes.controlflow.ExecutorServiceAccessor.ExecutorServiceBuilder
-
Sets the
ExecutorService
for theExecutorService
property.