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.String asJson()  
    Annotation asReadOnly()  
    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.
    long getEnd()
    If this is the same as Annotation.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.
    Layer getLayer()
    Annotations must be associated with a processing layer in NoSQLBench.
    java.lang.String getSession()  
    Span getSpan()
    This should return Span.interval if the span of time is not an instant, and Span.instant, otherwise.
    long getStart()
    If this is the same as Annotation.getEnd(), then the annotation is for an instant in time.
    void setDetails​(java.util.Map<java.lang.String,​java.lang.String> details)  
    void setEnd​(long intervalEnd)  
    void setLabels​(java.util.Map<java.lang.String,​java.lang.String> labels)  
    void setLayer​(Layer layer)  
    void setSession​(java.lang.String sessionName)  
    void setStart​(long intervalStart)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      public void setLayer​(Layer layer)
    • setDetails

      public void setDetails​(java.util.Map<java.lang.String,​java.lang.String> details)
    • getSession

      public java.lang.String getSession()
      Specified by:
      getSession in interface Annotation
      Returns:
      The named session that the annotation is associated with
    • getStart

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

      public long getEnd()
      Description copied from interface: Annotation
      If this is the same as Annotation.getStart(), then the annotation is for an instant in time.
      Specified by:
      getEnd 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:
    • getLabels

      public java.util.Map<java.lang.String,​java.lang.String> 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
      Returns:
      The labels map
    • getDetails

      public java.util.Map<java.lang.String,​java.lang.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 java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • asReadOnly

      public Annotation asReadOnly()
    • getSpan

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

      public java.lang.String asJson()
      Specified by:
      asJson in interface Annotation