public void enableGlobalActive(boolean enable) { allActive.enable(enable); } public boolean isGlobalActiveEnabled() {
public void updateActivity() { // All these changes have to do with tracking activity in the ranges. if (trackActivity) { // total of this monitors active thisActiveTotal += activityStats.thisActive.getCount(); // total of primary actives primaryActiveTotal += activityStats.primaryActive.getCount(); // total of all monitors actives allActiveTotal += activityStats.allActive.getCount(); } }
public Monitor start() { if (monData.enabled) { synchronized (monData) { monData.activityStats.allActive.increment(); if (monData.isPrimary) { monData.activityStats.primaryActive.increment(); } // tracking current active/avg active/max active for this // instance double active = monData.activityStats.thisActive .incrementAndReturn(); monData.totalActive += active;// allows us to track the // average active for THIS // instance. if (active >= monData.maxActive) { monData.maxActive = active; if (monData.listeners.listenerArray[Listeners.MAXACTIVE_LISTENER_INDEX].listener!=null && active>1) monData.listeners.listenerArray[Listeners.MAXACTIVE_LISTENER_INDEX].listener.processEvent(this); } // The only way activity tracking need be done is if start has // been entered. if (!monData.startHasBeenCalled) { monData.startHasBeenCalled = true; if (monData.range != null) monData.range.setActivityTracking(true); } } // end synchronized } // end enabled return this; }
public void setActive(double value) { if (monData.enabled) { synchronized (monData) { monData.activityStats.thisActive.setCount(value); } } }
public boolean isGlobalActiveEnabled() { return allActive.isEnabled(); }
/** done wheter activity tracking is on or off */ public double incrementThisActive() { return activityStats.thisActive.incrementAndReturn(); }
public double getActive() { if (monData.enabled) { synchronized (monData) { return monData.activityStats.thisActive.getCount(); } } else return 0; }
public void setThisActiveCount(double value) { activityStats.thisActive.setCount(value); }
public boolean isGlobalActiveEnabled() { return allActive.isEnabled(); }
/** The number of all active monitors running */ public double getGlobalActive() { return allActive.getCount(); }
public void reset() { hits = total = sumOfSquares = lastValue = 0.0; firstAccess = lastAccess = 0; min = MIN_DOUBLE; max = MAX_DOUBLE; // added from mon class maxActive = totalActive = 0.0; activityStats.thisActive.setCount(0); // added from frequencydistbase allActiveTotal = primaryActiveTotal = thisActiveTotal = 0; if (range != null) range.reset(); }
public void enableGlobalActive(boolean enable) { allActive.enable(enable); } public boolean isGlobalActiveEnabled() {
/** The number of all active monitors running */ public double getGlobalActive() { return allActive.getCount(); }
private MonitorImp createMon(MonKey key, boolean isPrimary, boolean isTimeMonitor) { ActivityStats activityStats=new ActivityStats(new Counter(), primaryActive, allActive); // get default range for this type and assign it to the monitor RangeImp range=rangeFactory.getRangeDefault(key.getRangeKey(), activityStats); MonitorImp mon=new MonitorImp(key, range, activityStats, isTimeMonitor); mon.setPrimary(isPrimary); return mon; }
/** This is called from monmanage.jsp and resets the monitor to defaults */ public void reset() { // note you don't change enabled status although you can still reset. // don't change isPrimary hits = total = sumOfSquares = lastValue = 0.0; firstAccess = lastAccess = 0; min = MIN_DOUBLE; max = MAX_DOUBLE; startHasBeenCalled = false; trackActivity = false; listeners=null; // added from mon class maxActive = totalActive = 0.0; activityStats.thisActive.setCount(0); // added from frequencydistbase allActiveTotal = primaryActiveTotal = thisActiveTotal = 0; if (range != null) { range.reset(); } }