public final class TaskService
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
setExecutorService(java.util.concurrent.ExecutorService eService)
Allows more control over how threads can be allocated.
|
void |
setMaxNumThreads(int maxNumThreads)
If called, will replace the default unbounded executor using a cached
thread pool with a fixed thread pool executor, so the maxNumThreads are
allocated.
|
static TaskService |
singleton() |
<T> java.util.concurrent.Future<T> |
spawn(java.util.concurrent.Callable<T> task) |
void |
spawn(java.lang.Runnable task)
Run a task in a thread.
|
public static TaskService singleton()
public void spawn(java.lang.Runnable task)
public <T> java.util.concurrent.Future<T> spawn(java.util.concurrent.Callable<T> task)
public void setExecutorService(java.util.concurrent.ExecutorService eService)
eService
- ExecutorService that allocates and schedules thread
spawning for layers.public void setMaxNumThreads(int maxNumThreads)
maxNumThreads
- Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details