Package de.aristaflow.adept2.util.threading
package de.aristaflow.adept2.util.threading
-
ClassDescriptionThe default thread factory overwritten to name the threads.This thread pool executor enhances a normal thread pool by: prepending the state of a thread to the thread name, logging exceptions (and results) of futures where no one has been interested in and logging statistics. Thread names will be prefixed as following: NEW: Used for newly created threads. ACT: Used for active threads that are currently executing tasks. IDL: Used for idle threads, i.e.A
ThreadPoolExecutorwhich comes in two flavours: Creates new threads to run a new task, if the amount of threads is less than the corePoolSize.A cleanup callable executes a callable and afterwards a special cleanup consuming runnable finally after the first callable.A cleanup runnable executes a runnable (or several ones) and afterwards a special cleanup runnable finally after the first runnable.ConsumingRunnable<T,E extends Throwable> A runnable consuming an object of typeTor an exception of typeE.A thread pool for executing the tasks by the submitting thread.Delayer<T>A delayer provides the means to delay a call based on the amount of tries a provided element has experienced.ExceptionConvertingCallable<V,E extends Exception> This class provides the means to call a method and replace an occurred exception by a different one.A callable catching exceptions and virtual machine errors and optionally rethrowing them.A runnable catching runtime exceptions and virtual machine errors and optionally rethrowing them.Executor-related utility methods.A future that wraps another future and logs all occurred exceptions and the result for information purpose if no one was interested in it.This clean-up task logs the result of a future which no one retrieved.A scheduled future that wraps another future and logs all occurred exceptions and the result for information purpose if no one was interested in it.This class creates logging futures when scheduling.ProducingRunnable<T,E extends Exception> A runnable producing an object of typeTand throwing an exception of typeE.This class provides the means to exchange a result between different threads.Thread-related tool methods.ThrowableCreatingCallable<V,T extends Throwable> This interface encapsulates the creation of a new throwable based on an occurred throwable.