public class RxTaskPool extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
RxTaskPool.TaskCreator |
Constructor and Description |
---|
RxTaskPool(int maxTasks,
int minTasks,
RxTaskPool.TaskCreator creator) |
Modifier and Type | Method and Description |
---|---|
int |
available() |
protected void |
configureTask(AbstractRxTask task) |
int |
getMaxThreads() |
int |
getMinThreads() |
AbstractRxTask |
getRxTask()
Find an idle worker thread, if any.
|
RxTaskPool.TaskCreator |
getTaskCreator() |
void |
returnWorker(AbstractRxTask worker)
Called by the worker thread to return itself to the
idle pool.
|
void |
setMaxTasks(int maxThreads) |
void |
setMinTasks(int minThreads) |
void |
stop() |
public RxTaskPool(int maxTasks, int minTasks, RxTaskPool.TaskCreator creator) throws Exception
Exception
protected void configureTask(AbstractRxTask task)
public AbstractRxTask getRxTask()
public int available()
public void returnWorker(AbstractRxTask worker)
public int getMaxThreads()
public int getMinThreads()
public void stop()
public void setMaxTasks(int maxThreads)
public void setMinTasks(int minThreads)
public RxTaskPool.TaskCreator getTaskCreator()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.