* Create a new State History from scratch, using a SHTConfig object for
* configuration
*/
- private HistoryTree(HTConfig conf) throws IOException {
+ HistoryTree(HTConfig conf) throws IOException {
/*
* Simple check to make sure we have enough place in the 0th block
* for the tree configuration
latestBranch.add(firstNode);
}
- /**
- * "New State History" constructor, which doesn't use HTConfig but the
- * individual values separately. Kept for now for backwards compatibility,
- * but you should definitely consider using SHTConfig instead (since its
- * contents can then change without directly affecting SHT's API).
- */
- @Deprecated
- HistoryTree(File newStateFile, int blockSize, int maxChildren,
- long startTime) throws IOException {
- this(new HTConfig(newStateFile, blockSize, maxChildren, startTime));
- }
-
/**
* "Reader" constructor : instantiate a SHTree from an existing tree file on
* disk
protected boolean isFinishedBuilding = false;
/**
- * Construtor for new history files. Use this when creating a new history
+ * Constructor for new history files. Use this when creating a new history
* from scratch.
*
* @param newStateFile
*/
public HistoryTreeBackend(File newStateFile, int blockSize,
int maxChildren, long startTime) throws IOException {
- sht = new HistoryTree(newStateFile, blockSize, maxChildren, startTime);
+ final HTConfig conf = new HTConfig(newStateFile, blockSize, maxChildren, startTime);
+ sht = new HistoryTree(conf);
treeIO = sht.getTreeIO();
}
/**
- * Construtor for new history files. Use this when creating a new history
+ * Constructor for new history files. Use this when creating a new history
* from scratch. This version supplies sane defaults for the configuration
* parameters.
*