Commit | Line | Data |
---|---|---|
68761620 FG |
1 | /******************************************************************************* |
2 | * Copyright (c) 2015 École Polytechnique de Montréal | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Geneviève Bastien - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.tracecompass.analysis.graph.core.base; | |
14 | ||
c5ff6bf3 GB |
15 | import java.util.Collections; |
16 | import java.util.Map; | |
17 | ||
68761620 FG |
18 | /** |
19 | * Interface that the objects in a graph may implement | |
20 | * | |
21 | * @author Geneviève Bastien | |
22 | */ | |
23 | public interface IGraphWorker { | |
24 | ||
25 | /** | |
26 | * Get the host ID of the trace this worker belongs to | |
27 | * | |
28 | * @return The host ID of the trace this worker belongs to | |
29 | */ | |
30 | String getHostId(); | |
31 | ||
c5ff6bf3 GB |
32 | /** |
33 | * Get additional information on this worker at time t. This would be | |
34 | * textual information, in the form of key, value pairs, that could be | |
35 | * displayed for instance as extra columns for this worker in a graph view. | |
36 | * | |
37 | * @return A key, value map of information this worker provides. | |
38 | * @since 2.0 | |
39 | */ | |
40 | default Map<String, String> getWorkerInformation() { | |
41 | return Collections.EMPTY_MAP; | |
42 | } | |
43 | ||
44 | /** | |
45 | * Get additional information on this worker at time t. This would be | |
46 | * textual information, in the form of key, value pairs, that could be | |
47 | * displayed for instance as a tooltip in the graph view. | |
48 | * | |
49 | * @param t | |
50 | * Time at which to get the information | |
51 | * @return A key, value map of information this worker provides. | |
52 | * @since 2.0 | |
53 | */ | |
54 | default Map<String, String> getWorkerInformation(long t) { | |
55 | return Collections.EMPTY_MAP; | |
56 | } | |
57 | ||
68761620 | 58 | } |