Fix javadoc warnings
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / trace / ITmfTrace.java
index ce589ec2c122cad2a5b50fc5831bf650bc83ae77..0054c5feff400c6a774d24fa4e085dcf5c25f30d 100644 (file)
@@ -15,25 +15,26 @@ package org.eclipse.linuxtools.tmf.core.trace;
 import java.io.FileNotFoundException;
 
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.linuxtools.tmf.core.component.ITmfComponent;
-import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
 
 /**
  * <b><u>ITmfTrace</u></b>
  * <p>
  */
-public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
+public interface ITmfTrace<T extends ITmfEvent> extends ITmfComponent {
 
     // initTrace variants
-    public void initTrace(String path, Class<T> eventType) throws FileNotFoundException;
+    public void initTrace(String name, String path, Class<T> eventType) throws FileNotFoundException;
 
-    public void initTrace(String path, Class<T> eventType, int cacheSize) throws FileNotFoundException;
+    public void initTrace(String name, String path, Class<T> eventType, int cacheSize) throws FileNotFoundException;
 
-    public void initTrace(String path, Class<T> eventType, boolean indexTrace) throws FileNotFoundException;
+    public void initTrace(String name, String path, Class<T> eventType, boolean indexTrace) throws FileNotFoundException;
 
-    public void initTrace(String path, Class<T> eventType, int cacheSize, boolean indexTrace) throws FileNotFoundException;
+    public void initTrace(String name, String path, Class<T> eventType, int cacheSize, boolean indexTrace) throws FileNotFoundException;
 
     // Trace type validation
     public boolean validate(IProject project, String path);
@@ -66,9 +67,14 @@ public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
      */
     public TmfTimeRange getTimeRange();
 
-    public TmfTimestamp getStartTime();
+    public ITmfTimestamp getStartTime();
 
-    public TmfTimestamp getEndTime();
+    public ITmfTimestamp getEndTime();
+
+    /**
+     * @return the streaming interval in ms (0 if not streaming)
+     */
+    public long getStreamingInterval();
 
     /**
      * Positions the trace at the first event with the specified timestamp or index (i.e. the nth event in the trace).
@@ -76,15 +82,13 @@ public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
      * Returns a context which can later be used to read the event.
      * 
      * @param location
-     * @param timestamp
-     * @param rank
      * @return a context object for subsequent reads
      */
-    public TmfContext seekLocation(ITmfLocation<?> location);
+    public ITmfContext seekLocation(ITmfLocation<?> location);
 
-    public TmfContext seekEvent(TmfTimestamp timestamp);
+    public ITmfContext seekEvent(ITmfTimestamp timestamp);
 
-    public TmfContext seekEvent(long rank);
+    public ITmfContext seekEvent(long rank);
 
     /**
      * Positions the trace at the event located at the specified ratio.
@@ -95,7 +99,7 @@ public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
      *            a floating-point number between 0.0 (beginning) and 1.0 (end)
      * @return a context object for subsequent reads
      */
-    public TmfContext seekLocation(double ratio);
+    public ITmfContext seekLocation(double ratio);
 
     /**
      * Returns the ratio corresponding to the specified location.
@@ -112,10 +116,10 @@ public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
      * Returns the rank of the first event with the requested timestamp. If none, returns the index of the next event
      * (if any).
      * 
-     * @param timestamp
-     * @return
+     * @param timestamp the requested event timestamp
+     * @return the corresponding event rank
      */
-    public long getRank(TmfTimestamp timestamp);
+    public long getRank(ITmfTimestamp timestamp);
 
     /**
      * Return the event pointed by the supplied context (or null if no event left) and updates the context to the next
@@ -123,13 +127,24 @@ public interface ITmfTrace<T extends TmfEvent> extends ITmfComponent {
      * 
      * @return the next event in the stream
      */
-    public TmfEvent getNextEvent(TmfContext context);
+    public ITmfEvent getNextEvent(ITmfContext context);
 
     /**
      * Return the event pointed by the supplied context (or null if no event left) and *does not* update the context.
      * 
      * @return the next event in the stream
      */
-    public TmfEvent parseEvent(TmfContext context);
+    public ITmfEvent parseEvent(ITmfContext context);
+
+    /**
+     * Set the resource used for persistent properties on this trace
+     * @param resource the properties resource
+     */
+    public void setResource(IResource resource);
 
+    /**
+     * Get the resource used for persistent properties on this trace
+     * @return the properties resource or null if none is set
+     */
+    public IResource getResource();
 }
This page took 0.025543 seconds and 5 git commands to generate.