@StableMinor(version="12.5", sinceVersion="9.0") public interface IMonitorContext
The data is stored in the form of value providers
,
which are responsible for providing monitor data when required.
IMonitorManager
,
IMonitorValuesProvider
Modifier and Type | Method and Description |
---|---|
void |
addValues(IMonitorValuesProvider... fieldValues)
Stores a monitoring value in this monitor context.
|
default IMonitorValuesProvider |
addValues(Map<String,List<? extends Serializable>> fieldValues)
Stores a monitoring value in this monitor context.
|
default IMonitorValuesProvider |
addValues(String fieldId,
List<? extends Serializable> values)
Stores a monitoring value in this monitor context.
|
default IMonitorValuesProvider |
addValues(String fieldId,
Serializable... values)
Stores a monitoring value in this monitor context.
|
void |
clear()
Clears all data stored in the current monitor context.
|
List<IMonitorValuesProvider> |
getMonitoringValuesProviders()
Returns a view of aggregation values stored in this monitor
context.
|
boolean |
isEmpty()
Indicates whether this monitor context is empty.
|
boolean |
isEnabled()
Returns whether the current monitor context is enabled.
|
void |
removeValues(IMonitorValuesProvider provider)
Removes an aggregation value from the current monitor context.
|
List<IMonitorValuesProvider> getMonitoringValuesProviders()
There is no guarantee whether the returned list will or will not reflect further changes made in this monitor context.
default IMonitorValuesProvider addValues(String fieldId, Serializable... values)
removeValues(IMonitorValuesProvider)
should be called (use a
try/finally block to ensure that) to remove the aggregation value set
when it should no longer be applied.
Typical use for setting an aggregation value follows below:
final String monitoringFieldId = ...; final Serializable value = ...; IMonitorValuesProvider provider = monitorContext.addValues(monitoringFieldId, value); try { // execution block that will have the set aggregation value as default } finally { monitorContext.removeValues(provider); }
fieldId
- the field identifier.values
- the values to set for the field.IMonitorValuesProvider
to provide the given values.default IMonitorValuesProvider addValues(String fieldId, List<? extends Serializable> values)
removeValues(IMonitorValuesProvider)
should be called (use a
try/finally block to ensure that) to remove the aggregation value set
when it should no longer be applied.
Typical use for setting an aggregation value follows below:
final String monitoringFieldId = ...; final Serializable value = ...; IMonitorValuesProvider provider = monitorContext.addValues(monitoringFieldId, value); try { // execution block that will have the set aggregation value as default } finally { monitorContext.removeValues(provider); }
fieldId
- the field identifier.values
- the values to set for the field.IMonitorValuesProvider
to provide the given values.default IMonitorValuesProvider addValues(Map<String,List<? extends Serializable>> fieldValues)
removeValues(IMonitorValuesProvider)
should be called (use a
try/finally block to ensure that) to remove the aggregation value set
when it should no longer be applied.
Typical use for setting an aggregation value follows below:
final String monitoringFieldId = ...; final Serializable value = ...; IMonitorValuesProvider provider = monitorContext.addValues(monitoringFieldId, value); try { // execution block that will have the set aggregation value as default } finally { monitorContext.removeValues(provider); }
fieldValues
- the field values to set for the field.IMonitorValuesProvider
to provide the given values.void addValues(IMonitorValuesProvider... fieldValues)
removeValues(IMonitorValuesProvider)
should be called (use a
try/finally block to ensure that) to remove the aggregation value set
when it should no longer be applied.
Typical use for setting an aggregation value follows below:
IMonitorValuesProvider provider = new MyValueProvider(); monitorContext.addValues(provider); try { // execution block that will have the set aggregation value as default } finally { monitorContext.removeValues(provider); }
fieldValues
- the field values providers to set for the field.void removeValues(IMonitorValuesProvider provider)
provider
- the previously added provider.addValues(IMonitorValuesProvider...)
void clear()
boolean isEnabled()
boolean isEmpty()
true
if this monitor context is empty, false
otherwise.LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.