Re-structure LTTng sub-project as per the Linux Tools guidelines
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.core / src / org / eclipse / linuxtools / lttng / core / state / trace / IStateTraceManager.java
1 package org.eclipse.linuxtools.lttng.core.state.trace;
2
3 import org.eclipse.linuxtools.lttng.core.event.LttngSyntheticEvent;
4 import org.eclipse.linuxtools.lttng.core.state.model.LttngTraceState;
5 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
6 import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
7 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
8 import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpoint;
9
10 public interface IStateTraceManager {
11 // /**
12 // * TODO: Not ready for threading
13 // * <p>
14 // * Read events within specific time window, e.g. time range selection
15 // * </p>
16 // *
17 // * @param trange
18 // * @param source
19 // * @param listener
20 // * @param processor
21 // * @return
22 // */
23 // public abstract ILttngSyntEventRequest executeDataRequest(
24 // TmfTimeRange trange, Object source,
25 // IRequestStatusListener listener, ITransEventProcessor processor);
26
27 /**
28 * used to obtain details on the log associated with this manager e.g.
29 * logid.
30 *
31 * @return
32 */
33 public abstract ITmfTrace<?> getTrace();
34
35 /**
36 * Restore to the closest checkpoint from TmfTimestamp
37 * <p>
38 * Note : it is heavier to restore by timestamp than by event position,
39 * restore by event position whichever possible.
40 *
41 * @param eventTime
42 * The timestamp of the event to restore to
43 *
44 * @return TmfCheckpoint indicates the nearest checkpoint used to restore the
45 * state, null sent if input is invalid
46 */
47 public abstract TmfCheckpoint restoreCheckPointByTimestamp(
48 TmfTimestamp eventTime);
49
50 /**
51 * Restore to the closest checkpoint from index
52 *
53 * @param eventIndex
54 * The index of the event to restore to
55 *
56 * @return TmfCheckpoint indicates the nearest checkpoint used to restore the
57 * state, null sent if input is invalid
58 */
59 public abstract TmfCheckpoint restoreCheckPointByIndex(long eventIndex);
60
61 /**
62 * @return
63 */
64 public abstract TmfTimeRange getExperimentTimeWindow();
65
66 /**
67 * Returns the State model used to build the check points for the state
68 * system
69 *
70 * @return
71 */
72 public abstract LttngTraceState getCheckPointStateModel();
73
74 /**
75 * Returns the State model instance associated with this Trace i.e. not the
76 * checkpoint build state model
77 * Returns the State model instance associated with this Trace
78 *
79 * @return
80 */
81 public abstract LttngTraceState getStateModel();
82
83
84 /**
85 * Reset previously stored check points, and initialize the associated state
86 * model
87 */
88 public void clearCheckPoints();
89
90 /**
91 * handles incoming events used to build the associated check points, The
92 * user must call clearCheckPoints before the processing the first synthetic
93 * event.
94 *
95 * @param synEvent
96 * @param eventCount
97 */
98 public void handleEvent(LttngSyntheticEvent synEvent, Long eventCount);
99 }
This page took 0.040143 seconds and 5 git commands to generate.