Package org.radargun.stages.monitor

Source Code of org.radargun.stages.monitor.JVMMonitorStopStage

package org.radargun.stages.monitor;

import org.radargun.DistStageAck;
import org.radargun.config.Stage;
import org.radargun.stages.AbstractDistStage;
import org.radargun.sysmonitor.Monitors;

/**
*
* Stop collecting JVM statistics on each slave node and return collected statistics to the master node.
*
* @author Alan Field <afield@redhat.com>
*/
@Stage(doc = "Stop collecting JVM statistics on each slave node and return collected statistics to the master node.")
public class JVMMonitorStopStage extends AbstractDistStage {

   @Override
   public DistStageAck executeOnSlave() {
      Monitors monitor = (Monitors) slaveState.get(Monitors.MONITORS);
      if (monitor != null) {
         monitor.stop();
         return successfulResponse();
      } else {
         return errorResponse("No JVMMonitor object found on slave: " + slaveState.getSlaveIndex());
      }
   }
}
TOP

Related Classes of org.radargun.stages.monitor.JVMMonitorStopStage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.