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 Initializable
init
in interface XMetricsEngine
context
- application contextpublic void destroy()
destroy
in interface Initializable
destroy
in interface XMetricsEngine
public void reportGauge(int stream, double value)
MetricsStreamNames.MetricsRecordType.AVG_GAUGE
or
MetricsStreamNames.MetricsRecordType.SUM_GAUGE
type metrics streamreportGauge
in interface XMetricsEngine
stream
- 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 XMetricsEngine
stream
- 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 XMetricsEngine
stream
- the stream being decrementedpublic void incrementCounterMap(int stream, String key)
MetricsStreamNames.MetricsRecordType.COUNTER_MAP
type map of metrics streamsincrementCounterMap
in interface XMetricsEngine
stream
- 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 XMetricsEngine
stream
- 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 XMetricsEngine
stream
- 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)
XMetricsEngine
computeStreams
in interface XMetricsEngine
reportingEntity
- an implementation of MetricsReportable
to compute the metrics streams forpublic XMetricsCollector getMetricsCollector()
XMetricsCollector
associated with this metrics enginegetMetricsCollector
in interface XMetricsEngine
XMetricsCollector
implementation if this is a real metrics engine, null
otherwisepublic boolean isRealMetricsEngine()
XMetricsEngine
isRealMetricsEngine
in interface XMetricsEngine
Copyright © 2016–2019 AdroitLogic. All rights reserved.