A C D E F G H I J L M N O P R S T V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- abort() - Method in class org.refcodes.controlflow.RetryCounter
- abort() - Method in class org.refcodes.controlflow.RetryTimeout
- 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 class org.refcodes.controlflow.ExceptionWatchdog
-
This methods awaits an
Exception
. - ControlFlowUtility - Class in org.refcodes.controlflow
-
Utility class addressing control flow related issues.
- Coupler - Interface in org.refcodes.controlflow
- Coupler.Operation<SUBJECT,PARAM extends Coupler,RET> - Interface in org.refcodes.controlflow
-
Definition of a method with single argument of type
Coupler
. - 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.ExceptionWatchdog
E
- ExceptionWatchdog<E extends Exception> - Class in org.refcodes.controlflow
- ExceptionWatchdog() - Constructor for class org.refcodes.controlflow.ExceptionWatchdog
- 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 class org.refcodes.controlflow.RetryCounter
-
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 class org.refcodes.controlflow.RetryCounter
-
Returns the exponential retry delay extension time in milliseconds.
- getIndex() - Method in class org.refcodes.controlflow.Scope
- getInitialRetryDelayInMs() - Method in class org.refcodes.controlflow.RetryCounter
-
Returns the initial delay before each retry to wait in milliseconds.
- getLength() - Method in class org.refcodes.controlflow.Scope
- getNextRetryDelayInMs() - Method in class org.refcodes.controlflow.RetryCounter
-
Calculates the next retry delay in milliseconds.
- getOffset() - Method in class org.refcodes.controlflow.Scope
- getReadTimeoutInMs() - Method in class org.refcodes.controlflow.RetryTimeout
-
Returns the timeout altogether the
RetryTimeout
is waiting while iterating through theRetryTimeout
viaRetryTimeout.hasNextRetry()
andRetryTimeout.nextRetry()
. - getRetryCount() - Method in interface org.refcodes.controlflow.Retryable
-
The current state regarding the retires.
- getRetryCount() - Method in class org.refcodes.controlflow.RetryCounter
-
The current state regarding the retires.
- getRetryCount() - Method in class org.refcodes.controlflow.RetryTimeout
-
The current state regarding the retires.
- getRetryDelayInMs() - Method in class org.refcodes.controlflow.RetryTimeout
-
Returns retry to wait in milliseconds upon calling
RetryTimeout.nextRetry()
). - getRetryNumber() - Method in class org.refcodes.controlflow.RetryCounter
-
Returns the number of retires this instance allows altogether.
H
- hasNext() - Method in interface org.refcodes.controlflow.Coupler
- hasNext() - Method in class org.refcodes.controlflow.Scope
- 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.RetryCounter
-
Returns true in case not all retires have been used up.
- hasNextRetry() - Method in class org.refcodes.controlflow.RetryTimeout
-
Returns true in case not all retires have been used up.
I
- InvocationStrategy - Enum in org.refcodes.controlflow
-
The Enum InvocationStrategy.
- invoke(SUBJECT, PARAM) - Method in interface org.refcodes.controlflow.Coupler.Operation
- 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
- invokeNext(Function<Coupler, RET>) - Method in interface org.refcodes.controlflow.Coupler
-
Invokes a given operation with the succeeding
Coupler
(as ofCoupler.next()
) as parameter in case there is a succeedingCoupler
(as ofCoupler.hasNext()
) and returns the operation's result or null in case there is no succeedingCoupler
. - invokeNext(SUBJECT, Coupler.Operation<SUBJECT, Coupler, RET>) - Method in interface org.refcodes.controlflow.Coupler
-
Invokes a given operation on the given successor with the succeeding
Coupler
(as ofCoupler.next()
) as parameter in case there is a succeedingCoupler
(as ofCoupler.hasNext()
) and returns the operation's result or null in case there is no succeedingCoupler
or the successor is null. - invokeNextOr(Function<Coupler, RET>, RET) - Method in interface org.refcodes.controlflow.Coupler
-
Invokes a given operation with the succeeding
Coupler
(as ofCoupler.next()
) as parameter in case there is a succeedingCoupler
(as ofCoupler.hasNext()
) and returns the operation's result or the default value in case there is no succeedingCoupler
. - invokeNextOr(SUBJECT, Coupler.Operation<SUBJECT, Coupler, RET>, RET) - Method in interface org.refcodes.controlflow.Coupler
-
Invokes a given operation on the given successor with the succeeding
Coupler
(as ofCoupler.next()
) as parameter in case there is a succeedingCoupler
(as ofCoupler.hasNext()
) and returns the operation's result or the default value in case there is no succeedingCoupler
or the successor is null. - isShutdown() - Method in class org.refcodes.controlflow.ManagedExecutorService
- isTerminated() - Method in class org.refcodes.controlflow.ManagedExecutorService
- isValid() - Method in interface org.refcodes.controlflow.Coupler
-
To be used by an element's method being invoked with a
Coupler
instance as argument belonging to a chain of elements. - isValid() - Method in class org.refcodes.controlflow.Scope
-
To be used by an element's method being invoked with a
Coupler
instance as argument belonging to a chain of elements.
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 class org.refcodes.controlflow.ExceptionWatchdog
-
Returns the last exception which was pushed via
ExceptionWatchdog.throwException(Exception)
. - letExecutionStrategy(ExecutionStrategy) - Method in interface org.refcodes.controlflow.ExecutionStrategyAccessor.ExecutionStrategyProperty
-
This method stores and passes through the given argument, which is very useful for builder APIs: Sets the given
ExecutionStrategy
(setter) as ofExecutionStrategyAccessor.ExecutionStrategyMutator.setExecutionStrategy(ExecutionStrategy)
and returns the very same value (getter). - letExecutorService(ExecutorService) - Method in interface org.refcodes.controlflow.ExecutorServiceAccessor.ExecutorServiceProperty
-
This method stores and passes through the given argument, which is very useful for builder APIs: Sets the given
ExecutorService
(setter) as ofExecutorServiceAccessor.ExecutorServiceMutator.setExecutorService(ExecutorService)
and returns the very same value (getter).
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.TweakableThreadFactory
- next() - Method in interface org.refcodes.controlflow.Coupler
-
Retrieves the succeeding
Coupler
. - next() - Method in class org.refcodes.controlflow.Scope
-
Retrieves the succeeding
Coupler
. - nextRetry() - Method in interface org.refcodes.controlflow.Retryable
-
Tests whether a next retry is possible.
- nextRetry() - Method in class org.refcodes.controlflow.RetryCounter
-
Tests whether a next retry is possible.
- nextRetry() - Method in class org.refcodes.controlflow.RetryTimeout
-
Tests whether a next retry is possible.
- nextRetry(Object) - Method in class org.refcodes.controlflow.RetryTimeout
-
Tests whether a next retry is possible.
O
- org.refcodes.controlflow - module org.refcodes.controlflow
- 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.ExceptionWatchdog
- restart() - Method in class org.refcodes.controlflow.RetryCounter
- restart() - Method in class org.refcodes.controlflow.RetryTimeout
- 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 - Class 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. - RetryCounter(int) - Constructor for class org.refcodes.controlflow.RetryCounter
-
Constructs a retry retry counter by providing the number of retries with no delay before each retry.
- RetryCounter(int, long) - Constructor for class org.refcodes.controlflow.RetryCounter
-
Constructs a retry timeout counter by providing the number of retries and the delay before each retry.
- RetryCounter(int, long, long) - Constructor for class org.refcodes.controlflow.RetryCounter
-
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.
- RetryCounter(long, long) - Constructor for class org.refcodes.controlflow.RetryCounter
-
Constructs a retry timeout counter by providing the total delay time and the delay before each retry.
- RetryTimeout - Class 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. - RetryTimeout(long, int) - Constructor for class org.refcodes.controlflow.RetryTimeout
-
Constructs the
RetryTimeout
with the given timeout and the given number of retry loops. - RetryTimeout(long, long) - Constructor for class org.refcodes.controlflow.RetryTimeout
-
Constructs the
RetryTimeout
with the given timeout and the given retry delay. - ROUND_ROBIN - org.refcodes.controlflow.InvocationStrategy
-
Invoke the next instance.
S
- Scope - Class in org.refcodes.controlflow
- Scope(int) - Constructor for class org.refcodes.controlflow.Scope
-
Creates a
Scope
with the given offset without any length limitation. - Scope(int, int) - Constructor for class org.refcodes.controlflow.Scope
-
Creates a
Scope
for the given offset and with the given length. - 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. - setRetryDelayInMs(long) - Method in class org.refcodes.controlflow.RetryCounter
-
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
- ThreadingModel - Enum in org.refcodes.controlflow
-
Verbose readable threading model.
- ThreadMode - Enum in org.refcodes.controlflow
-
Verbose readable thread mode.
- throwException(E) - Method in class org.refcodes.controlflow.ExceptionWatchdog
-
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. - toString() - Method in class org.refcodes.controlflow.Scope
- TweakableThreadFactory - Class in org.refcodes.controlflow
- TweakableThreadFactory(boolean) - Constructor for class org.refcodes.controlflow.TweakableThreadFactory
-
Constructs the
TweakableThreadFactory
with the given attributes. - TweakableThreadFactory(int) - Constructor for class org.refcodes.controlflow.TweakableThreadFactory
-
Constructs the
TweakableThreadFactory
with the given attributes. - TweakableThreadFactory(int, boolean) - Constructor for class org.refcodes.controlflow.TweakableThreadFactory
-
Constructs the
TweakableThreadFactory
with the given attributes.
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.
All Classes All Packages