mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
code cleanups for annotations
This commit is contained in:
parent
ec7482324f
commit
3a5e8f081a
@ -56,7 +56,7 @@ public interface Annotation extends NBLabeledElement {
|
|||||||
* Annotations must be associated with a processing layer in NoSQLBench.
|
* Annotations must be associated with a processing layer in NoSQLBench.
|
||||||
* For more details on layers, see {@link Layer}
|
* For more details on layers, see {@link Layer}
|
||||||
*
|
*
|
||||||
* @return
|
* @return the {@link Layer} to which the annotations applies
|
||||||
*/
|
*/
|
||||||
Layer getLayer();
|
Layer getLayer();
|
||||||
|
|
||||||
|
@ -23,12 +23,14 @@ package io.nosqlbench.nb.api.annotations;
|
|||||||
public interface Annotator {
|
public interface Annotator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Submit an annotation to some type of annotation store, logging or eventing mechanism.
|
* <P>Submit an annotation to some type of annotation store, logging or eventing mechanism.
|
||||||
* Implementations of this service are responsible for mapping the scenario and labels
|
* Implementations of this service are responsible for mapping the scenario and labels
|
||||||
* into appropriate key data, and the details in to a native payload. The least surprising
|
* into appropriate key data, and the details in to a native payload. The least surprising
|
||||||
* and most obvious mapping should be used in each case.
|
* and most obvious mapping should be used in each case.
|
||||||
|
*</P>
|
||||||
*
|
*
|
||||||
* For details on constructing a useful annotation to submit to this service, see {@link Annotation#newBuilder()}
|
* <P>For details on constructing a useful annotation to submit to this service, see {@link Annotation#newBuilder()}
|
||||||
|
* </P>
|
||||||
*/
|
*/
|
||||||
void recordAnnotation(Annotation annotation);
|
void recordAnnotation(Annotation annotation);
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ import java.util.function.Function;
|
|||||||
public class MutableAnnotation implements Annotation {
|
public class MutableAnnotation implements Annotation {
|
||||||
|
|
||||||
private final static Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
|
private final static Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
|
||||||
private String session = "SESSION_UNNAMED";
|
public static String session = "SESSION_UNNAMED";
|
||||||
private final ZoneId GMT = ZoneId.of("GMT");
|
private final ZoneId GMT = ZoneId.of("GMT");
|
||||||
|
|
||||||
private final LinkedList<Function<NBLabels,NBLabels>> labelfuncs = new LinkedList<>();
|
private final LinkedList<Function<NBLabels,NBLabels>> labelfuncs = new LinkedList<>();
|
||||||
@ -79,7 +79,7 @@ public class MutableAnnotation implements Annotation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setSession(String sessionName) {
|
public void setSession(String sessionName) {
|
||||||
this.session = sessionName;
|
session = sessionName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStartMillis(long intervalStart) {
|
public void setStartMillis(long intervalStart) {
|
||||||
|
Loading…
Reference in New Issue
Block a user