@Override public final boolean disableMonitoring() { return this.stateController.disableMonitoring(); }
@Override public final boolean enableMonitoring() { return this.stateController.enableMonitoring(); }
@Override public final int getExperimentId() { return this.stateController.getExperimentId(); }
@Override public final String toString() { final StringBuilder sb = new StringBuilder(128); sb.append("Status: '"); if (this.isMonitoringTerminated()) { sb.append("terminated"); } else if (this.isMonitoringEnabled()) { sb.append("enabled"); } else { sb.append("disabled"); } sb.append("'\n\tName: '"); sb.append(this.name); sb.append("'; Hostname: '"); sb.append(this.hostname); sb.append("'; experimentID: '"); sb.append(this.getExperimentId()); sb.append("'\n"); return sb.toString(); }
private MonitoringController(final Configuration configuration) { super(configuration); this.stateController = new StateController(configuration); this.samplingController = new SamplingController(configuration); this.jmxController = new JMXController(configuration); this.writerController = new WriterController(configuration); this.stateController.setStateListener(this); this.timeSourceController = new TimeSourceController(configuration); this.probeController = new ProbeController(configuration); this.autoSetLoggingTimestamp = configuration.getBooleanProperty(ConfigurationFactory.AUTO_SET_LOGGINGTSTAMP); }
@Override public final boolean isMonitoringTerminated() { return this.stateController.isMonitoringTerminated(); }
@Override public final String getName() { return this.stateController.getName(); }
@Override public final int incExperimentId() { return this.stateController.incExperimentId(); }
@Override public final boolean isMonitoringEnabled() { return this.stateController.isMonitoringEnabled(); }
@Override public final String getHostname() { return this.stateController.getHostname(); }
@Override public final boolean isDebug() { return this.stateController.isDebug(); }
@Override public final String toString() { final StringBuilder sb = new StringBuilder(128); sb.append("Status: '"); if (this.isMonitoringTerminated()) { sb.append("terminated"); } else if (this.isMonitoringEnabled()) { sb.append("enabled"); } else { sb.append("disabled"); } sb.append("'\n\tName: '") .append(this.name) .append("'; Hostname: '") .append(this.hostname) .append("'; experimentID: '") .append(this.getExperimentId()) .append("'\n"); return sb.toString(); }
private MonitoringController(final Configuration configuration) { super(configuration); this.stateController = new StateController(configuration); this.samplingController = new SamplingController(configuration); this.jmxController = new JMXController(configuration); this.tcpController = new TCPController(configuration, this); this.writerController = new WriterController(configuration); this.stateController.setStateListener(this); this.timeSourceController = new TimeSourceController(configuration); this.probeController = new ProbeController(configuration); this.autoSetLoggingTimestamp = configuration.getBooleanProperty(ConfigurationKeys.AUTO_SET_LOGGINGTSTAMP); }
@Override public final boolean isMonitoringTerminated() { return this.stateController.isMonitoringTerminated(); }
@Override public final String getName() { return this.stateController.getName(); }
@Override public final int incExperimentId() { return this.stateController.incExperimentId(); }
@Override public final boolean isMonitoringEnabled() { return this.stateController.isMonitoringEnabled(); }
@Override public final String getHostname() { return this.stateController.getHostname(); }
@Override public final boolean isDebug() { return this.stateController.isDebug(); }
/** * {@inheritDoc} */ @Override public final boolean enableMonitoring() { if (this.isMonitoringTerminated()) { LOGGER.error("Refused to enable monitoring because monitoring has been permanently terminated"); return false; } LOGGER.info("Enabling monitoring"); if (this.stateListener != null) { this.stateListener.beforeEnableMonitoring(); } this.monitoringEnabled = true; return true; }