Package org.refcodes.controlflow
-
Interface Summary Interface Description ExceptionWatchdog<E extends java.lang.Exception> TheExceptionWatchdog
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()
.ExecutionStrategyAccessor Provides an accessor for anExecutionStrategy
property.ExecutionStrategyAccessor.ExecutionStrategyMutator Provides a mutator for anExecutionStrategy
property.ExecutionStrategyAccessor.ExecutionStrategyProperty Provides anExecutionStrategy
property.ExecutorServiceAccessor Provides an accessor for aExecutorService
property.ExecutorServiceAccessor.ExecutorServiceBuilder<B extends ExecutorServiceAccessor.ExecutorServiceBuilder<B>> Provides a builder method for aExecutorService
property returning the builder for applying multiple build operations.ExecutorServiceAccessor.ExecutorServiceMutator Provides a mutator for aExecutorService
property.ExecutorServiceAccessor.ExecutorServiceProperty Provides aExecutorService
property.Retryable TheRetryable
provides methods for performing various retry iterations, be it based on retry counts or retry timeouts.RetryCounter TheRetryCounter
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.RetryTimeout TheRetryTimeout
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. -
Class Summary Class Description ControlFlowUtility Utility class addressing control flow related issues.ExceptionWatchdogImpl<E extends java.lang.Exception> ManagedExecutorService UsuallyExecutorService
instances originating from an application server are wrapped with thisManagedExecutorService
.RetryCounterImpl Implementation of theRetryCounter
interface.RetryTimeoutImpl Implementation of theRetryTimeout
interface.ThreadFactoryImpl -
Enum Summary Enum Description ExecutionStrategy The Enum ExecutionStrategy.InvocationStrategy The Enum InvocationStrategy.ThreadingModel Verbose readable threading model.ThreadMode Verbose readable thread mode.