public class NoMetricsEngine extends Object implements XMetricsEngine
| Constructor and Description |
|---|
NoMetricsEngine() |
| Modifier and Type | Method and Description |
|---|---|
MetricsStream |
computeStream(String stream,
MetricsStreamNames.MetricsRecordType recordType,
String templateType,
MetricsStreamNames.StreamCreationType creationType,
String entityID,
String projectName,
String projectVersion,
String flowID,
Map<String,String> additionalProps)
Computes metrics collecting stream for the given stream name
|
void |
computeStreams(MetricsReportable reportingEntity)
Computes all the metrics streams of the given metrics reporting entity.
|
void |
decrement(int stream)
Decrements the metrics for the given
MetricsStreamNames.MetricsRecordType.COUNTER type metrics stream,
mainly used by scenarios where a in-flight count is maintained as the metrics value, for example like the active
processing message count |
void |
decrementCounterMap(int stream,
String key)
Decrements the metrics stream for the given key of the
MetricsStreamNames.MetricsRecordType.COUNTER_MAP
type map of metrics streams |
void |
destroy()
Cleans out the resources used by the metrics engine and destroys the engine
|
XMetricsCollector |
getMetricsCollector()
Retrieves the
XMetricsCollector associated with this metrics engine |
void |
increment(int stream)
Increments the metrics for the given
MetricsStreamNames.MetricsRecordType.COUNTER type metrics stream |
void |
incrementCounterMap(int stream,
String key)
Increments the metrics stream for the given key of the
MetricsStreamNames.MetricsRecordType.COUNTER_MAP
type map of metrics streams |
void |
init(org.springframework.context.ApplicationContext context)
Initializes the metrics engine
|
boolean |
isRealMetricsEngine()
Checks whether this metrics engine is a real implementation
|
void |
reportGauge(int stream,
double value)
Reports a value into the given
MetricsStreamNames.MetricsRecordType.AVG_GAUGE or
MetricsStreamNames.MetricsRecordType.SUM_GAUGE type metrics stream |
public void init(org.springframework.context.ApplicationContext context)
init in interface Initializableinit in interface XMetricsEnginecontext - application contextpublic void destroy()
destroy in interface Initializabledestroy in interface XMetricsEnginepublic void reportGauge(int stream,
double value)
MetricsStreamNames.MetricsRecordType.AVG_GAUGE or
MetricsStreamNames.MetricsRecordType.SUM_GAUGE type metrics streamreportGauge in interface XMetricsEnginestream - the stream to which the metrics are reportedvalue - the value to be reportedpublic void increment(int stream)
MetricsStreamNames.MetricsRecordType.COUNTER type metrics streamincrement in interface XMetricsEnginestream - the metrics stream which is being incrementedpublic void decrement(int stream)
MetricsStreamNames.MetricsRecordType.COUNTER type metrics stream,
mainly used by scenarios where a in-flight count is maintained as the metrics value, for example like the active
processing message countdecrement in interface XMetricsEnginestream - the stream being decrementedpublic void incrementCounterMap(int stream,
String key)
MetricsStreamNames.MetricsRecordType.COUNTER_MAP
type map of metrics streamsincrementCounterMap in interface XMetricsEnginestream - the map of metrics streamskey - the key of the metrics stream to be incrementedpublic void decrementCounterMap(int stream,
String key)
MetricsStreamNames.MetricsRecordType.COUNTER_MAP
type map of metrics streamsdecrementCounterMap in interface XMetricsEnginestream - the map of metrics streamskey - the key of the metrics stream to be decrementedpublic MetricsStream computeStream(String stream, MetricsStreamNames.MetricsRecordType recordType, String templateType, MetricsStreamNames.StreamCreationType creationType, String entityID, String projectName, String projectVersion, String flowID, Map<String,String> additionalProps)
computeStream in interface XMetricsEnginestream - the name of the streamrecordType - the record type of the streamtemplateType - type of the metrics template which includes this streamcreationType - the type of the stream creation to indicate whether this is a normal stream or either
global or system oneentityID - the id of the metrics entity which belongs this metrics streamprojectName - the name of the project to which the metrics entity of this metrics stream belongsprojectVersion - the version of the project to which the metrics entity of this metrics stream belongsflowID - the ID of the integration flow to which the metrics entity of this metrics stream belongsadditionalProps - additional properties to be added to metrics recordpublic void computeStreams(MetricsReportable reportingEntity)
XMetricsEnginecomputeStreams in interface XMetricsEnginereportingEntity - an implementation of MetricsReportable to compute the metrics streams forpublic XMetricsCollector getMetricsCollector()
XMetricsCollector associated with this metrics enginegetMetricsCollector in interface XMetricsEngineXMetricsCollector implementation if this is a real metrics engine, null otherwisepublic boolean isRealMetricsEngine()
XMetricsEngineisRealMetricsEngine in interface XMetricsEngineCopyright © 2016–2019 AdroitLogic. All rights reserved.