net.sf.jqql
Class SingleExecutor
java.lang.Object
net.sf.jqql.SingleExecutor
public class SingleExecutor
- extends Object
The processor of a single thread, contains all responsible for the task can be modular, reducing the number of threads.
The matter is currently set to create a few QQClient, use only a threads to process some fixed number task
perhaps too much QQClient when there will be such a problem
单一线程执行器,负责包含所有的可模块化任务,减少线程数。目前的设置是不管创建
几个QQClient,都只使用一个线程来进行一些固定任务,也许QQClient太多的时候这样
会有问题
- Author:
- luma
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingleExecutor
public SingleExecutor()
submit
public <T> Future<T> submit(Callable<T> callable)
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit)
schedule
public <T> ScheduledFuture<T> schedule(Callable<T> callable,
long delay,
TimeUnit unit)
increaseClient
public void increaseClient()
- increase the number of QQclinet
增加QQClient数目
decreaseClient
public void decreaseClient()
- disincrease the number of QQclinet
减少QQ客户端数目,如果数目为0,则释放资源