1 package net.javacoding.jspider.api.event.monitor; 2 3 6 public class ThreadPoolMonitorEvent extends MonitorEvent { 7 8 protected String name; 9 protected int occupationPct; 10 protected int idlePct; 11 protected int blockedPct; 12 protected int busyPct; 13 protected int size; 14 15 public ThreadPoolMonitorEvent ( String name, int occupationPct, int idlePct, int blockedPct, int busyPct, int size ) { 16 this.name = name; 17 this.occupationPct = occupationPct; 18 this.idlePct = idlePct; 19 this.blockedPct = blockedPct; 20 this.busyPct = busyPct; 21 this.size = size; 22 } 23 24 public String toString() { 25 return "ThreadPool " + getName() + " occupation:" + (getOccupationPct()) + "% [idle: " + getIdlePct() + "%, blocked: " + getBlockedPct() + "%, busy: " + getBusyPct() + "%], size: " + getSize(); 26 } 27 28 public String getComment() { 29 return toString(); 30 } 31 32 public String getName() { 33 return name; 34 } 35 36 public int getOccupationPct() { 37 return occupationPct; 38 } 39 40 public int getIdlePct() { 41 return idlePct; 42 } 43 44 public int getBlockedPct() { 45 return blockedPct; 46 } 47 48 public int getBusyPct() { 49 return busyPct; 50 } 51 52 public int getSize() { 53 return size; 54 } 55 56 } 57 | Popular Tags |