import org.eclipse.linuxtools.tmf.core.ctfadaptor.CtfTmfEvent;
import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
import org.eclipse.linuxtools.tmf.core.statesystem.AttributeNotFoundException;
-import org.eclipse.linuxtools.tmf.core.statesystem.StateHistorySystem;
-import org.eclipse.linuxtools.tmf.core.statesystem.StateSystem;
import org.eclipse.linuxtools.tmf.core.statesystem.TimeRangeException;
+import org.eclipse.linuxtools.tmf.core.statesystem.helpers.IStateSystemBuilder;
import org.eclipse.linuxtools.tmf.core.statevalue.ITmfStateValue;
import org.eclipse.linuxtools.tmf.core.statevalue.StateValueTypeException;
import org.eclipse.linuxtools.tmf.core.statevalue.TmfStateValue;
class CtfKernelHandler implements Runnable {
private final BlockingQueue<CtfTmfEvent> inQueue;
- private StateSystem ss;
+ private IStateSystemBuilder ss;
private CtfTmfEvent currentEvent;
knownEventNames = fillEventNames();
}
- void assignStateSystem(StateSystem targetSS) {
+ void assignStateSystem(IStateSystemBuilder targetSS) {
this.ss = targetSS;
}
- StateSystem getStateSystem() {
- return ss;
- }
-
@Override
public void run() {
if (ss == null) {
private void closeStateSystem() {
/* Close the History system, if there is one */
- if (ss.getClass() == StateHistorySystem.class) {
- try {
- ((StateHistorySystem) ss).closeHistory(currentEvent.getTimestamp().getValue());
- } catch (TimeRangeException e) {
- /*
- * Since we're using currentEvent.getTimestamp, this shouldn't
- * cause any problem
- */
- e.printStackTrace();
- }
+ try {
+ ss.closeHistory(currentEvent.getTimestamp().getValue());
+ } catch (TimeRangeException e) {
+ /*
+ * Since we're using currentEvent.getTimestamp, this shouldn't
+ * cause any problem
+ */
+ e.printStackTrace();
}
}