01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: *
05: * Licensed under the Educational Community License, Version 1.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.opensource.org/licenses/ecl1.php
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package edu.iu.uis.eden.messaging.threadpool;
18:
19: import org.kuali.rice.lifecycle.Lifecycle;
20:
21: import edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue;
22: import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
23:
24: /**
25: * A thread pool which can be used to schedule asynchronous tasks.
26: *
27: * @author Kuali Rice Team (kuali-rice@googlegroups.com)
28: */
29: public interface KSBThreadPool extends ExecutorService, Lifecycle {
30:
31: public boolean remove(Runnable task);
32:
33: public int getActiveCount();
34:
35: public void setCorePoolSize(int corePoolSize);
36:
37: public int getCorePoolSize();
38:
39: public int getMaximumPoolSize();
40:
41: public void setMaximumPoolSize(int maxPoolSize);
42:
43: public int getPoolSize();
44:
45: public int getLargestPoolSize();
46:
47: public long getKeepAliveTime();
48:
49: public long getTaskCount();
50:
51: public long getCompletedTaskCount();
52:
53: public BlockingQueue getQueue();
54:
55: public Object getInstance();
56: }
|