Interface MeasurementStorage
-
- All Known Implementing Classes:
RMeasurementStore
public interface MeasurementStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addIdExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)
void
addMetadata(Metadata... metadata)
Adds global metadata that will be appended to eachMeasurement
added viaput(Measurement)
.void
addMetadata(List<Metadata> metadata)
void
addNameExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)
void
addTypeExtractor(Class<? extends Object> elementClass, Function<Object,String> extractionFunction)
void
finish()
void
put(Measurement<?> m)
Stores the given measurement.void
start()
-
-
-
Method Detail
-
addIdExtractor
void addIdExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)
Adds a mapping (by means of aFunction
) fromObject
s of a fixed type toString
s that uniquely identify (id) objects of the specifiedtype
. This allows to extract ids from arbitraryObject
s without dictating an interface.- Parameters:
type
- the type's classextractionFunction
- the function that mapstype
instances to id-Strings.
-
addNameExtractor
void addNameExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)
- Parameters:
type
- the type's classextractionFunction
- the function that mapstype
instances to name-Strings.- See Also:
addIdExtractor(Class, Function)
-
addTypeExtractor
void addTypeExtractor(Class<? extends Object> elementClass, Function<Object,String> extractionFunction)
- Parameters:
type
- the type's classextractionFunction
- the function that mapstype
instances to type-Strings.- See Also:
addIdExtractor(Class, Function)
-
put
void put(Measurement<?> m)
Stores the given measurement.- Type Parameters:
E
- the measuring point's type (i.e. the type of the probed element)- Parameters:
m
- the measurement to be added
-
addMetadata
void addMetadata(Metadata... metadata)
Adds global metadata that will be appended to eachMeasurement
added viaput(Measurement)
.- Parameters:
metadata
- the global metadata to be appended
-
addMetadata
void addMetadata(List<Metadata> metadata)
- See Also:
addMetadata(Metadata...)
-
start
void start() throws MeasurementStorageStartException
- Throws:
MeasurementStorageStartException
-
finish
void finish()
-
-