tmf: Synchronize accesses to HistoryTree's latest branch
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / internal / tmf / core / statesystem / backends / historytree / HistoryTreeBackend.java
index 0ebd140be099448b016826aa148b19f6b2b3d212..d4d6241b7ac353b8456ab94e418319a444f98185 100644 (file)
@@ -180,7 +180,7 @@ public class HistoryTreeBackend implements IStateHistoryBackend {
         /* We start by reading the information in the root node */
         // FIXME using CoreNode for now, we'll have to redo this part to handle
         // different node types
-        CoreNode currentNode = sht.getLatestBranch().get(0);
+        CoreNode currentNode = sht.getRootNode();
         currentNode.writeInfoFromNode(stateInfo, t);
 
         /* Then we follow the branch down in the relevant children */
@@ -227,7 +227,7 @@ public class HistoryTreeBackend implements IStateHistoryBackend {
 
         // FIXME using CoreNode for now, we'll have to redo this part to handle
         // different node types
-        CoreNode currentNode = sht.getLatestBranch().get(0);
+        CoreNode currentNode = sht.getRootNode();
         HTInterval interval = currentNode.getRelevantInterval(key, t);
 
         try {
@@ -255,15 +255,6 @@ public class HistoryTreeBackend implements IStateHistoryBackend {
         return sht.getFileSize();
     }
 
-    /**
-     * Return the current depth of the tree, ie the number of node levels.
-     *
-     * @return The tree depth
-     */
-    public int getTreeDepth() {
-        return sht.getLatestBranch().size();
-    }
-
     /**
      * Return the average node usage as a percentage (between 0 and 100)
      *
This page took 0.028884 seconds and 5 git commands to generate.