final long position = rank / fCheckpointInterval;
// Add new entry at proper location (if empty)
if (fTraceIndex.size() == position) {
- fTraceIndex.add(new TmfCheckpoint(timestamp.clone(), context.clone2()));
+ fTraceIndex.add(new TmfCheckpoint(timestamp.clone(), context.clone()));
}
}
}
}
// Position the trace at the checkpoint
- return seekCheckpoint(index);
+ return restoreCheckpoint(index);
}
/* (non-Javadoc)
final int index = (int) rank / fCheckpointInterval;
// Position the trace at the checkpoint
- return seekCheckpoint(index);
+ return restoreCheckpoint(index);
}
/**
* @param checkpoint the checkpoint index
* @return the corresponding context
*/
- private ITmfContext seekCheckpoint(final int checkpoint) {
+ private ITmfContext restoreCheckpoint(final int checkpoint) {
ITmfLocation<?> location = null;
int index = 0;
synchronized (fTraceIndex) {
if (index >= fTraceIndex.size()) {
index = fTraceIndex.size() - 1;
}
- final ITmfContext context = fTraceIndex.get(index).getContext().clone2();
-// fTrace.seekEvent(context.getLocation());
- return context;
+ return fTraceIndex.get(index).getContext().clone();
}
}
final ITmfContext context = fTrace.seekEvent(location);