tmf: fix sonar warnings about redundant modifier in interfaces
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / statesystem / ITmfStateSystem.java
index fc5a3a72089244f60605c84055775a066f34675f..a5f37cc6804014edd63bdffd6edd94cff205ee57 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2012 Ericsson
+ * Copyright (c) 2012, 2013 Ericsson
  *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -38,14 +38,14 @@ public interface ITmfStateSystem {
      *
      * @return The history's registered start time
      */
-    public long getStartTime();
+    long getStartTime();
 
     /**
      * Return the current end time of the history.
      *
      * @return The current end time of this state history
      */
-    public long getCurrentEndTime();
+    long getCurrentEndTime();
 
     /**
      * While it's possible to query a state history that is being built,
@@ -54,22 +54,20 @@ public interface ITmfStateSystem {
      *
      * This method blocks the calling thread until the history back-end is done
      * building. If it's already built (ie, opening a pre-existing file) this
-     * should return immediately. It's an alternative to listening to the
-     * {@link org.eclipse.linuxtools.tmf.core.signal.TmfStateSystemBuildCompleted}
-     * signal.
+     * should return immediately.
      *
      * @return If the build was successful. If false is returned, this either
      *         means there was a problem during the build, or it got cancelled
      *         before it could finished. In that case, no queries should be run
      *         afterwards.
      */
-    public boolean waitUntilBuilt();
+    boolean waitUntilBuilt();
 
     /**
      * Notify the state system that the trace is being closed, so it should
      * clean up, close its files, etc.
      */
-    public void dispose();
+    void dispose();
 
     /**
      * Return the current total amount of attributes in the system. This is also
@@ -78,22 +76,7 @@ public interface ITmfStateSystem {
      *
      * @return The current number of attributes in the system
      */
-    public int getNbAttributes();
-
-    /**
-     * Check if a given quark is the last attribute that was added to the
-     * system.
-     *
-     * This is a common case, and it's a bit clearer than
-     * " x == getNbAttributes - 1"
-     *
-     * @param quark
-     *            The quark to check for
-     * @return True if this is the last quark that was added to the system,
-     *         false if not
-     * @since 2.0
-     */
-    public boolean isLastAttribute(int quark);
+    int getNbAttributes();
 
     /**
      * @name Read-only quark-getting methods
@@ -113,7 +96,7 @@ public interface ITmfStateSystem {
      *             This exception is thrown if the requested attribute simply
      *             did not exist in the system.
      */
-    public int getQuarkAbsolute(String... attribute)
+    int getQuarkAbsolute(String... attribute)
             throws AttributeNotFoundException;
 
     /**
@@ -136,7 +119,7 @@ public interface ITmfStateSystem {
      * @throws AttributeNotFoundException
      *             If the quark is invalid
      */
-    public int getQuarkRelative(int startingNodeQuark, String... subPath)
+    int getQuarkRelative(int startingNodeQuark, String... subPath)
             throws AttributeNotFoundException;
 
     /**
@@ -152,7 +135,7 @@ public interface ITmfStateSystem {
      * @throws AttributeNotFoundException
      *             If the quark was not existing or invalid.
      */
-    public List<Integer> getSubAttributes(int quark, boolean recursive)
+    List<Integer> getSubAttributes(int quark, boolean recursive)
             throws AttributeNotFoundException;
 
     /**
@@ -179,7 +162,7 @@ public interface ITmfStateSystem {
      *         the pattern. If no attribute matched, the list will be empty (but
      *         not null).
      */
-    public List<Integer> getQuarks(String... pattern);
+    List<Integer> getQuarks(String... pattern);
 
     /**
      * Return the name assigned to this quark. This returns only the "basename",
@@ -189,7 +172,7 @@ public interface ITmfStateSystem {
      *            The quark for which we want the name
      * @return The name of the quark
      */
-    public String getAttributeName(int attributeQuark);
+    String getAttributeName(int attributeQuark);
 
     /**
      * This returns the slash-separated path of an attribute by providing its
@@ -199,7 +182,7 @@ public interface ITmfStateSystem {
      *            The quark of the attribute we want
      * @return One single string separated with '/', like a filesystem path
      */
-    public String getFullAttributePath(int attributeQuark);
+    String getFullAttributePath(int attributeQuark);
 
     /**
      * @name Query methods
@@ -219,7 +202,20 @@ public interface ITmfStateSystem {
      * @throws AttributeNotFoundException
      *             If the requested attribute is invalid
      */
-    public ITmfStateValue queryOngoingState(int attributeQuark)
+    ITmfStateValue queryOngoingState(int attributeQuark)
+            throws AttributeNotFoundException;
+
+    /**
+     * Get the start time of the current ongoing state, for the specified
+     * attribute.
+     *
+     * @param attribute
+     *            Quark of the attribute
+     * @return The current start time of the ongoing state
+     * @throws AttributeNotFoundException
+     *             If the attribute is invalid
+     */
+    long getOngoingStartTime(int attribute)
             throws AttributeNotFoundException;
 
     /**
@@ -242,7 +238,7 @@ public interface ITmfStateSystem {
      * @throws StateSystemDisposedException
      *             If the query is sent after the state system has been disposed
      */
-    public List<ITmfStateInterval> queryFullState(long t)
+    List<ITmfStateInterval> queryFullState(long t)
             throws TimeRangeException, StateSystemDisposedException;
 
     /**
@@ -267,7 +263,7 @@ public interface ITmfStateSystem {
      * @throws StateSystemDisposedException
      *             If the query is sent after the state system has been disposed
      */
-    public ITmfStateInterval querySingleState(long t, int attributeQuark)
+    ITmfStateInterval querySingleState(long t, int attributeQuark)
             throws AttributeNotFoundException, TimeRangeException,
             StateSystemDisposedException;
 
@@ -298,7 +294,7 @@ public interface ITmfStateSystem {
      *             If the query is sent after the state system has been disposed
      * @since 2.0
      */
-    public ITmfStateInterval querySingleStackTop(long t, int stackAttributeQuark)
+    ITmfStateInterval querySingleStackTop(long t, int stackAttributeQuark)
             throws StateValueTypeException, AttributeNotFoundException,
             TimeRangeException, StateSystemDisposedException;
 
@@ -327,7 +323,7 @@ public interface ITmfStateSystem {
      * @throws StateSystemDisposedException
      *             If the query is sent after the state system has been disposed
      */
-    public List<ITmfStateInterval> queryHistoryRange(int attributeQuark,
+    List<ITmfStateInterval> queryHistoryRange(int attributeQuark,
             long t1, long t2) throws TimeRangeException,
             AttributeNotFoundException, StateSystemDisposedException;
 
@@ -361,7 +357,7 @@ public interface ITmfStateSystem {
      *             If the query is sent after the state system has been disposed
      * @since 2.0
      */
-    public List<ITmfStateInterval> queryHistoryRange(int attributeQuark,
+    List<ITmfStateInterval> queryHistoryRange(int attributeQuark,
             long t1, long t2, long resolution, IProgressMonitor monitor)
             throws TimeRangeException, AttributeNotFoundException,
             StateSystemDisposedException;
This page took 0.026501 seconds and 5 git commands to generate.