@Override public final boolean activateProbe(final String pattern) { return this.probeController.activateProbe(pattern); }
/** * {@inheritDoc} */ @Override public boolean activateProbe(final String pattern) { return this.addPattern(pattern, true); }
@Override public final boolean deactivateProbe(final String pattern) { return this.probeController.deactivateProbe(pattern); }
/** * Sets the list of probe patterns. * * @param strPatternList * The new list with pattern strings. * * @param updateConfig * Whether the pattern file should be updated or not. */ protected void setProbePatternList(final List<String> strPatternList, final boolean updateConfig) { if (!this.enabled) { LOGGER.warn("Adapative Monitoring is disabled!"); return; } synchronized (this) { this.patterns.clear(); this.signatureCache.clear(); for (final String pattern : strPatternList) { this.addToPatternEntryList(pattern); } if (updateConfig && this.configFileUpdate) { this.updatePatternFile(); } } }
monitoringController.terminate(); monitoringController.probeController.setMonitoringController(monitoringController); if (monitoringController.probeController.isTerminated()) { monitoringController.terminate();
@Override public List<String> getProbePatternList() { return this.probeController.getProbePatternList(); }
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 boolean isProbeActivated(final String signature) { return this.probeController.isProbeActivated(signature); }
/** * {@inheritDoc} */ @Override public boolean isProbeActivated(final String signature) { if (this.enabled) { final Boolean active = this.signatureCache.get(signature); if (null == active) { return this.matchesPattern(signature); } else { return active; } } else { return true; } }
/** * Sets the list of probe patterns. * * @param strPatternList * The new list with pattern strings. * * @param updateConfig * Whether the pattern file should be updated or not. */ protected void setProbePatternList(final List<String> strPatternList, final boolean updateConfig) { if (!this.enabled) { LOG.warn("Adapative Monitoring is disabled!"); return; } synchronized (this) { this.patternList.clear(); this.signatureCache.clear(); for (final String pattern : strPatternList) { this.addToPatternEntryList(pattern); } if (updateConfig && this.configFileUpdate) { this.updatePatternFile(); } } }
monitoringController.terminate(); monitoringController.probeController.setMonitoringController(monitoringController); if (monitoringController.probeController.isTerminated()) { monitoringController.terminate();
@Override public List<String> getProbePatternList() { return this.probeController.getProbePatternList(); }
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 boolean isProbeActivated(final String signature) { return this.probeController.isProbeActivated(signature); }
/** * {@inheritDoc} */ @Override public boolean isProbeActivated(final String signature) { if (this.enabled) { final Boolean active = this.signatureCache.get(signature); if (null == active) { return this.matchesPattern(signature); } else { return active; } } else { return true; } }
/** * {@inheritDoc} */ @Override public boolean deactivateProbe(final String pattern) { return this.addPattern(pattern, false); }
private void updatePatternFile() { // only called within synchronized PrintWriter pw = null; try { pw = new PrintWriter(new BufferedWriter( new OutputStreamWriter(new FileOutputStream(this.configFilePathname, false), ENCODING))); pw.print("## Adaptive Monitoring Config File: "); pw.println(this.configFilePathname); pw.print("## written on: "); final DateFormat date = new SimpleDateFormat("yyyyMMdd'-'HHmmssSSS", Locale.US); date.setTimeZone(TimeZone.getTimeZone("UTC")); pw.println(date.format(new java.util.Date())); pw.println('#'); final List<String> strPatterns = this.getProbePatternList(); for (final String string : strPatterns) { pw.println(string); } } catch (final IOException ex) { LOGGER.error("Updating Adaptive Monitoring config file failed.", ex); } finally { if (pw != null) { pw.close(); } } this.configFileReader.lastModifiedTimestamp = System.currentTimeMillis(); LOGGER.info("Updating Adaptive Monitoring config file succeeded."); }
@Override public final boolean activateProbe(final String pattern) { return this.probeController.activateProbe(pattern); }
@Override public final boolean deactivateProbe(final String pattern) { return this.probeController.deactivateProbe(pattern); }
/** * {@inheritDoc} */ @Override public boolean activateProbe(final String pattern) { return this.addPattern(pattern, true); }