ss: Remove checkValidTime from the backend interface
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Wed, 22 Oct 2014 17:57:46 +0000 (13:57 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 28 Oct 2014 02:32:11 +0000 (22:32 -0400)
This is merely an internal method that implementations *should*
normally have, but it is not meant to be used externally.

Change-Id: Iaf03df0ec515ba4ae42896042d2fc7840ee12661
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/35503
Tested-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/statesystem/core/backend/IStateHistoryBackend.java
org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/statesystem/core/backend/InMemoryBackend.java
org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/statesystem/core/backend/NullBackend.java
org.eclipse.tracecompass.statesystem.core/src/org/eclipse/tracecompass/statesystem/core/backend/historytree/HistoryTreeBackend.java
org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/internal/tmf/core/statesystem/backends/partial/PartialHistoryBackend.java

index 2d9c009fa00fd407404c8fab5d75ff5c1164cd49..07fa6762b0c536ddc49bca3f09a2e0b615060df7 100644 (file)
@@ -176,18 +176,6 @@ public interface IStateHistoryBackend {
             throws TimeRangeException, AttributeNotFoundException,
             StateSystemDisposedException;
 
-    /**
-     * Simple check to make sure the requested timestamps are within the borders
-     * of this state history. This is used internally, but could also be used by
-     * the request sender (to check before sending in a lot of requests for
-     * example).
-     *
-     * @param t
-     *            The queried timestamp
-     * @return True if the timestamp is within range, false if not.
-     */
-    boolean checkValidTime(long t);
-
     /**
      * Debug method to print the contents of the history backend.
      *
index 3fb4bf3cbdc3586832716ba10b17299b773f9b58..6a9cdd41387c20af630394a93c9b4c6b4688ab5f 100644 (file)
@@ -171,8 +171,7 @@ public class InMemoryBackend implements IStateHistoryBackend {
         throw new AttributeNotFoundException();
     }
 
-    @Override
-    public boolean checkValidTime(long t) {
+    private boolean checkValidTime(long t) {
         if (t >= startTime && t <= latestTime) {
             return true;
         }
index bbe09fd3f54146018923bdfc70dd19b931faf70c..79f8e3f01054c2afd9ce16648b1f5ed2dc1896d9 100644 (file)
@@ -105,17 +105,6 @@ public class NullBackend implements IStateHistoryBackend {
         return null;
     }
 
-    /**
-     * Null back-ends cannot run queries.
-     *
-     * @return Always returns false.
-     */
-    @Override
-    public boolean checkValidTime(long t) {
-        /* Cannot do past queries */
-        return false;
-    }
-
     @Override
     public void debugPrint(PrintWriter writer) {
         writer.println("Null history backend"); //$NON-NLS-1$
index 213ca18cd2247586a18db7a6c33cf4f4e4365264..72860a972639d599bdaad4c9b085063bf9aa1361 100644 (file)
@@ -214,8 +214,7 @@ public class HistoryTreeBackend implements IStateHistoryBackend {
         return getRelevantInterval(t, attributeQuark);
     }
 
-    @Override
-    public boolean checkValidTime(long t) {
+    private boolean checkValidTime(long t) {
         return (t >= sht.getTreeStart() && t <= sht.getTreeEnd());
     }
 
index f9c1b5612302bb90150706bb04f19ff222534845..06d2942a2be669c9912427043995442dbe1e3b9c 100644 (file)
@@ -261,8 +261,7 @@ public class PartialHistoryBackend implements IStateHistoryBackend {
         throw new UnsupportedOperationException();
     }
 
-    @Override
-    public boolean checkValidTime(long t) {
+    private boolean checkValidTime(long t) {
         return (t >= getStartTime() && t <= getEndTime());
     }
 
This page took 0.029461 seconds and 5 git commands to generate.