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
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
\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