try {
this.fTrace = new CTFTrace(path);
CtfIteratorManager.addTrace(this);
- CtfTmfLightweightContext ctx;
+ CtfTmfContext ctx;
/* Set the start and (current) end times for this trace */
- ctx = (CtfTmfLightweightContext) seekEvent(0L);
+ ctx = (CtfTmfContext) seekEvent(0L);
CtfTmfEvent event = getNext(ctx);
if((ctx.getLocation().equals(CtfIterator.NULL_LOCATION)) || (ctx.getCurrentEvent() == null)) {
/* Handle the case where the trace is empty */
@Override
public double getLocationRatio(ITmfLocation location) {
final CtfLocation curLocation = (CtfLocation) location;
- final CtfTmfLightweightContext context = new CtfTmfLightweightContext(this);
+ final CtfTmfContext context = new CtfTmfContext(this);
context.setLocation(curLocation);
context.seek(curLocation.getLocationInfo());
final CtfLocationData currentTime = ((CtfLocationData)context.getLocation().getLocationInfo());
@Override
public synchronized ITmfContext seekEvent(final ITmfLocation location) {
CtfLocation currentLocation = (CtfLocation) location;
- CtfTmfLightweightContext context = new CtfTmfLightweightContext(this);
+ CtfTmfContext context = new CtfTmfContext(this);
if (fTrace == null) {
context.setLocation(null);
context.setRank(ITmfContext.UNKNOWN_RANK);
@Override
public synchronized ITmfContext seekEvent(double ratio) {
- CtfTmfLightweightContext context = new CtfTmfLightweightContext(this);
+ CtfTmfContext context = new CtfTmfContext(this);
if (fTrace == null) {
context.setLocation(null);
context.setRank(ITmfContext.UNKNOWN_RANK);
return null;
}
CtfTmfEvent event = null;
- if (context instanceof CtfTmfLightweightContext) {
+ if (context instanceof CtfTmfContext) {
if (context.getLocation() == null || CtfLocation.INVALID_LOCATION.equals(context.getLocation().getLocationInfo())) {
return null;
}
- CtfTmfLightweightContext ctfContext = (CtfTmfLightweightContext) context;
+ CtfTmfContext ctfContext = (CtfTmfContext) context;
event = ctfContext.getCurrentEvent();
if (event != null) {
@Override
public CtfTmfEvent parseEvent(ITmfContext context) {
CtfTmfEvent event = null;
- if( context instanceof CtfTmfLightweightContext ){
- CtfTmfLightweightContext itt = (CtfTmfLightweightContext) context.clone();
+ if( context instanceof CtfTmfContext ){
+ CtfTmfContext itt = (CtfTmfContext) context.clone();
event = itt.getCurrentEvent();
}
return event;
// Helpers
//-------------------------------------------
- private static CtfIterator getIterator(CtfTmfTrace trace, CtfTmfLightweightContext context) {
+ private static CtfIterator getIterator(CtfTmfTrace trace, CtfTmfContext context) {
return CtfIteratorManager.getIterator(trace, context);
}