ThreadPoolMonitorEvent.java
上传用户:qing5858
上传日期:2015-10-27
资源大小:6056k
文件大小:1k
源码类别:

搜索引擎

开发平台:

Java

  1. package net.javacoding.jspider.api.event.monitor;
  2. /**
  3.  * $Id: ThreadPoolMonitorEvent.java,v 1.3 2003/03/28 17:26:26 vanrogu Exp $
  4.  */
  5. public class ThreadPoolMonitorEvent extends MonitorEvent {
  6.     protected String name;
  7.     protected int occupationPct;
  8.     protected int idlePct;
  9.     protected int blockedPct;
  10.     protected int busyPct;
  11.     protected int size;
  12.     public ThreadPoolMonitorEvent ( String name, int occupationPct, int idlePct, int blockedPct, int busyPct, int size ) {
  13.         this.name = name;
  14.         this.occupationPct = occupationPct;
  15.         this.idlePct = idlePct;
  16.         this.blockedPct = blockedPct;
  17.         this.busyPct = busyPct;
  18.         this.size = size;
  19.     }
  20.     public String toString() {
  21.         return "ThreadPool " + getName() + " occupation:" + (getOccupationPct()) + "% [idle: " + getIdlePct() + "%, blocked: " + getBlockedPct() + "%, busy: " + getBusyPct() + "%], size: " + getSize();
  22.     }
  23.     public String getComment() {
  24.         return toString();
  25.     }
  26.     public String getName() {
  27.         return name;
  28.     }
  29.     public int getOccupationPct() {
  30.         return occupationPct;
  31.     }
  32.     public int getIdlePct() {
  33.         return idlePct;
  34.     }
  35.     public int getBlockedPct() {
  36.         return blockedPct;
  37.     }
  38.     public int getBusyPct() {
  39.         return busyPct;
  40.     }
  41.     public int getSize() {
  42.         return size;
  43.     }
  44. }