1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.mina.util;
20
21 /***
22 * A generic thread pool interface.
23 *
24 * @author The Apache Directory Project (dev@directory.apache.org)
25 * @version $Rev: 327113 $, $Date: 2005-10-21 15:59:15 +0900 $
26 */
27 public interface ThreadPool {
28
29 /***
30 * Returns the number of threads in the thread pool.
31 */
32 int getPoolSize();
33
34 /***
35 * Returns the maximum size of the thread pool.
36 */
37 int getMaximumPoolSize();
38
39 /***
40 * Returns the keep-alive time until the thread suicides after it became
41 * idle (milliseconds unit).
42 */
43 int getKeepAliveTime();
44
45 /***
46 * Sets the maximum size of the thread pool.
47 */
48 void setMaximumPoolSize( int maximumPoolSize );
49
50 /***
51 * Sets the keep-alive time until the thread suicides after it became idle
52 * (milliseconds unit).
53 */
54 void setKeepAliveTime( int keepAliveTime );
55
56 /***
57 * Starts thread pool threads and starts forwarding events to them.
58 */
59 void start();
60
61 /***
62 * Stops all thread pool threads.
63 */
64 void stop();
65 }