1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 * Bernd Hufmann - Bug fixes
12 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.lttng
.ui
.views
.common
;
15 import java
.util
.Arrays
;
17 import org
.eclipse
.linuxtools
.lttng
.LttngConstants
;
18 import org
.eclipse
.linuxtools
.lttng
.control
.LttngCoreProviderFactory
;
19 import org
.eclipse
.linuxtools
.lttng
.control
.LttngSyntheticEventProvider
;
20 import org
.eclipse
.linuxtools
.lttng
.event
.LttngSyntheticEvent
;
21 import org
.eclipse
.linuxtools
.lttng
.event
.LttngTimestamp
;
22 import org
.eclipse
.linuxtools
.lttng
.request
.ILttngSyntEventRequest
;
23 import org
.eclipse
.linuxtools
.lttng
.request
.IRequestStatusListener
;
24 import org
.eclipse
.linuxtools
.lttng
.request
.LttngSyntEventRequest
;
25 import org
.eclipse
.linuxtools
.lttng
.request
.RequestCompletedSignal
;
26 import org
.eclipse
.linuxtools
.lttng
.request
.RequestStartedSignal
;
27 import org
.eclipse
.linuxtools
.lttng
.state
.evProcessor
.ITransEventProcessor
;
28 import org
.eclipse
.linuxtools
.lttng
.ui
.TraceDebug
;
29 import org
.eclipse
.linuxtools
.lttng
.ui
.model
.trange
.ItemContainer
;
30 import org
.eclipse
.linuxtools
.tmf
.event
.TmfEvent
;
31 import org
.eclipse
.linuxtools
.tmf
.event
.TmfTimeRange
;
32 import org
.eclipse
.linuxtools
.tmf
.event
.TmfTimestamp
;
33 import org
.eclipse
.linuxtools
.tmf
.experiment
.TmfExperiment
;
34 import org
.eclipse
.linuxtools
.tmf
.request
.ITmfDataRequest
.ExecutionType
;
35 import org
.eclipse
.linuxtools
.tmf
.request
.TmfDataRequest
;
36 import org
.eclipse
.linuxtools
.tmf
.signal
.TmfExperimentDisposedSignal
;
37 import org
.eclipse
.linuxtools
.tmf
.signal
.TmfRangeSynchSignal
;
38 import org
.eclipse
.linuxtools
.tmf
.signal
.TmfSignalHandler
;
39 import org
.eclipse
.linuxtools
.tmf
.signal
.TmfSignalManager
;
40 import org
.eclipse
.linuxtools
.tmf
.signal
.TmfTimeSynchSignal
;
41 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.ITimeAnalysisViewer
;
42 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.TmfTimeScaleSelectionEvent
;
43 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.TmfTimeSelectionEvent
;
44 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.timeAnalysis
.model
.ITmfTimeAnalysisEntry
;
45 import org
.eclipse
.linuxtools
.tmf
.ui
.views
.TmfView
;
46 import org
.eclipse
.swt
.widgets
.Display
;
50 * Abstract class used as a base for views handling specific time range data
54 * The class handles a single element queue of data requests, i.e. request can
55 * be triggered from different sources e.g. opening a file as well as a new
56 * selected time window
62 public abstract class AbsTimeUpdateView
extends TmfView
implements IRequestStatusListener
{
64 // ========================================================================
66 // ========================================================================
68 // private static final long INITIAL_WINDOW_OFFSET = (1L * 1 * 1000 * 1000); // .001sec
69 // private static final long INITIAL_WINDOW_OFFSET = (1L * 10 * 1000 * 1000); // .01sec
70 private static final long INITIAL_WINDOW_OFFSET
= (1L * 100 * 1000 * 1000); // .1sec
71 // private static final long INITIAL_WINDOW_OFFSET = (1L * 1000 * 1000 * 1000); // 1sec
74 * Number of events before a GUI refresh
76 protected static final Long INPUT_CHANGED_REFRESH
= 75000L;
77 private static final long DEFAULT_OFFSET
= 0;
79 protected boolean synch
= true; // time synchronization, used to be an option
80 protected ITimeAnalysisViewer tsfviewer
= null;
82 private LttngSyntEventRequest fCurrentRequest
= null;
84 protected LttngSyntheticEventProvider fProvider
= LttngCoreProviderFactory
.getEventProvider(getProviderId());
86 // ========================================================================
88 // ========================================================================
89 public AbsTimeUpdateView(String viewID
) {
91 // freqState = UiCommonFactory.getQueue(this);
94 // ========================================================================
96 // ========================================================================
99 * Returns the number of events after which the relevant display will
104 protected Long
getInputChangedRefresh() {
105 return INPUT_CHANGED_REFRESH
;
109 * Cancel the ongoing request if another experiment is being selected
110 * @param experimentDisposedSignal
113 public void experimentDisposed(TmfExperimentDisposedSignal
<?
extends TmfEvent
> experimentDisposedSignal
) {
114 fProvider
.conditionallyCancelRequests();
120 * @seeorg.eclipse.linuxtools.lttng.state.IStateDataRequestListener#
121 * processingStarted(org.eclipse.linuxtools.lttng.state.StateDataRequest)
125 public synchronized void processingStarted(RequestStartedSignal signal
) {
126 LttngSyntEventRequest request
= signal
.getRequest();
127 if (request
!= null) {
128 // update queue with the id of the current request.
129 // freqState.requestStarted(request);
131 // if there was no new request then this one is still on
132 // prepare for the reception of new data
135 // no new time range for zoom orders
136 TmfTimeRange trange
= null;
137 // Time Range will be used to filter out events which are
138 // not visible in one pixel
139 trange
= request
.getRange();
141 // indicate if the data model needs to be cleared e.g. a new
142 // experiment is being selected
143 boolean clearData
= request
.isclearDataInd();
144 // Indicate if current data needs to be cleared and if so
145 // specify the new experiment time range that applies
146 ModelUpdatePrep(trange
, clearData
);
153 * @seeorg.eclipse.linuxtools.lttng.state.IStateDataRequestListener#
154 * processingCompleted(org.eclipse.linuxtools.lttng.state.StateDataRequest)
158 public void processingCompleted(RequestCompletedSignal signal
) {
159 ILttngSyntEventRequest request
= signal
.getRequest();
161 if (request
== null) {
165 // Update wait cursor
168 // No data refresh actions for cancelled requests.
169 if (request
.isCancelled() || request
.isFailed()) {
170 if (TraceDebug
.isDEBUG()) {
171 TmfTimeRange trange
= request
.getRange();
172 if (request
.isCancelled()) {
173 TraceDebug
.debug("Request cancelled " //$NON-NLS-1$
174 + trange
.getStartTime() + "-" + trange
.getEndTime() //$NON-NLS-1$
175 + " Handled Events: " + request
.getSynEventCount() //$NON-NLS-1$
176 + " " + request
.toString(), 15); //$NON-NLS-1$
177 } else if (request
.isFailed()) {
178 TraceDebug
.debug("Request Failed " + trange
.getStartTime() //$NON-NLS-1$
179 + "-" + trange
.getEndTime() + " Handled Events: " //$NON-NLS-1$ //$NON-NLS-2$
180 + request
.getSynEventCount() + " " //$NON-NLS-1$
181 + request
.toString());
187 modelInputChanged(request
, true);
192 * Registers as listener of time selection from other views
196 public void synchToTime(TmfTimeSynchSignal signal
) {
198 Object source
= signal
.getSource();
199 if (signal
!= null && source
!= null && source
!= this) {
201 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
203 // Check for GUI thread
204 if (Display
.getCurrent() != null) {
205 // GUI thread - execute update right away.
207 // Internal value is expected in nano seconds.
208 long selectedTime
= signal
.getCurrentTime().getValue();
209 if (tsfviewer
!= null) {
210 tsfviewer
.setSelectedTime(selectedTime
, true, source
);
212 ParamsUpdater paramUpdater
= getParamsUpdater();
213 Long savedSelTime
= paramUpdater
.getSelectedTime();
214 if ((savedSelTime
== null) || (savedSelTime
!= selectedTime
)) {
215 // Update the parameter updater to save the selected time
216 paramUpdater
.setSelectedTime(selectedTime
);
220 // Perform the updates on the UI thread
222 // We need to clone the timestamp in the signal so that it won't be overwritten duo to multipe thread access
223 final TmfTimeSynchSignal savedSignal
= new TmfTimeSynchSignal(signal
.getSource(), signal
.getCurrentTime().clone());
224 tsfviewer
.getControl().getDisplay().asyncExec(new Runnable() {
227 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
228 synchToTime(savedSignal
);
239 * Process the reception of time window adjustment in this view if the
240 * source of the update is not this view.
243 * @param clearingData
245 public void synchToTimeRange(TmfRangeSynchSignal signal
, boolean clearingData
) {
247 Object source
= signal
.getSource();
248 if (signal
!= null && source
!= null && source
!= this) {
249 // Internal value is expected in nano seconds.
250 TmfTimeRange trange
= signal
.getCurrentRange();
251 TmfExperiment
<?
> experiment
= TmfExperiment
.getCurrentExperiment();
252 if (experiment
== null) {
253 TraceDebug
.debug("Current selected experiment is null"); //$NON-NLS-1$
257 // Clearing of process data is configurable
258 eventRequest(trange
, experiment
.getTimeRange(), clearingData
, ExecutionType
.FOREGROUND
);
264 * Trigger time synchronisation to other views this method shall be called
265 * when a check has been performed to note that an actual change of time has
266 * been performed vs a pure re-selection of the same time
271 protected void synchTimeNotification(long time
, Object source
) {
272 // if synchronisation selected
274 // Notify other views
275 TmfSignalManager
.dispatchSignal(new TmfTimeSynchSignal(source
, new LttngTimestamp(time
)));
280 * Common implementation of ITmfTimeSelectionListener, not used by all the
281 * views extending this abstract class
285 protected void tsfTmProcessSelEvent(TmfTimeSelectionEvent event
) {
286 Object source
= event
.getSource();
287 if (source
== null) {
291 ParamsUpdater paramUpdater
= getParamsUpdater();
292 Long savedSelTime
= paramUpdater
.getSelectedTime();
294 long selTimens
= event
.getSelectedTime();
296 // make sure the new selected time is different than saved before
298 if (savedSelTime
== null || savedSelTime
!= selTimens
) {
299 // Notify listener views.
300 synchTimeNotification(selTimens
, source
);
302 // Update the parameter updater to save the selected time
303 paramUpdater
.setSelectedTime(selTimens
);
305 if (TraceDebug
.isDEBUG()) {
306 TraceDebug
.debug("Selected Time: " + new LttngTimestamp(selTimens
) + "\n\t\t" + getName()); //$NON-NLS-1$ //$NON-NLS-2$
312 * Common implementation of ITmfTimeScaleSelectionListener, not used by all
313 * the views extending this abstract class
317 protected void tsfTmProcessTimeScaleEvent(TmfTimeScaleSelectionEvent event
) {
318 // source needed to keep track of source values
319 Object source
= event
.getSource();
321 boolean newParams
= false;
322 TmfTimeRange trange
= null;
323 Long selectedTime
= null;
325 // update all information and get relevant data
326 synchronized (this) {
327 if (source
!= null) {
328 // Update the parameter updater before carrying out a read request
329 ParamsUpdater paramUpdater
= getParamsUpdater();
330 newParams
= paramUpdater
.processTimeScaleEvent(event
);
333 // Read the updated time window
334 trange
= paramUpdater
.getTrange();
335 if (trange
!= null) {
336 selectedTime
= paramUpdater
.getSelectedTime();
342 // Check for selectedTime is sufficient since it is only set if
343 // newParams is true and trange is not null
344 if (selectedTime
!= null) {
345 // Notify listener views. to perform data requests
346 // upon this notification
348 // Note that this has to be done outside the synchronized statement
349 // because otherwise we could end-up in a deadlock if a ongoing
350 // request needs to be canceled.
351 synchTimeRangeNotification(trange
, selectedTime
, source
);
356 * Inform registered listeners about the new time range
359 * @param selectedTime
362 protected void synchTimeRangeNotification(TmfTimeRange trange
, Long selectedTime
, Object source
) {
363 // if synchronisation selected
365 // Notify other views
366 TmfSignalManager
.dispatchSignal(new TmfRangeSynchSignal(source
, trange
, new LttngTimestamp(selectedTime
)));
371 * @param zoomedTRange
372 * @param experimentTRange
373 * @param clearingData
376 public void eventRequest(TmfTimeRange zoomedTRange
, TmfTimeRange experimentTRange
, boolean clearingData
, ExecutionType execType
) {
378 // timeRange is the Experiment time range
379 boolean sent
= processDataRequest(zoomedTRange
, experimentTRange
, DEFAULT_OFFSET
, TmfDataRequest
.ALL_DATA
, clearingData
, execType
);
390 * @param clearingData
393 public void eventRequest(long offset
, TmfTimeRange range
, boolean clearingData
, ExecutionType execType
) {
395 // timeRange is the Experiment time range
396 boolean sent
= processDataRequest(range
, null, offset
, TmfDataRequest
.ALL_DATA
, clearingData
, execType
);
404 // * @param zoomedTRange
405 // * @param experimentTRange
408 // public void dataRequest(TmfTimeRange zoomedTRange,
409 // TmfTimeRange experimentTRange, boolean clearingData) {
411 // // timeRange is the Experiment time range
412 // boolean sent = processDataRequest(zoomedTRange, experimentTRange, clearingData);
420 * send data request directly e.g. doesn't use a queue
422 * @param requestTrange
424 * @param experimentTRange
429 private boolean processDataRequest(TmfTimeRange requestTrange
,
430 TmfTimeRange experimentTRange
, long offset
, int nbRequested
, boolean clearingData
, ExecutionType execType
) {
432 if (requestTrange
== null) {
433 TraceDebug
.debug("Invalid input"); //$NON-NLS-1$
437 // Cancel the currently executing request before starting a new one
438 fProvider
.conditionallyCancelRequests();
439 fCurrentRequest
= new LttngSyntEventRequest(
440 requestTrange
, offset
, nbRequested
,
441 LttngConstants
.DEFAULT_BLOCK_SIZE
, this, experimentTRange
, getEventProcessor(),
442 TmfExperiment
.getCurrentExperiment().getName(), execType
) {
444 Long fCount
= getSynEventCount();
445 ITransEventProcessor processor
= getProcessor();
446 TmfTimestamp frunningTimeStamp
;
452 * org.eclipse.linuxtools.lttng.request.LttngSyntEventRequest#handleData
455 //// int handleDataCount = 0;
456 //// int handleDataValidCount = 0;
458 // public void handleData() {
459 // LttngSyntheticEvent[] result = getData();
461 // TmfEvent evt = (result.length > 0) ? result[0] : null;
462 //// handleDataCount++;
465 public void handleData(LttngSyntheticEvent event
) {
466 super.handleData(event
);
468 // handleDataValidCount++;
469 LttngSyntheticEvent synEvent
= (LttngSyntheticEvent
) event
;
471 switch (synEvent
.getSynType()) {
474 handleRequestStarted();
479 processor
.process(event
, synEvent
.getTraceModel());
481 if ((fCount
!= 0) && (fCount
% getInputChangedRefresh() == 0)) {
482 // send partial update
483 modelInputChanged(this, false);
485 if (TraceDebug
.isDEBUG()) {
486 frunningTimeStamp
= event
.getTimestamp();
487 TraceDebug
.debug("handled: " + fCount
+ " sequence: " + synEvent
.getSynType()); //$NON-NLS-1$ //$NON-NLS-2$
496 processor
.process(event
, synEvent
.getTraceModel());
507 public void handleRequestStarted() {
513 // if (TraceDebug.isDEBUG()) {
514 // TraceDebug.debug("AbsTimeUpdateView: Received=" + handleDataCount + ", Valid=" + handleDataCount + ", fCount=" + fCount);
520 public void handleCompleted() {
521 super.handleCompleted();
523 // Data is not complete and should be handled as such
524 if (isFailed() || isCancelled()) {
525 modelIncomplete(this);
528 if (TraceDebug
.isDEBUG()) {
529 if (frunningTimeStamp
!= null) {
530 TraceDebug
.debug("Last event time stamp: " + frunningTimeStamp
.getValue()); //$NON-NLS-1$
536 // send the request to TMF
537 fCurrentRequest
.startRequestInd(fProvider
);
538 fCurrentRequest
.setclearDataInd(clearingData
);
543 * Returns an initial smaller window to allow the user to select the area of
546 * @param experimentTRange
549 protected TmfTimeRange
getInitTRange(TmfTimeRange experimentTRange
) {
550 TmfTimestamp expStartTime
= experimentTRange
.getStartTime();
551 TmfTimestamp expEndTime
= experimentTRange
.getEndTime();
552 TmfTimestamp initialEndOfWindow
= new LttngTimestamp(expStartTime
554 + INITIAL_WINDOW_OFFSET
);
555 if (initialEndOfWindow
.compareTo(expEndTime
, false) < 0) {
556 return new TmfTimeRange(expStartTime
, initialEndOfWindow
);
559 // The original size of the experiment is smaller than proposed adjusted
561 return experimentTRange
;
565 * Request the Time Analysis widget to enable or disable the wait cursor
566 * e.g. data request in progress or data request completed
570 protected void waitCursor(final boolean waitInd
) {
571 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
572 Display display
= tsfviewer
.getControl().getDisplay();
574 // Perform the updates on the UI thread
575 display
.asyncExec(new Runnable() {
578 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
579 tsfviewer
.waitCursor(waitInd
);
587 * View preparation to override the current local information
590 * - new total time range e.g. Experiment level
591 * @param clearAllData
593 protected void ModelUpdatePrep(TmfTimeRange timeRange
, boolean clearAllData
) {
594 ItemContainer
<?
> itemContainer
= getItemContainer();
596 // start fresh e.g. new experiment selected
597 itemContainer
.clearItems();
599 // clear children but keep processes
600 itemContainer
.clearChildren();
603 // Obtain the current resource array
604 ITmfTimeAnalysisEntry
[] itemArr
= itemContainer
.readItems();
606 // clean up data and boundaries
607 displayModel(itemArr
, -1, -1, false, -1, -1, null);
609 ParamsUpdater updater
= getParamsUpdater();
610 if (updater
!= null) {
612 updater
.setEventsDiscarded(0);
614 // Update new visible time range if available
615 if (timeRange
!= null) {
616 updater
.update(timeRange
.getStartTime().getValue(), timeRange
.getEndTime().getValue());
622 * Initialize the model and view before reloading items
624 * @param boundaryRange
625 * @param visibleRange
628 protected void ModelUpdateInit(TmfTimeRange boundaryRange
, TmfTimeRange visibleRange
, Object source
) {
629 // Update the view boundaries
630 if (boundaryRange
!= null) {
631 ItemContainer
<?
> itemContainer
= getItemContainer();
632 if (itemContainer
!= null) {
633 itemContainer
.clearItems();
634 // Obtain the current process array
635 ITmfTimeAnalysisEntry
[] itemArr
= itemContainer
.readItems();
637 long startTime
= boundaryRange
.getStartTime().getValue();
638 long endTime
= boundaryRange
.getEndTime().getValue();
640 // Update the view part
641 displayModel(itemArr
, startTime
, endTime
, true, visibleRange
.getStartTime().getValue(), visibleRange
642 .getEndTime().getValue(), source
);
646 // update the view filtering parameters
647 if (visibleRange
!= null) {
648 ParamsUpdater updater
= getParamsUpdater();
649 if (updater
!= null) {
651 updater
.setEventsDiscarded(0);
652 // Update new visible time range if available
653 updater
.update(visibleRange
.getStartTime().getValue(), visibleRange
.getEndTime().getValue());
659 * Actions taken by the view to refresh its widget(s) with the updated data
664 * true: yes, false: partial update
666 @SuppressWarnings("deprecation")
667 protected void modelInputChanged(ILttngSyntEventRequest request
, boolean complete
) {
668 long experimentStartTime
= -1;
669 long experimentEndTime
= -1;
670 TmfTimeRange experimentTimeRange
= request
.getExperimentTimeRange();
671 if (experimentTimeRange
!= null) {
672 experimentStartTime
= experimentTimeRange
.getStartTime().getValue();
673 experimentEndTime
= experimentTimeRange
.getEndTime().getValue();
676 // Obtain the current resource list
677 ITmfTimeAnalysisEntry
[] itemArr
= getItemContainer().readItems();
679 if (itemArr
!= null) {
680 // Sort the array by pid
681 Arrays
.sort(itemArr
);
683 // Update the view part
684 displayModel(itemArr
, experimentStartTime
, experimentEndTime
, false, request
.getRange().getStartTime()
685 .getValue(), request
.getRange().getEndTime().getValue(), request
.getSource());
689 // reselect to original time
690 ParamsUpdater paramUpdater
= getParamsUpdater();
691 if ((paramUpdater
!= null) && (tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
692 final Long selTime
= paramUpdater
.getSelectedTime();
693 if (selTime
!= null) {
694 TraceDebug
.debug("View: " + getName() + "\n\t\tRestoring the selected time to: " + selTime
); //$NON-NLS-1$ //$NON-NLS-2$
695 Display display
= tsfviewer
.getControl().getDisplay();
696 display
.asyncExec(new Runnable() {
699 if ((tsfviewer
!= null) && (!tsfviewer
.getControl().isDisposed())) {
700 tsfviewer
.setSelectedTime(selTime
, false, this);
706 // System.out.println(System.currentTimeMillis() + ": AbsTimeUpdate (" + getName() + ") completed");
708 if (TraceDebug
.isDEBUG()) {
710 Long count
= request
.getSynEventCount();
711 for (int pos
= 0; pos
< itemArr
.length
; pos
++) {
712 eventCount
+= itemArr
[pos
].getTraceEvents().size();
715 int discarded
= paramUpdater
.getEventsDiscarded();
716 int discardedOutofOrder
= paramUpdater
.getEventsDiscardedWrongOrder();
717 int discardedOutofViewRange
= paramUpdater
.getEventsDiscardedOutOfViewRange();
718 int dicardedNotVisible
= paramUpdater
.getEventsDiscardedNotVisible();
720 TmfTimeRange range
= request
.getRange();
721 StringBuilder sb
= new StringBuilder("View: " + getName() + ", Events handled: " + count
//$NON-NLS-1$ //$NON-NLS-2$
722 + ", Events loaded in view: " + eventCount
+ ", Number of events discarded: " + discarded
//$NON-NLS-1$ //$NON-NLS-2$
723 + "\n\tNumber of events discarded with start time earlier than next good time: " //$NON-NLS-1$
724 + discardedOutofOrder
+ "\n\tDiscarded Not visible: " + dicardedNotVisible
//$NON-NLS-1$
725 + "\n\tDiscarded out of view Range: " + discardedOutofViewRange
); //$NON-NLS-1$
727 sb
.append("\n\t\tRequested Time Range: " + range
.getStartTime() + "-" + range
.getEndTime()); //$NON-NLS-1$ //$NON-NLS-2$
728 sb
.append("\n\t\tExperiment Time Range: " + experimentStartTime
+ "-" + experimentEndTime
); //$NON-NLS-1$ //$NON-NLS-2$
729 TraceDebug
.debug(sb
.toString());
737 // * Obtains the remainder fraction on unit Seconds of the entered value in
738 // * nanoseconds. e.g. input: 1241207054171080214 ns The number of seconds
740 // * be obtain by removing the last 9 digits: 1241207054 the fractional
741 // * portion of seconds, expressed in ns is: 171080214
746 // protected String formatNs(long v) {
747 // StringBuffer str = new StringBuffer();
748 // boolean neg = v < 0;
754 // String strVal = String.valueOf(v);
755 // if (v < 1000000000) {
759 // // Extract the last nine digits (e.g. fraction of a S expressed in ns
760 // return strVal.substring(strVal.length() - 9);
764 * The request was stopped, the data is incomplete
768 protected abstract void modelIncomplete(ILttngSyntEventRequest request
);
771 * Returns the Event processor instance related to a specific view
775 protected abstract ITransEventProcessor
getEventProcessor();
778 * To be overridden by some sub-classes although may not be needed in some
779 * e.g. statistics view
782 * @param startBoundTime
783 * @param endBoundTime
784 * @param updateTimeBounds
785 * - Time bounds updated needed e.g. if a new Experiment or trace
787 * @param startVisibleWindow
788 * @param endVisibleWindow
791 protected abstract void displayModel(final ITmfTimeAnalysisEntry
[] items
, final long startBoundTime
,
792 final long endBoundTime
, final boolean updateTimeBounds
, final long startVisibleWindow
,
793 final long endVisibleWindow
, final Object source
);
796 * To be overridden by some sub-classes although may not be needed in some
797 * e.g. statistics view
801 protected abstract ParamsUpdater
getParamsUpdater();
804 * Returns the model's item container
808 protected abstract ItemContainer
<?
> getItemContainer();
811 * Returns LTTng Synthetic Provider ID used for current view
815 protected abstract int getProviderId();