- Timestamp:
- 10/21/13 15:27:22 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/supervisor/src/main/java/omq/server/RemoteThreadPool.java
r102 r108 23 23 private static final Logger logger = Logger.getLogger(RemoteThreadPool.class.getName()); 24 24 private List<InvocationThread> workers; 25 private MultiInvocationThread multiWorker; 25 26 private AtomicInteger busy; 26 27 private int minPoolThreads; … … 34 35 private boolean killed = false; 35 36 36 public RemoteThreadPool(int minPoolThreads, int maxPoolThreads, long refresh, long keepAliveTime, int maxMessagesPerThread, RemoteObject obj, Broker broker) { 37 public RemoteThreadPool(int minPoolThreads, int maxPoolThreads, long refresh, long keepAliveTime, int maxMessagesPerThread, 38 RemoteObject obj, Broker broker) { 37 39 this.minPoolThreads = minPoolThreads; 38 40 this.maxPoolThreads = maxPoolThreads; … … 53 55 * Create and start minPoolThreads 54 56 */ 55 logger.info("ObjectMQ reference: " + obj.getRef() + ", creating: " + minPoolThreads + ", maxPoolThreads: " + maxPoolThreads + ", refresh time: " 56 + refresh + ", keepAlive: " + keepAliveTime + ", maxMessagesPerThread: " + maxMessagesPerThread); 57 logger.info("ObjectMQ reference: " + obj.getRef() + ", creating: " + minPoolThreads + ", maxPoolThreads: " + maxPoolThreads 58 + ", refresh time: " + refresh + ", keepAlive: " + keepAliveTime + ", maxMessagesPerThread: " + maxMessagesPerThread); 59 60 try { 61 multiWorker = new MultiInvocationThread(obj); 62 multiWorker.start(); 63 } catch (Exception e1) { 64 // TODO Auto-generated catch block 65 e1.printStackTrace(); 66 } 57 67 58 68 for (int i = 0; i < minPoolThreads; i++) { … … 86 96 } else if (numWorkers > minPoolThreads && busy.get() < numWorkers) { 87 97 // Kill idle threads 88 System.out.println("Kill lazy workers, numWorkers = " + numWorkers + ", minPool = " + minPoolThreads + ", busy = " + busy.get()); 98 System.out.println("Kill lazy workers, numWorkers = " + numWorkers + ", minPool = " + minPoolThreads + ", busy = " 99 + busy.get()); 89 100 stopIdleThreads(); 90 101 }
Note: See TracChangeset
for help on using the changeset viewer.