Package io.nosqlbench.nb.api.annotations
Class MutableAnnotation
java.lang.Object
io.nosqlbench.nb.api.annotations.MutableAnnotation
- All Implemented Interfaces:
Annotation
public class MutableAnnotation extends java.lang.Object implements Annotation
-
Constructor Summary
Constructors Constructor Description MutableAnnotation(java.util.TimeZone timezone, java.lang.String session, Layer layer, long start, long end, java.util.LinkedHashMap<java.lang.String,java.lang.String> labels, java.util.LinkedHashMap<java.lang.String,java.lang.String> details) -
Method Summary
Modifier and Type Method Description java.lang.StringasJson()AnnotationasReadOnly()java.util.Map<java.lang.String,java.lang.String>getDetails()The details are an ordered map of all the content that you would want the user to see.longgetEnd()If this is the same asAnnotation.getStart(), then the annotation is for an instant in time.java.util.Map<java.lang.String,java.lang.String>getLabels()The labels which identify what this annotation pertains to.LayergetLayer()Annotations must be associated with a processing layer in NoSQLBench.java.lang.StringgetSession()SpangetSpan()This should returnSpan.intervalif the span of time is not an instant, andSpan.instant, otherwise.longgetStart()If this is the same asAnnotation.getEnd(), then the annotation is for an instant in time.voidsetDetails(java.util.Map<java.lang.String,java.lang.String> details)voidsetEnd(long intervalEnd)voidsetLabels(java.util.Map<java.lang.String,java.lang.String> labels)voidsetLayer(Layer layer)voidsetSession(java.lang.String sessionName)voidsetStart(long intervalStart)java.lang.StringtoString()
-
Constructor Details
-
MutableAnnotation
public MutableAnnotation(java.util.TimeZone timezone, java.lang.String session, Layer layer, long start, long end, java.util.LinkedHashMap<java.lang.String,java.lang.String> labels, java.util.LinkedHashMap<java.lang.String,java.lang.String> details)
-
-
Method Details
-
setSession
public void setSession(java.lang.String sessionName) -
setStart
public void setStart(long intervalStart) -
setEnd
public void setEnd(long intervalEnd) -
setLabels
public void setLabels(java.util.Map<java.lang.String,java.lang.String> labels) -
setLayer
-
setDetails
public void setDetails(java.util.Map<java.lang.String,java.lang.String> details) -
getSession
public java.lang.String getSession()- Specified by:
getSessionin interfaceAnnotation- Returns:
- The named session that the annotation is associated with
-
getStart
public long getStart()Description copied from interface:AnnotationIf this is the same asAnnotation.getEnd(), then the annotation is for an instant in time.- Specified by:
getStartin interfaceAnnotation- Returns:
- The beginning of the interval of time that the annotation describes
-
getEnd
public long getEnd()Description copied from interface:AnnotationIf this is the same asAnnotation.getStart(), then the annotation is for an instant in time.- Specified by:
getEndin 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:
-
getLabels
public java.util.Map<java.lang.String,java.lang.String> 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- Returns:
- The labels map
-
getDetails
public java.util.Map<java.lang.String,java.lang.String> 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
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
asReadOnly
-
getSpan
Description copied from interface:AnnotationThis should returnSpan.intervalif the span of time is not an instant, andSpan.instant, otherwise.- Specified by:
getSpanin interfaceAnnotation
-
asJson
public java.lang.String asJson()- Specified by:
asJsonin interfaceAnnotation
-