Class MutableAnnotation

java.lang.Object
io.nosqlbench.nb.api.annotations.MutableAnnotation
All Implemented Interfaces:
Annotation, NBLabeledElement

public class MutableAnnotation extends Object implements Annotation
  • Field Details

    • session

      public static String session
  • Constructor Details

  • Method Details

    • setSession

      public void setSession(String sessionName)
    • setStartMillis

      public void setStartMillis(long intervalStart)
    • setEndMillis

      public void setEndMillis(long intervalEnd)
    • setLayer

      public void setLayer(Layer layer)
    • setDetails

      public void setDetails(Map<String,String> details)
    • getStartMillis

      public long getStartMillis()
      Description copied from interface: Annotation
      If this is the same as Annotation.getEndMillis(), then the annotation is for an instant in time.
      Specified by:
      getStartMillis in interface Annotation
      Returns:
      The beginning of the interval of time that the annotation describes
    • getEndMillis

      public long getEndMillis()
      Description copied from interface: Annotation
      If this is the same as Annotation.getStartMillis(), then the annotation is for an instant in time.
      Specified by:
      getEndMillis in interface Annotation
      Returns:
      The end of the interval of time that the annotation describes
    • getLayer

      public Layer getLayer()
      Description copied from interface: Annotation
      Annotations must be associated with a processing layer in NoSQLBench. For more details on layers, see Layer
      Specified by:
      getLayer in interface Annotation
      Returns:
      the Layer to which the annotations applies
    • getLabels

      public NBLabels getLabels()
      Description copied from interface: Annotation
      The 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:
      getLabels in interface Annotation
      Specified by:
      getLabels in interface NBLabeledElement
      Returns:
      The labels map
    • applyLabelFunction

      public void applyLabelFunction(Function<NBLabels,NBLabels> labelfunc)
      Specified by:
      applyLabelFunction in interface Annotation
    • getDetails

      public Map<String,String> getDetails()
      Description copied from interface: Annotation
      The details are an ordered map of all the content that you would want the user to see.
      Specified by:
      getDetails in interface Annotation
      Returns:
      The details map
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • asReadOnly

      public Annotation asReadOnly()
    • getTemporal

      public Temporal getTemporal()
      Description copied from interface: Annotation
      This should return Temporal.interval if the span of time is not an instant, and Temporal.instant, otherwise.
      Specified by:
      getTemporal in interface Annotation
    • asJson

      public String asJson()
      Specified by:
      asJson in interface Annotation