Fix for streaming and reconnection. Added standalone releng for lttng.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / parsers / custom / CustomXmlTrace.java
index 9f8f2931a982463e299b9dc22a033e11d99fe645..767ddc0ea6e4e0f21b61736eabc8caf359289fba 100644 (file)
@@ -48,7 +48,8 @@ import org.xml.sax.SAXParseException;
 public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {\r
 \r
     private static final TmfLocation<Long> NULL_LOCATION = new TmfLocation<Long>((Long) null);\r
-    \r
+    private static final int CACHE_SIZE = 100;\r
+\r
     private CustomXmlTraceDefinition fDefinition;\r
     private CustomXmlEventType fEventType;\r
     private InputElement fRecordInputElement;\r
@@ -66,10 +67,13 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
         fRecordInputElement = getRecordInputElement(fDefinition.rootInputElement);\r
     }\r
 \r
+    @Override\r
+    public void initTrace(String path, Class<CustomXmlEvent> eventType, boolean indexTrace) throws FileNotFoundException {\r
+        super.initTrace(path, eventType, CACHE_SIZE, indexTrace);\r
+    }\r
+\r
     @Override\r
     public TmfContext seekLocation(ITmfLocation<?> location) {\r
-        //System.out.println(Thread.currentThread().getName() + "::" + getName() + " seekLocation(" + ((location == null || location.getLocation() == null) ? "null" : location) + ")");\r
-        //new Throwable().printStackTrace();\r
         CustomXmlTraceContext context = new CustomXmlTraceContext(NULL_LOCATION, ITmfContext.INITIAL_RANK);\r
         if (NULL_LOCATION.equals(location) || !new File(getPath()).isFile()) {\r
             return context;\r
@@ -167,7 +171,6 @@ public class CustomXmlTrace extends TmfTrace<CustomXmlEvent> {
 \r
     @Override\r
     public TmfEvent parseEvent(TmfContext tmfContext) {\r
-        //System.out.println(Thread.currentThread().getName() + ":: " + getName() + " parseEvent(" + tmfContext.getRank() + " @ " + (tmfContext.getLocation().getLocation() == null ? "null" : tmfContext.getLocation()));\r
         if (!(tmfContext instanceof CustomXmlTraceContext)) {\r
             return null;\r
         }\r
This page took 0.023445 seconds and 5 git commands to generate.