public class ThresholdRepository<S extends IStats> extends TieableRepository<Threshold,S>
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
removes all
Threshold MBeans from platform MBeanServer. |
protected Threshold |
create(TieableDefinition def)
Creates a new threshold.
|
Threshold |
createCustomThreshold(java.lang.String name,
CustomThresholdProvider provider,
OnDemandStatsProducer<S> producer) |
Threshold |
createThreshold(ThresholdDefinition definition)
Creates a
Threshold related to given ThresholdDefinition and registers it as
MBean. |
ExtendedThresholdStatus |
getExtendedWorstStatus(java.util.List<java.lang.String> includedNames) |
ExtendedThresholdStatus |
getExtendedWorstStatusWithout(java.util.List<java.lang.String> excludedNames) |
static ThresholdRepository<? extends IStats> |
getInstance()
Returns the singleton instance of the registry.
|
java.util.List<Threshold> |
getThresholds()
Returns active thresholds.
|
ThresholdStatus |
getWorstStatus()
Returns the worst threshold status in the system.
|
ThresholdStatus |
getWorstStatus(java.util.List<java.lang.String> names)
Returns the worst threshold status in the system for given threshold names.
|
ThresholdStatus |
getWorstStatus(java.lang.String[] names)
Returns the worst threshold status in the system for given threshold names.
|
ThresholdStatus |
getWorstStatusWithout(java.util.List<java.lang.String> names)
Returns the worst threshold status in the system for all thresholds except given threshold names.
|
static void |
resetForUnitTests()
This method is for unit testing ONLY.
|
protected boolean |
tie(Threshold threshold,
IStatsProducer<? extends IStats> producer) |
addTieable, addToAutoTie, addUntied, attachToListener, createTieable, detachFromListener, getById, getByName, getIdsByProducerId, getRegistry, getTieables, notifyProducerRegistered, notifyProducerUnregistered, removeById, removeTieable, removeTieable, updatepublic static ThresholdRepository<? extends IStats> getInstance()
protected boolean tie(Threshold threshold, IStatsProducer<? extends IStats> producer)
tie in class TieableRepository<Threshold,S extends IStats>public void cleanup()
Threshold MBeans from platform MBeanServer.cleanup in class TieableRepository<Threshold,S extends IStats>public Threshold createThreshold(ThresholdDefinition definition)
Threshold related to given ThresholdDefinition and registers it as
MBean. If there is already such a Bean defined, this method will remove the old MBean and
registers the new Threshold instead.definition - the ThresholdDefinitionThresholdpublic Threshold createCustomThreshold(java.lang.String name, CustomThresholdProvider provider, OnDemandStatsProducer<S> producer)
public ExtendedThresholdStatus getExtendedWorstStatus(java.util.List<java.lang.String> includedNames)
public ExtendedThresholdStatus getExtendedWorstStatusWithout(java.util.List<java.lang.String> excludedNames)
public ThresholdStatus getWorstStatus()
public ThresholdStatus getWorstStatus(java.lang.String[] names)
public ThresholdStatus getWorstStatus(java.util.List<java.lang.String> names)
public ThresholdStatus getWorstStatusWithout(java.util.List<java.lang.String> names)
public java.util.List<Threshold> getThresholds()
protected Threshold create(TieableDefinition def)
create in class TieableRepository<Threshold,S extends IStats>public static void resetForUnitTests()
Copyright © 2010-2020 anotheria.net. All Rights Reserved.