@Test public void testGetMultilineSuppressedResults() { initializeTriggers(); triggers.suppressTriggersBySignature("HIGH : @CubeThread Eventloop : fatalErrors"); triggers.suppressTriggersBySignature("HIGH : @Named(\"CubeFetchScheduler\") EventloopTaskScheduler : delay"); triggers.suppressTriggersBySignature("HIGH : @Named(\"CubeFetchScheduler\") EventloopTaskScheduler : error"); assertEquals("HIGH : @CubeThread Eventloop : fatalErrors\n" + "HIGH : @Named(\"CubeFetchScheduler\") EventloopTaskScheduler : delay\n" + "HIGH : @Named(\"CubeFetchScheduler\") EventloopTaskScheduler : error", triggers.getMultilineSuppressedResults()); String resultsAfterSuppression = triggers.getMultilineResults(); Arrays.stream(triggers.getMultilineSuppressedResults().split("\n")) .forEach(suppressed -> assertFalse(resultsAfterSuppression.contains(suppressed))); }
@JmxAttribute synchronized public String getMultilineSuppressedResults() { return formatListAsMultilineString(new ArrayList<>(suppressedResults.keySet())); }
Triggers implements ConcurrentJmxBean, Initializable<Triggers> { @JmxAttribute synchronized public String getMultilineSuppressedResults() { return formatListAsMultilineString(new ArrayList<>(suppressedResults.keySet())); } }
Triggers implements ConcurrentJmxBean, Initializable<Triggers> { @JmxAttribute synchronized public String getMultilineSuppressedResults() { return formatListAsMultilineString(new ArrayList<>(suppressedResults.keySet())); } private  Triggers(); }
Triggers implements ConcurrentJmxBean, Initializable<Triggers> { @JmxAttribute synchronized public String getMultilineSuppressedResults() { return formatListAsMultilineString(new ArrayList<>(suppressedResults.keySet())); } private  Triggers(); static Triggers create(); Triggers withTrigger(Trigger trigger); Triggers withTrigger(Severity severity, String component, String name, Supplier<TriggerResult> triggerFunction); synchronized void addTrigger(Trigger trigger); synchronized void addTrigger(Severity severity, String component, String name, Supplier<TriggerResult> triggerFunction); @JmxAttribute synchronized List<TriggerWithResult> getResultsDebug(); @JmxAttribute synchronized List<TriggerWithResult> getResultsInformation(); @JmxAttribute synchronized List<TriggerWithResult> getResultsWarning(); @JmxAttribute synchronized List<TriggerWithResult> getResultsAverage(); @JmxAttribute synchronized List<TriggerWithResult> getResultsHigh(); @JmxAttribute synchronized List<TriggerWithResult> getResultsDisaster(); @JmxAttribute synchronized List<TriggerWithResult> getResults(); @JmxAttribute synchronized String getMultilineSuppressedResults(); @JmxAttribute String getMultilineResultsDebug(); @JmxAttribute String getMultilineResultsInformation(); @JmxAttribute String getMultilineResultsWarning(); @JmxAttribute String getMultilineResultsAverage(); @JmxAttribute String getMultilineResultsHigh(); @JmxAttribute String getMultilineResultsDisaster(); @JmxAttribute String getMultilineResults(); @JmxAttribute @Nullable synchronized Severity getMaxSeverity(); @JmxAttribute @Nullable synchronized String getMaxSeverityResult(); @JmxAttribute synchronized List<String> getTriggers(); @JmxAttribute synchronized List<String> getTriggerNames(); @JmxAttribute synchronized String getTriggerComponents(); @JmxOperation synchronized void suppressAllTriggers(); @JmxOperation synchronized void suppressTriggerByName(String name); @JmxOperation synchronized void suppressTriggerByComponent(String component); @JmxOperation synchronized void suppressTriggerBySeverity(String severity); @JmxOperation synchronized void suppressTriggersBySignature(String signature); @Override String toString(); }
Triggers implements ConcurrentJmxBean, Initializable<Triggers> { @JmxAttribute synchronized public String getMultilineSuppressedResults() { return formatListAsMultilineString(new ArrayList<>(suppressedResults.keySet())); } private  Triggers(); static Triggers create(); Triggers withTrigger(Trigger trigger); Triggers withTrigger(Severity severity, String component, String name, Supplier<TriggerResult> triggerFunction); synchronized void addTrigger(Trigger trigger); synchronized void addTrigger(Severity severity, String component, String name, Supplier<TriggerResult> triggerFunction); @JmxAttribute synchronized List<TriggerWithResult> getResultsDebug(); @JmxAttribute synchronized List<TriggerWithResult> getResultsInformation(); @JmxAttribute synchronized List<TriggerWithResult> getResultsWarning(); @JmxAttribute synchronized List<TriggerWithResult> getResultsAverage(); @JmxAttribute synchronized List<TriggerWithResult> getResultsHigh(); @JmxAttribute synchronized List<TriggerWithResult> getResultsDisaster(); @JmxAttribute synchronized List<TriggerWithResult> getResults(); @JmxAttribute synchronized String getMultilineSuppressedResults(); @JmxAttribute String getMultilineResultsDebug(); @JmxAttribute String getMultilineResultsInformation(); @JmxAttribute String getMultilineResultsWarning(); @JmxAttribute String getMultilineResultsAverage(); @JmxAttribute String getMultilineResultsHigh(); @JmxAttribute String getMultilineResultsDisaster(); @JmxAttribute String getMultilineResults(); @JmxAttribute @Nullable synchronized Severity getMaxSeverity(); @JmxAttribute @Nullable synchronized String getMaxSeverityResult(); @JmxAttribute synchronized List<String> getTriggers(); @JmxAttribute synchronized List<String> getTriggerNames(); @JmxAttribute synchronized String getTriggerComponents(); @JmxOperation synchronized void suppressAllTriggers(); @JmxOperation synchronized void suppressTriggerByName(String name); @JmxOperation synchronized void suppressTriggerByComponent(String component); @JmxOperation synchronized void suppressTriggerBySeverity(String severity); @JmxOperation synchronized void suppressTriggersBySignature(String signature); @Override String toString(); static final Duration CACHE_TIMEOUT; }