Update TmfTrace javadoc
authorFrancois Chouinard <fchouinard@gmail.com>
Fri, 27 Apr 2012 02:27:19 +0000 (22:27 -0400)
committerFrancois Chouinard <fchouinard@gmail.com>
Fri, 27 Apr 2012 03:02:53 +0000 (23:02 -0400)
12 files changed:
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/trace/TmfLocationTest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/ITmfEventField.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/event/TmfSimpleTimestamp.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfEventParser.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfLocation.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTrace.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/ITmfTraceIndexer.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpoint.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfCheckpointIndexer.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfContext.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfLocation.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java

index 0f4ce3b21fe8309200a2c6c340c0bb7fe525e1e1..af7c07797e1326b39693d84345433a3e8c9dafd0 100644 (file)
@@ -34,7 +34,6 @@ public class TmfLocationTest extends TestCase {
     Long aLong = 12345L;
     TmfTimestamp aTimestamp = new TmfTimestamp();
 
-    TmfLocation<Boolean> fLocation0;
     TmfLocation<String> fLocation1;
     TmfLocation<String> fLocation2;
     TmfLocation<Long> fLocation3;
@@ -55,7 +54,6 @@ public class TmfLocationTest extends TestCase {
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        fLocation0 = TmfLocation.NULL_LOCATION;
         fLocation1 = new TmfLocation<String>((String) null);
         fLocation2 = new TmfLocation<String>(aString);
         fLocation3 = new TmfLocation<Long>(aLong);
@@ -72,7 +70,6 @@ public class TmfLocationTest extends TestCase {
     // ------------------------------------------------------------------------
 
     public void testTmfLocation() {
-        assertNull("TmfLocation", fLocation0.getLocation());
         assertNull("TmfLocation", fLocation1.getLocation());
         assertEquals("TmfLocation", aString, fLocation2.getLocation());
         assertEquals("TmfLocation", aLong, fLocation3.getLocation());
@@ -80,13 +77,11 @@ public class TmfLocationTest extends TestCase {
     }
 
     public void testTmfLocationCopy() {
-        TmfLocation<Boolean> location0 = new TmfLocation<Boolean>(fLocation0);
         TmfLocation<String> location1 = new TmfLocation<String>(fLocation1);
         TmfLocation<String> location2 = new TmfLocation<String>(fLocation2);
         TmfLocation<Long> location3 = new TmfLocation<Long>(fLocation3);
         TmfLocation<ITmfTimestamp> location4 = new TmfLocation<ITmfTimestamp>(fLocation4);
 
-        assertNull("TmfLocation", location0.getLocation());
         assertNull("TmfLocation", location1.getLocation());
         assertEquals("TmfLocation", aString, location2.getLocation());
         assertEquals("TmfLocation", aLong, location3.getLocation());
index d2a23dec54f14ce7a50fa11280ece767f6125f9a..0168e5fd76b7284ea917d2ceb20a64756551500e 100644 (file)
@@ -21,7 +21,7 @@ package org.eclipse.linuxtools.tmf.core.event;
  * @author Francois Chouinard
  *
  * @see ITmfEvent
- * @see ITmfEventField
+ * @see ITmfEventType
  */
 public interface ITmfEventField extends Cloneable {
 
index 3432c5b886869ebf199774b9b1e7b4706d38ed82..e99b7797587f036fc34a06d55e06d3ef41ffee9d 100644 (file)
@@ -13,8 +13,7 @@
 package org.eclipse.linuxtools.tmf.core.event;
 
 /**
- * A simplified timestamp where scale and precision are set to 0 i.e. timestamps
- * are represented by the tuple { value, 0, 0 }.
+ * A simplified timestamp where scale and precision are set to 0.
  * 
  * @since 1.0
  * @version 1.0
index dc64d3d0c0dfbaac256373e0bc7863eb4f8879c0..fd2526231f893698256144cf8e3da1d1152d575a 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009 Ericsson
+ * Copyright (c) 2009, 2012 Ericsson
  * 
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
@@ -16,8 +16,8 @@ package org.eclipse.linuxtools.tmf.core.trace;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 
 /**
- * The TMF trace parser API.
- * 
+ * The generic trace parser in TMF.
+ *  
  * @since 1.0
  * @version 1.0
  * @author Francois Chouinard
@@ -29,9 +29,10 @@ public interface ITmfEventParser<T extends ITmfEvent> {
 
        /**
         * Parses the trace event referenced by the context.
+        * The context should *not* be altered.
         * 
-        * @param context
-        * @return
+        * @param context the trace context
+        * @return a parsed event (null if none)
         */
        public T parseEvent(ITmfContext context);
 
index 6edf7c01fa596b68a814bab3a5c16207c3848a8c..5ec399f77da29fbbf2c04ae01d9675dbbbae6141 100644 (file)
@@ -15,11 +15,13 @@ package org.eclipse.linuxtools.tmf.core.trace;
 
 
 /**
+ * The generic trace location in TMF.
+ * <p>
  * An ITmfLocation is the equivalent of a random-access file position, holding
  * enough information to allow the positioning of the trace 'pointer' to read an
  * arbitrary event.
  * <p>
- * This location is trace-specific but must be comparable.
+ * This location is trace-specific and must be comparable.
  * 
  * @since 1.0
  * @version 1.0
index d03b4b0954119d56bf7cf2a79a1067e58089583a..9f877ba7b0ca967f32e70064c91b9b148b796886 100644 (file)
@@ -50,18 +50,18 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
  * ITmfEvent event = trace.readEvent(context);
  * while (event != null) {
  *     processEvent(event);
- *     event = trace.readEvent(context);
+ *     event = trace.readNextEvent(context);
  * }
  * </pre>
  * <b>Example 2</b>: Process 50 events starting from the 1000th event
  * <pre>
  * int nbEventsRead = 0;
  * ITmfContext context = trace.seekEvent(1000);
- * ITmfEvent event = trace.readEvent(context);
+ * ITmfEvent event = trace.readNextEvent(context);
  * while (event != null && nbEventsRead < 50) {
  *     nbEventsRead++;
  *     processEvent(event);
- *     event = trace.readEvent(context);
+ *     event = trace.readNextEvent(context);
  * }
  * </pre>
  * <b>Example 3</b>: Process the events between 2 timestamps (inclusive)
@@ -69,10 +69,10 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
  * ITmfTimestamp startTime = ...;
  * ITmfTimestamp endTime = ...;
  * ITmfContext context = trace.seekEvent(startTime);
- * ITmfEvent event = trace.readEvent(context);
+ * ITmfEvent event = trace.readNextEvent(context);
  * while (event != null && event.getTimestamp().compareTo(endTime) <= 0) {
  *     processEvent(event);
- *     event = trace.readEvent(context);
+ *     event = trace.readNextEvent(context);
  * }
  * </pre>
  * A trace is also an event provider so it can process event requests
@@ -105,7 +105,7 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
  * @author Francois Chouinard
  *
  * @see ITmfEvent
- * @see ITmfEventProvider
+ * @see ITmfDataProvider
  * @see ITmfEventRequest
  * @see TmfTrace
  */
index 0a4520652b6f42830d6d592fe4877635b1357454..76d878a82ee7efb15f69fad1fc8fb6b2c04bc914 100644 (file)
@@ -16,7 +16,7 @@ import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 
 /**
- * The trace indexer API.
+ * The generic trace indexer in TMF.
  * 
  * @since 1.0
  * @version 1.0
index 61f6a71b1b517d45b4c42cf7e61a810d93d7816f..967aecaa84b864e0bf2a23c2f4387391080480c8 100644 (file)
@@ -16,7 +16,8 @@ package org.eclipse.linuxtools.tmf.core.trace;
 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
 
 /**
- * This class maps an event timestamp to a generic location.
+ * A basic implementation of ITmfCheckpoint. It simply maps an event timestamp
+ * to a generic location.
  * 
  * @since 1.0
  * @version 1.0
index efef5e33d0509d4dd173866af41772785a655e80..aaedb788d0d67bd6677015214aa221e0d716b16f 100644 (file)
@@ -29,8 +29,9 @@ import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTraceUpdatedSignal;
 
 /**
- * A simple trace indexer that builds an array of trace checkpoints. Checkpoints
- * are stored at fixed intervals (event rank) in ascending timestamp order.
+ * A simple indexer that manages the trace index as an array of trace
+ * checkpoints. Checkpoints are stored at fixed intervals (event rank) in 
+ * ascending timestamp order.
  * <p>
  * The goal being to access a random trace event reasonably fast from the user's
  * standpoint, picking the right interval value becomes a trade-off between speed
index 281f554c0fd904f062dc07a8ccb4e46d6cd62406..dfba34f7bcf374919a84b715166b8a6dc4301491 100644 (file)
 package org.eclipse.linuxtools.tmf.core.trace;
 
 /**
- * Trace context structure. It ties a trace location to an event rank. The
- * context should be enough to restore the trace state so the corresponding
- * event can be read.
+ * A basic implementation of ITmfContext.
+ * <p>
+ * It ties a trace location to an event rank. The context should be enough to
+ * restore the trace state so the corresponding event can be read.
  * 
  * @since 1.0
  * @version 1.0
  * @author Francois Chouinard
  *
- * @see ITmfContext
  * @see ITmfLocation
  */
 public class TmfContext implements ITmfContext, Cloneable {
index c19f73665abe2e9879fb071c01f0859569abe3ec..2ffb6c701c3b909f84903946057c565d34701387 100644 (file)
@@ -22,20 +22,9 @@ import java.lang.reflect.Method;
  * @since 1.0
  * @version 1.0
  * @author Francois Chouinard
- *
- * @see ITmfLocation
  */
 public class TmfLocation<L extends Comparable<L>> implements ITmfLocation<L> {
 
-    // ------------------------------------------------------------------------
-    // Constants
-    // ------------------------------------------------------------------------
-
-    /**
-     * The 'null' location
-     */
-    static public final TmfLocation<Boolean> NULL_LOCATION = new TmfLocation<Boolean>();
-
     // ------------------------------------------------------------------------
     // Attributes
     // ------------------------------------------------------------------------
@@ -49,6 +38,7 @@ public class TmfLocation<L extends Comparable<L>> implements ITmfLocation<L> {
     /**
      * Default constructor (for the 'null' location)
      */
+    @SuppressWarnings("unused")
     private TmfLocation() {
         fLocation = null;
     }
@@ -65,7 +55,7 @@ public class TmfLocation<L extends Comparable<L>> implements ITmfLocation<L> {
     /**
      * Copy constructor
      * 
-     * @param other the original location
+     * @param location the original location
      */
     public TmfLocation(final TmfLocation<L> location) {
         fLocation = location.fLocation;
index b14809f7c5ca928183c3ac294f4e8ab87f9c2ddf..e0c5fc726eefcc35b1cfc8c669c9f1fb2637ed7c 100644 (file)
@@ -37,6 +37,7 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
  * <li> public double getLocationRatio(ITmfLocation<?> location)
  * <li> public ITmfContext seekEvent(ITmfLocation<?> location)
  * <li> public ITmfContext seekEvent(double ratio)
+ * <li> public boolean validate(IProject project, String path)
  * </ul>
  * A concrete trace must provide its corresponding parser. A common way to
  * accomplish this is by making the concrete class extend TmfTrace and
@@ -50,8 +51,6 @@ import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
  * @version 1.0
  * @author Francois Chouinard
  *
- * @see ITmfTrace
- * @see TmfEventProvider
  * @see ITmfEvent
  * @see ITmfTraceIndexer
  * @see ITmfEventParser
@@ -78,12 +77,12 @@ public abstract class TmfTrace<T extends ITmfEvent> extends TmfEventProvider<T>
     private String fPath;
 
     /**
-     * The cache page size
+     * The trace cache page size
      */
     protected int fCacheSize = DEFAULT_TRACE_CACHE_SIZE;
 
     /**
-     * The number of events collected so far
+     * The number of events collected (so far)
      */
     protected long fNbEvents = 0;
 
@@ -472,8 +471,7 @@ public abstract class TmfTrace<T extends ITmfEvent> extends TmfEventProvider<T>
      * Update the trace attributes
      * 
      * @param context the current trace context
-     * @param rank
-     * @param timestamp
+     * @param timestamp the corresponding timestamp
      */
     protected synchronized void updateAttributes(final ITmfContext context, final ITmfTimestamp timestamp) {
         if (fStartTime.compareTo(timestamp, false) > 0) {
This page took 0.031558 seconds and 5 git commands to generate.