Class MutableAnnotation
java.lang.Object
io.nosqlbench.nb.api.annotations.MutableAnnotation
- All Implemented Interfaces:
Annotation,NBLabeledElement
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
NBLabeledElement.BasicLabeledElement -
Field Summary
FieldsFields inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionMutableAnnotation(TimeZone timezone, String session, Layer layer, long start, long end, NBLabeledElement element, LinkedHashMap<String, String> details) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyLabelFunction(Function<NBLabels, NBLabels> labelfunc) asJson()The details are an ordered map of all the content that you would want the user to see.longIf this is the same asAnnotation.getStartMillis(), then the annotation is for an instant in time.The labels which identify what this annotation pertains to.getLayer()Annotations must be associated with a processing layer in NoSQLBench.longIf this is the same asAnnotation.getEndMillis(), then the annotation is for an instant in time.This should returnTemporal.intervalif the span of time is not an instant, andTemporal.instant, otherwise.voidsetDetails(Map<String, String> details) voidsetEndMillis(long intervalEnd) voidvoidsetSession(String sessionName) voidsetStartMillis(long intervalStart) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.nosqlbench.nb.api.annotations.Annotation
getDurationMillisMethods inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
description
-
Field Details
-
session
-
-
Constructor Details
-
MutableAnnotation
public MutableAnnotation(TimeZone timezone, String session, Layer layer, long start, long end, NBLabeledElement element, LinkedHashMap<String, String> details)
-
-
Method Details
-
setSession
-
setStartMillis
public void setStartMillis(long intervalStart) -
setEndMillis
public void setEndMillis(long intervalEnd) -
setLayer
-
setDetails
-
getStartMillis
public long getStartMillis()Description copied from interface:AnnotationIf this is the same asAnnotation.getEndMillis(), then the annotation is for an instant in time.- Specified by:
getStartMillisin interfaceAnnotation- Returns:
- The beginning of the interval of time that the annotation describes
-
getEndMillis
public long getEndMillis()Description copied from interface:AnnotationIf this is the same asAnnotation.getStartMillis(), then the annotation is for an instant in time.- Specified by:
getEndMillisin interfaceAnnotation- Returns:
- The end of the interval of time that the annotation describes
-
getLayer
Description copied from interface:AnnotationAnnotations must be associated with a processing layer in NoSQLBench. For more details on layers, seeLayer- Specified by:
getLayerin interfaceAnnotation- Returns:
- the
Layerto which the annotations applies
-
getLabels
Description copied from interface:AnnotationThe labels which identify what this annotation pertains to. The following labels should be provided for every annotation, when available:- appname: "nosqlbench"
- alias: The name of the activity alias, if available
- workload: The name of the workload file, if named scenarios are used
- scenario: The name of the named scenario, if named scenarios are used
- step: The name of the named scenario step, if named scenario are used
- usermode: "named_scenario" or "adhoc_activity"
- Specified by:
getLabelsin interfaceAnnotation- Specified by:
getLabelsin interfaceNBLabeledElement- Returns:
- The labels map
-
applyLabelFunction
- Specified by:
applyLabelFunctionin interfaceAnnotation
-
getDetails
Description copied from interface:AnnotationThe details are an ordered map of all the content that you would want the user to see.- Specified by:
getDetailsin interfaceAnnotation- Returns:
- The details map
-
toString
-
asReadOnly
-
getTemporal
Description copied from interface:AnnotationThis should returnTemporal.intervalif the span of time is not an instant, andTemporal.instant, otherwise.- Specified by:
getTemporalin interfaceAnnotation
-
asJson
- Specified by:
asJsonin interfaceAnnotation
-