Index
All Classes and Interfaces|All Packages
A
- abort() - Method in class org.refcodes.controlflow.RetryCounter
- abort() - Method in class org.refcodes.controlflow.RetryTimeout
- APPLICATION - Enum constant in enum class org.refcodes.controlflow.ThreadMode
-
Stands for an application thread not being shut down even when none other
Threadis 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
ExecutorServiceretrieved from theExecutors. - createScheduledExecutorService(int, boolean) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Returns a default
ExecutorServiceretrieved from theExecutors.
D
- DAEMON - Enum constant in enum class org.refcodes.controlflow.ThreadMode
-
Stands for a daemon thread being shut down when the last application
Threadshut 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 Class in org.refcodes.controlflow
-
The Enum ExecutionStrategy.
- ExecutionStrategyAccessor - Interface in org.refcodes.controlflow
-
Provides an accessor for an
ExecutionStrategyproperty. - ExecutionStrategyAccessor.ExecutionStrategyMutator - Interface in org.refcodes.controlflow
-
Provides a mutator for an
ExecutionStrategyproperty. - ExecutionStrategyAccessor.ExecutionStrategyProperty - Interface in org.refcodes.controlflow
-
Provides an
ExecutionStrategyproperty. - ExecutorServiceAccessor - Interface in org.refcodes.controlflow
-
Provides an accessor for a
ExecutorServiceproperty. - ExecutorServiceAccessor.ExecutorServiceBuilder<B extends ExecutorServiceAccessor.ExecutorServiceBuilder<B>> - Interface in org.refcodes.controlflow
-
Provides a builder method for a
ExecutorServiceproperty returning the builder for applying multiple build operations. - ExecutorServiceAccessor.ExecutorServiceMutator - Interface in org.refcodes.controlflow
-
Provides a mutator for a
ExecutorServiceproperty. - ExecutorServiceAccessor.ExecutorServiceProperty - Interface in org.refcodes.controlflow
-
Provides a
ExecutorServiceproperty.
F
- FIRST_TO_LAST - Enum constant in enum class org.refcodes.controlflow.InvocationStrategy
-
Start with the first instance and invoke it till it cannot be invoked any more.
G
- getCurrentRetryDelayMillis() - Method in class org.refcodes.controlflow.RetryCounter
-
Returns the current delay before a 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
ExecutorServicefrom theExecutorServiceproperty. - getExponentialRetryDelayExtensionMillis() - Method in class org.refcodes.controlflow.RetryCounter
-
Returns the exponential retry delay extension time in milliseconds.
- getIndex() - Method in class org.refcodes.controlflow.Scope
- getInitialRetryDelayMillis() - 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
- getNextRetryDelayMillis() - Method in class org.refcodes.controlflow.RetryCounter
-
Calculates the next retry delay in milliseconds.
- getOffset() - Method in class org.refcodes.controlflow.Scope
- getReadTimeoutMillis() - Method in class org.refcodes.controlflow.RetryTimeout
-
Returns the timeout altogether the
RetryTimeoutis waiting while iterating through theRetryTimeoutviaRetryTimeout.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.
- getTotalRetryDelayMillis() - Method in class org.refcodes.controlflow.RetryCounter
-
Returns the total retry delay already accumulated as of calling the
RetryCounter.nextRetry()method since the initial construction or the lastRetryCounter.restart().
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 Class 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 succeedingCoupleror 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 succeedingCoupleror 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
Couplerinstance 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
Couplerinstance as argument belonging to a chain of elements.
J
- JOIN - Enum constant in enum class org.refcodes.controlflow.ExecutionStrategy
-
Similar to
ExecutionStrategy.PARALLEL: TheExecutionStrategy.JOINExecutionStrategycauses 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
Futureinstances contained in the givenCollection. - joinFutures(Future<?>...) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Futureinstances contained in the givenCollection. - joinThreads(Thread...) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Threadinstances contained in the givenCollection. - joinThreads(Collection<? extends Thread>) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Threadinstances contained in the givenCollection.
L
- LAST_TO_FIRST - Enum constant in enum class 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
ExecutorServiceinstances 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 - Enum constant in enum class 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 - Enum constant in enum class org.refcodes.controlflow.ExecutionStrategy
-
The
ExecutionStrategy.PARALLELExecutionStrategycauses 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
Retryableprovides methods for performing various retry iterations, be it based on retry counts or retry timeouts. - RetryCounter - Class in org.refcodes.controlflow
-
The
RetryCountercan 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: ------------------------------------------------------------------------- "(getRetryDelayMillis() + (Math.pow( 4, getRetryCount() - 1 ) * getExpRetryDelayExtensionMillis())" ------------------------------------------------------------------------- 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
RetryTimeoutcan 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
RetryTimeoutwith the given timeout and the given number of retry loops. - RetryTimeout(long, long) - Constructor for class org.refcodes.controlflow.RetryTimeout
-
Constructs the
RetryTimeoutwith the given timeout and the given retry delay. - ROUND_ROBIN - Enum constant in enum class 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
Scopewith the given offset without any length limitation. - Scope(int, int) - Constructor for class org.refcodes.controlflow.Scope
-
Creates a
Scopefor the given offset and with the given length. - SEQUENTIAL - Enum constant in enum class org.refcodes.controlflow.ExecutionStrategy
-
The
ExecutionStrategy.SEQUENTIALExecutionStrategycauses 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
ExecutorServicefor theExecutorServiceproperty. - setRetryDelayMillis(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.NORMmilliseconds, shutdown is forced as ofExecutorService.shutdownNow(). ------------------------------------------------------------------------- CAUTION: Do only invoke this methods onExecutorServiceinstances you manage exclusively yourself, do not apply this method onExecutorServiceinstances 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 - Enum constant in enum class 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 Class in org.refcodes.controlflow
-
Verbose readable threading model.
- ThreadMode - Enum Class in org.refcodes.controlflow
-
Verbose readable thread mode.
- throwException(E) - Method in class org.refcodes.controlflow.ExceptionWatchdog
-
Passes an exception to the
ExceptionWatchdognotifying 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
IllegalStateExceptionin case an illegal statefalseis being provided. - toManagedExecutorService(ExecutorService) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Converts an
ExecutorServiceto be aManagedExecutorServicewith 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
TweakableThreadFactorywith the given attributes. - TweakableThreadFactory(int) - Constructor for class org.refcodes.controlflow.TweakableThreadFactory
-
Constructs the
TweakableThreadFactorywith the given attributes. - TweakableThreadFactory(int, boolean) - Constructor for class org.refcodes.controlflow.TweakableThreadFactory
-
Constructs the
TweakableThreadFactorywith the given attributes.
V
- valueOf(String) - Static method in enum class org.refcodes.controlflow.ExecutionStrategy
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.refcodes.controlflow.InvocationStrategy
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.refcodes.controlflow.ThreadingModel
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class org.refcodes.controlflow.ThreadMode
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class org.refcodes.controlflow.ExecutionStrategy
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.refcodes.controlflow.InvocationStrategy
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.refcodes.controlflow.ThreadingModel
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class org.refcodes.controlflow.ThreadMode
-
Returns an array containing the constants of this enum class, in the order they are declared.
W
- waitForFutures(Collection<? extends Future<?>>) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Futureinstances contained in the givenCollection. - waitForFutures(Future<?>...) - Static method in class org.refcodes.controlflow.ControlFlowUtility
-
Joins the
Futureinstances contained in the givenCollection. - withExecutorService(ExecutorService) - Method in interface org.refcodes.controlflow.ExecutorServiceAccessor.ExecutorServiceBuilder
-
Sets the
ExecutorServicefor theExecutorServiceproperty.
All Classes and Interfaces|All Packages