Package io.inugami.commons.threads
Class RunAndCloseService<T>
- java.lang.Object
-
- io.inugami.commons.threads.RunAndCloseService<T>
-
- All Implemented Interfaces:
ThreadFactory
public class RunAndCloseService<T> extends Object implements ThreadFactory
ThreadsExecutor- Since:
- 24 mars 2018
-
-
Constructor Summary
Constructors Constructor Description RunAndCloseService(String threadsName, long timeout, int nbThreads, Callable<T>... tasks)
RunAndCloseService(String threadsName, long timeout, int nbThreads, BiFunction<Exception,Callable<T>,T> onError, Callable<T>... tasks)
RunAndCloseService(String threadsName, long timeout, int nbThreads, List<Callable<T>> tasks)
RunAndCloseService(String threadsName, long timeout, int nbThreads, List<Callable<T>> tasks, BiFunction<Exception,Callable<T>,T> onError)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
forceShutdown()
Thread
newThread(Runnable runnable)
List<T>
run()
-
-
-
Constructor Detail
-
RunAndCloseService
@SafeVarargs public RunAndCloseService(String threadsName, long timeout, int nbThreads, BiFunction<Exception,Callable<T>,T> onError, Callable<T>... tasks)
-
RunAndCloseService
@SafeVarargs public RunAndCloseService(String threadsName, long timeout, int nbThreads, Callable<T>... tasks)
-
RunAndCloseService
public RunAndCloseService(String threadsName, long timeout, int nbThreads, List<Callable<T>> tasks)
-
-