public interface AScalarMeasurer extends AShutdownable
So first, prepareMeasurements() is called, allowing a measurer to store some data as a memento (e.g.
the first number of jiffies together with the first timestamp).
Then the caller waits some time, typically between a tenth of a second and a second, but potentially longer, to give measurers a solid time base to average data over.
Finally, contributeMeasurements() is called, passing in the mementos of the preparation phase. This
is when the actual data is collected. Non-averaging measurers can (and probably should) ignore
prepareMeasurements() and the entire memento mechanism.
| Modifier and Type | Interface and Description |
|---|---|
static class |
AScalarMeasurer.EvaluatedValue |
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_CONFIGURATION_ACTIVE |
static String |
KEY_CONFIGURATION_HIGH |
static String |
KEY_CONFIGURATION_MEDIUM |
| Modifier and Type | Method and Description |
|---|---|
void |
contributeMeasurements(Map<String,AScalarDataPoint> data,
long timestamp,
Map<String,Object> mementos) |
default List<String> |
getConfigurationParameters() |
default String |
getDescriptionOfMeasurement(String measurement) |
default String |
getGroupnameOfMeasurement(String measurement) |
com.ajjpj.afoundation.collection.immutable.AOption<Long> |
getTimeoutInMilliSeconds() |
default boolean |
isResponsibleForMeasurement(String key) |
void |
prepareMeasurements(Map<String,Object> mementos) |
shutdownstatic final String KEY_CONFIGURATION_ACTIVE
static final String KEY_CONFIGURATION_MEDIUM
static final String KEY_CONFIGURATION_HIGH
void prepareMeasurements(Map<String,Object> mementos) throws Exception
Exceptionvoid contributeMeasurements(Map<String,AScalarDataPoint> data, long timestamp, Map<String,Object> mementos) throws Exception
Exceptioncom.ajjpj.afoundation.collection.immutable.AOption<Long> getTimeoutInMilliSeconds()
default boolean isResponsibleForMeasurement(String key)
Copyright © 2017. All rights reserved.