Interface MeasurementStorage
-
- All Known Implementing Classes:
RMeasurementStore
public interface MeasurementStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddIdExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)voidaddMetadata(Metadata... metadata)Adds global metadata that will be appended to eachMeasurementadded viaput(Measurement).voidaddMetadata(List<Metadata> metadata)voidaddNameExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)voidaddTypeExtractor(Class<? extends Object> elementClass, Function<Object,String> extractionFunction)voidfinish()voidput(Measurement<?> m)Stores the given measurement.voidstart()
-
-
-
Method Detail
-
addIdExtractor
void addIdExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)
Adds a mapping (by means of aFunction) fromObjects of a fixed type toStrings that uniquely identify (id) objects of the specifiedtype. This allows to extract ids from arbitraryObjects without dictating an interface.- Parameters:
type- the type's classextractionFunction- the function that mapstypeinstances to id-Strings.
-
addNameExtractor
void addNameExtractor(Class<? extends Object> type, Function<Object,String> extractionFunction)
- Parameters:
type- the type's classextractionFunction- the function that mapstypeinstances 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 mapstypeinstances 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 eachMeasurementadded 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()
-
-