import java.util.logging.Logger;
import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.common.core.log.TraceCompassLog;
import java.util.Objects;
import java.util.concurrent.ExecutionException;
import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.log.TraceCompassLog;
import org.eclipse.tracecompass.internal.statesystem.core.Activator;
+import org.eclipse.tracecompass.internal.statesystem.core.backend.historytree.IHistoryTree.IHTNodeFactory;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
synchronized (io) {
io.seekFCToNodePos(io.fFileChannelIn, seqNb);
- return HTNode.readNode(io.fConfig, io.fFileChannelIn);
+ return HTNode.readNode(io.fConfig, io.fFileChannelIn, key.fStateHistory.fNodeFactory);
}
}
}));
private final FileChannel fFileChannelIn;
private final FileChannel fFileChannelOut;
+ private final IHTNodeFactory fNodeFactory;
+
// ------------------------------------------------------------------------
// Methods
// ------------------------------------------------------------------------
* The configuration object for the StateHistoryTree
* @param newFile
* Flag indicating that the file must be created from scratch
+ * @param nodeFactory
+ * The factory to create new nodes for this tree
*
* @throws IOException
* An exception can be thrown when file cannot be accessed
*/
- public HT_IO(HTConfig config, boolean newFile) throws IOException {
+ public HT_IO(HTConfig config, boolean newFile, IHTNodeFactory nodeFactory) throws IOException {
fConfig = config;
File historyTreeFile = config.getStateFile();
}
fFileChannelIn = fFileInputStream.getChannel();
fFileChannelOut = fFileOutputStream.getChannel();
+ fNodeFactory = nodeFactory;
}
/**