1
package org.eclipse.linuxtools.internal.lttng.core.state.trace;
3
import org.eclipse.linuxtools.internal.lttng.core.event.LttngSyntheticEvent;
4
import org.eclipse.linuxtools.internal.lttng.core.state.model.LttngTraceState;
5
import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
6
import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
7
import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
8
import org.eclipse.linuxtools.tmf.core.trace.TmfCheckpoint;
10
public interface IStateTraceManager {
12
// * TODO: Not ready for threading
14
// * Read events within specific time window, e.g. time range selection
23
// public abstract ILttngSyntEventRequest executeDataRequest(
24
// TmfTimeRange trange, Object source,
25
// IRequestStatusListener listener, ITransEventProcessor processor);
28
* used to obtain details on the log associated with this manager e.g.
33
public abstract ITmfTrace<?> getStateTrace();
36
* Restore to the closest checkpoint from TmfTimestamp
38
* Note : it is heavier to restore by timestamp than by event position,
39
* restore by event position whichever possible.
42
* The timestamp of the event to restore to
44
* @return TmfCheckpoint indicates the nearest checkpoint used to restore the
45
* state, null sent if input is invalid
47
public abstract TmfCheckpoint restoreCheckPointByTimestamp(
48
ITmfTimestamp eventTime);
51
* Restore to the closest checkpoint from index
54
* The index of the event to restore to
56
* @return TmfCheckpoint indicates the nearest checkpoint used to restore the
57
* state, null sent if input is invalid
59
public abstract TmfCheckpoint restoreCheckPointByIndex(long eventIndex);
64
public abstract TmfTimeRange getExperimentTimeWindow();
67
* Returns the State model used to build the check points for the state
72
public abstract LttngTraceState getCheckPointStateModel();
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
81
public abstract LttngTraceState getStateModel();
85
* Reset previously stored check points, and initialize the associated state
88
public void clearCheckPoints();
91
* handles incoming events used to build the associated check points, The
92
* user must call clearCheckPoints before the processing the first synthetic
98
public void handleEvent(LttngSyntheticEvent synEvent, Long eventCount);