Mercurial Hosting > luan
comparison src/org/eclipse/jetty/util/thread/ThreadPool.java @ 863:88d3c8ff242a
remove SizedThreadPool
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 02 Oct 2016 05:22:55 -0600 |
parents | 3428c60d7cfc |
children |
comparison
equal
deleted
inserted
replaced
862:2bb375e94f64 | 863:88d3c8ff242a |
---|---|
25 * | 25 * |
26 * | 26 * |
27 */ | 27 */ |
28 public interface ThreadPool | 28 public interface ThreadPool |
29 { | 29 { |
30 /* ------------------------------------------------------------ */ | 30 /* ------------------------------------------------------------ */ |
31 public abstract boolean dispatch(Runnable job); | 31 public abstract boolean dispatch(Runnable job); |
32 | 32 |
33 /* ------------------------------------------------------------ */ | 33 /* ------------------------------------------------------------ */ |
34 /** | 34 /** |
35 * Blocks until the thread pool is {@link LifeCycle#stop stopped}. | 35 * Blocks until the thread pool is {@link LifeCycle#stop stopped}. |
36 */ | 36 */ |
37 public void join() throws InterruptedException; | 37 public void join() throws InterruptedException; |
38 | 38 |
39 /* ------------------------------------------------------------ */ | 39 /* ------------------------------------------------------------ */ |
40 /** | 40 /** |
41 * @return The total number of threads currently in the pool | 41 * @return The total number of threads currently in the pool |
42 */ | 42 */ |
43 public int getThreads(); | 43 public int getThreads(); |
44 | 44 |
45 /* ------------------------------------------------------------ */ | 45 /* ------------------------------------------------------------ */ |
46 /** | 46 /** |
47 * @return The number of idle threads in the pool | 47 * @return The number of idle threads in the pool |
48 */ | 48 */ |
49 public int getIdleThreads(); | 49 public int getIdleThreads(); |
50 | 50 |
51 /* ------------------------------------------------------------ */ | 51 /* ------------------------------------------------------------ */ |
52 /** | 52 /** |
53 * @return True if the pool is low on threads | 53 * @return True if the pool is low on threads |
54 */ | 54 */ |
55 public boolean isLowOnThreads(); | 55 public boolean isLowOnThreads(); |
56 | 56 |
57 | |
58 /* ------------------------------------------------------------ */ | |
59 /* ------------------------------------------------------------ */ | |
60 public interface SizedThreadPool extends ThreadPool | |
61 { | |
62 public int getMinThreads(); | |
63 public int getMaxThreads(); | |
64 public void setMinThreads(int threads); | |
65 public void setMaxThreads(int threads); | |
66 } | |
67 } | 57 } |