Class DynamicPooledExecutor
- java.lang.Object
-
- org.apache.jackrabbit.core.query.lucene.DynamicPooledExecutor
-
- All Implemented Interfaces:
Executor
public class DynamicPooledExecutor extends Object implements Executor
DynamicPooledExecutor
implements an executor, which dynamically adjusts its maximum number of threads according to the number of available processors returned byRuntime.availableProcessors()
.
-
-
Constructor Summary
Constructors Constructor Description DynamicPooledExecutor()
Creates a new DynamicPooledExecutor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
execute(Runnable command)
Executes the given command.
-
-
-
Method Detail
-
execute
public void execute(Runnable command)
Executes the given command. This method will block if all threads in the pool are busy and return only when the command has been accepted. Care must be taken, that no deadlock occurs when multiple commands are scheduled for execution. In general commands should not depend on the execution of other commands!
-
close
public void close()
-
-