Commit | Line | Data |
---|---|---|
6e512b93 ASL |
1 | package org.eclipse.linuxtools.lttng.ui.model.trange; |
2 | ||
3 | import org.eclipse.linuxtools.tmf.ui.viewers.timeAnalysis.model.ITmfTimeAnalysisEntry; | |
4 | ||
5 | public interface ItemContainer<T extends ITmfTimeAnalysisEntry> { | |
6 | ||
7 | /** | |
8 | * Interface to add resources. | |
9 | * | |
10 | * @param process | |
11 | */ | |
12 | public abstract void addItem(T newItem); | |
13 | ||
14 | // ======================================================================== | |
15 | // Methods | |
16 | // ======================================================================== | |
17 | /** | |
18 | * Request a unique ID | |
19 | * | |
20 | * @return Integer | |
21 | */ | |
22 | public abstract Integer getUniqueId(); | |
23 | ||
24 | /** | |
25 | * This method is intended for read only purposes in order to keep the | |
26 | * internal data structure in Synch | |
27 | * | |
28 | * @return | |
29 | */ | |
30 | public abstract T[] readItems(); | |
31 | ||
32 | /** | |
33 | * Clear the children information for resources related to a specific trace | |
34 | * e.g. just before refreshing data with a new time range | |
35 | * | |
36 | * @param traceId | |
37 | */ | |
38 | public abstract void clearChildren(); | |
39 | ||
40 | /** | |
41 | * Clear all resources items e.g. when a new experiment is selected | |
42 | */ | |
43 | public abstract void clearItems(); | |
44 | ||
45 | /** | |
46 | * Remove the resources related to a specific trace e.g. during trace | |
47 | * removal | |
48 | * | |
49 | * @param traceId | |
50 | */ | |
51 | public abstract void removeItems(String traceId); | |
52 | ||
53 | } |