ss: add a 'done()' method to ITmfStateProvider
authorRaphaël Beamonte <raphael.beamonte@gmail.com>
Thu, 7 Jul 2016 16:22:38 +0000 (12:22 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Thu, 7 Jul 2016 22:39:16 +0000 (18:39 -0400)
This approach was previously used in the ITmfGraphProvider but not
available in the ITmfStateProvider. This allows, when needed, to finish
up the provider's work when the trace has been fully read, in order to
obtain a finalized state system when data are on hold until the trace end.

Change-Id: Ic6988e6e25936796eb8de48520dcf95e0a4690bb
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Reviewed-on: https://git.eclipse.org/r/76884
Reviewed-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Tested-by: Alexandre Montplaisir <alexmonthy@efficios.com>
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/statesystem/AbstractTmfStateProvider.java
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/statesystem/ITmfStateProvider.java

index f6cd62006cf0b2d92a5138423895c967f09d4e69..f9d74f948e4704904266086778978ae54502c6be 100644 (file)
@@ -214,6 +214,7 @@ public abstract class AbstractTmfStateProvider implements ITmfStateProvider {
                 event = fEventsQueue.take();
             }
             /* We've received the last event, clean up */
+            done();
             closeStateSystem();
         }
 
index 8e40dc4392b264805a12e73bbd9e9617c20707c1..204e76e009d231699754c0866e28792efbb046c9 100644 (file)
@@ -112,4 +112,10 @@ public interface ITmfStateProvider {
      * and that it should close its current history.
      */
     void dispose();
+
+    /**
+     * Callback when trace has been fully read
+     * @since 2.1
+     */
+    default void done() {}
 }
This page took 0.026293 seconds and 5 git commands to generate.