Rename xxx.lttng to xxx.lttng.core
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / request / TmfEventRequest.java
index 2c510d74b4ca4d5ced381d39499a01737f658de9..f5375a3bf80f62ced0a530eee9cb942753a55d53 100644 (file)
@@ -36,22 +36,22 @@ public abstract class TmfEventRequest<T extends TmfEvent> extends TmfDataRequest
      * @param range
      */
     public TmfEventRequest(Class<T> dataType) {
-        this(dataType, TmfTimeRange.Eternity, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+        this(dataType, TmfTimeRange.Eternity, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
     }
 
     public TmfEventRequest(Class<T> dataType, ExecutionType execType) {
-        this(dataType, TmfTimeRange.Eternity, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+        this(dataType, TmfTimeRange.Eternity, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
     }
 
     /**
      * @param range
      */
     public TmfEventRequest(Class<T> dataType, TmfTimeRange range) {
-        this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+        this(dataType, range, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
     }
 
     public TmfEventRequest(Class<T> dataType, TmfTimeRange range, ExecutionType execType) {
-        this(dataType, range, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
+        this(dataType, range, 0, ALL_DATA, DEFAULT_BLOCK_SIZE, execType);
     }
 
     /**
@@ -59,11 +59,11 @@ public abstract class TmfEventRequest<T extends TmfEvent> extends TmfDataRequest
      * @param nbRequested
      */
     public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested) {
-        this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
+        this(dataType, range, 0, nbRequested, DEFAULT_BLOCK_SIZE, ExecutionType.FOREGROUND);
     }
     
     public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, ExecutionType execType) {
-        this(dataType, range, nbRequested, DEFAULT_BLOCK_SIZE, execType);
+        this(dataType, range, 0, nbRequested, DEFAULT_BLOCK_SIZE, execType);
     }
     
     /**
@@ -72,12 +72,15 @@ public abstract class TmfEventRequest<T extends TmfEvent> extends TmfDataRequest
      * @param blockSize Size of the largest blocks expected
      */
     public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize) {
-       super(dataType, 0, nbRequested, blockSize, ExecutionType.FOREGROUND);
-       fRange = range;
+       this(dataType, range, 0, nbRequested, blockSize, ExecutionType.FOREGROUND);
     }
 
     public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int nbRequested, int blockSize, ExecutionType execType) {
-       super(dataType, 0, nbRequested, blockSize, execType);
+       this(dataType, range, 0, nbRequested, blockSize, execType);
+    }
+
+    public TmfEventRequest(Class<T> dataType, TmfTimeRange range, int index, int nbRequested, int blockSize, ExecutionType execType) {
+       super(dataType, index, nbRequested, blockSize, execType);
        fRange = range;
     }
 
@@ -93,6 +96,20 @@ public abstract class TmfEventRequest<T extends TmfEvent> extends TmfDataRequest
         return fRange;
     }
 
+    // ------------------------------------------------------------------------
+    // Setters
+    // ------------------------------------------------------------------------
+
+    /**
+     * this method is called by the event provider to set the index corresponding
+     * to the time range start time once it is known
+     * @param index the start time index
+     */
+    @Override
+       public void setStartIndex(int index) {
+       setIndex(index);
+    }
+
     // ------------------------------------------------------------------------
     // Object
     // ------------------------------------------------------------------------
@@ -116,7 +133,7 @@ public abstract class TmfEventRequest<T extends TmfEvent> extends TmfDataRequest
     @SuppressWarnings("nls")
     public String toString() {
                return "[TmfEventRequest(" + getRequestId() + "," + getDataType().getSimpleName() 
-                       + "," + getRange() + "," + getNbRequested() + ")]";
+                       + "," + getRange() + "," + getIndex() + "," + getNbRequested() + "," + getBlockSize() + ")]";
     }
 
 }
This page took 0.025136 seconds and 5 git commands to generate.