analysis.graph: allow workers to return additional information
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Tue, 9 Feb 2016 02:50:13 +0000 (21:50 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 10 Feb 2016 02:20:05 +0000 (21:20 -0500)
This information can be displayed as tooltips or extra columns in the views.

Change-Id: Ib992ffa0d32b89c5811510e5a9a3270a1df1003d
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/66060
Reviewed-by: Hudson CI
analysis/org.eclipse.tracecompass.analysis.graph.core/src/org/eclipse/tracecompass/analysis/graph/core/base/IGraphWorker.java

index 7ec7d4da28cc7cfb99df1569fa63388938b289ab..7d0a85c51a2f267243e148357993500fffe40258 100644 (file)
@@ -12,6 +12,9 @@
 
 package org.eclipse.tracecompass.analysis.graph.core.base;
 
+import java.util.Collections;
+import java.util.Map;
+
 /**
  * Interface that the objects in a graph may implement
  *
@@ -26,4 +29,30 @@ public interface IGraphWorker {
      */
     String getHostId();
 
+    /**
+     * Get additional information on this worker at time t. This would be
+     * textual information, in the form of key, value pairs, that could be
+     * displayed for instance as extra columns for this worker in a graph view.
+     *
+     * @return A key, value map of information this worker provides.
+     * @since 2.0
+     */
+    default Map<String, String> getWorkerInformation() {
+        return Collections.EMPTY_MAP;
+    }
+
+    /**
+     * Get additional information on this worker at time t. This would be
+     * textual information, in the form of key, value pairs, that could be
+     * displayed for instance as a tooltip in the graph view.
+     *
+     * @param t
+     *            Time at which to get the information
+     * @return A key, value map of information this worker provides.
+     * @since 2.0
+     */
+    default Map<String, String> getWorkerInformation(long t) {
+        return Collections.EMPTY_MAP;
+    }
+
 }
This page took 0.032618 seconds and 5 git commands to generate.