📄 ithreadpool.java
字号:
/* * Copyright (C) butor.com. All rights reserved. * * This software is published under the terms of the GNU Library General * Public License (GNU LGPL), a copy of which has been included with this * distribution in the LICENSE.txt file. */package org.butor.resourcePool.threadPoolService;/** * ---------------------------------------------------------------- * 2000jun21,deb: Initial version * 2001jan29,deb: + doneTask() * - getNextRunnable() */public interface IThreadPool {/** * This method is called by ThreadPoolThread objects * when they are done working on a task * * @param aThread com.cjc.common.resourcesMgmt.threadPool.ThreadPoolThread * the thread that has finished its task */void doneTask(ThreadPoolThread aThread);/** * This method is called automatically by the service class * monitor. */void isAlive();/** * This method is called by the clients that want to process * a task. The task is put in the f_waitingTasksQ and if * a thread is available in the f_waitQ or the pool has not * reached the maximum number of threads, the task is assigned * to a thread. * * @param task java.lang.Runnable The new task to process */public void run(Runnable task);/** * This method is used to shut down every threads * managed by this pool. * * @param isFast boolean Ignored for the moment */void shutdown(boolean isFast);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -