Class ThrottledExecutor
- java.lang.Object
-
- com.datumbox.framework.common.concurrency.ThrottledExecutor
-
-
Constructor Summary
Constructors Constructor Description ThrottledExecutor(Executor executor, int maxConcurrentTasks)This Executor will block the main thread (when execute() is called) if the number of submitted and unfinished tasks reaches the provided limit.
-
-
-
Constructor Detail
-
ThrottledExecutor
public ThrottledExecutor(Executor executor, int maxConcurrentTasks)
This Executor will block the main thread (when execute() is called) if the number of submitted and unfinished tasks reaches the provided limit. This enabled us to pace the input and reduce memory consumption.- Parameters:
executor-maxConcurrentTasks-
-
-