Class TaskManager<TRANSACTION,EXCEPTION extends Exception,TRACE>
- java.lang.Object
-
- no.skatteetaten.fastsetting.formueinntekt.felles.task.processor.TaskManager<TRANSACTION,EXCEPTION,TRACE>
-
- All Implemented Interfaces:
TaskProcessor
public class TaskManager<TRANSACTION,EXCEPTION extends Exception,TRACE> extends Object implements TaskProcessor
-
-
Constructor Summary
Constructors Constructor Description TaskManager(String topic, Executor executor, TaskSource<TRANSACTION,EXCEPTION> source, TaskDispatcher<TRANSACTION,EXCEPTION> dispatcher, TaskLimiter limiter, Function<String,? extends TaskHandler<TRANSACTION,EXCEPTION>> handlerFactory, TaskListener<TRACE> listener, int size, long pause, TimeUnit timeUnit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetTopic()booleanisActive()booleanresume()booleanstart(long timeout, TimeUnit timeUnit)booleanstop(long timeout, TimeUnit timeUnit)
-
-
-
Constructor Detail
-
TaskManager
public TaskManager(String topic, Executor executor, TaskSource<TRANSACTION,EXCEPTION> source, TaskDispatcher<TRANSACTION,EXCEPTION> dispatcher, TaskLimiter limiter, Function<String,? extends TaskHandler<TRANSACTION,EXCEPTION>> handlerFactory, TaskListener<TRACE> listener, int size, long pause, TimeUnit timeUnit)
-
-
Method Detail
-
start
public boolean start(long timeout, TimeUnit timeUnit) throws InterruptedException, TimeoutException- Specified by:
startin interfaceTaskProcessor- Throws:
InterruptedExceptionTimeoutException
-
stop
public boolean stop(long timeout, TimeUnit timeUnit) throws InterruptedException, TimeoutException- Specified by:
stopin interfaceTaskProcessor- Throws:
InterruptedExceptionTimeoutException
-
resume
public boolean resume()
- Specified by:
resumein interfaceTaskProcessor
-
isActive
public boolean isActive()
- Specified by:
isActivein interfaceTaskProcessor
-
getTopic
public String getTopic()
- Specified by:
getTopicin interfaceTaskProcessor
-
-