tmf: Use tabs in statistics view for each traces
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.core / src / org / eclipse / linuxtools / internal / lttng / core / request / LttngBaseEventRequest.java
1 /*******************************************************************************
2 * Copyright (c) 2010 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 * Marc Dumais (marc.dumais@ericsson.com) - Fix for 316455 (first part)
12 *******************************************************************************/
13 package org.eclipse.linuxtools.internal.lttng.core.request;
14
15 import org.eclipse.linuxtools.internal.lttng.core.event.LttngEvent;
16 import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
17 import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
18 import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest;
19 import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
20 import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
21
22 /**
23 * This class is an extension of Tmf Event Request which includes specific
24 * references i.e. a status listener to indicate the start and end of the
25 * request
26 *
27 * @author alvaro
28 *
29 */
30 public abstract class LttngBaseEventRequest extends TmfEventRequest {
31
32 // ========================================================================
33 // Data
34 // =======================================================================
35 private long numOfEvents = 0;
36 private boolean clearDataInd = false;
37 /**
38 * The time to send events to the application as requested, Note: The start
39 * time of the request for base events is adjusted to the nearest check
40 * point
41 */
42 private final ITmfTimestamp fDispatchTime;
43
44 // ========================================================================
45 // Constructors
46 // =======================================================================
47 /**
48 * @param range
49 * @param dispatchTime
50 * @param offset
51 * @param nbEvents
52 * @param maxBlockSize
53 * @param traceState
54 * @param listener
55 */
56 public LttngBaseEventRequest(TmfTimeRange range, ITmfTimestamp dispatchTime, long offset, int nbEvents,
57 int maxBlockSize, ITmfDataRequest.ExecutionType execType) {
58 super(LttngEvent.class, range, (int) offset, nbEvents, maxBlockSize, execType);
59 fDispatchTime = dispatchTime;
60 }
61
62 @Override
63 public void cancel() {
64 super.cancel();
65 }
66
67 // ========================================================================
68 // Methods
69 // =======================================================================
70
71 /**
72 * Trigger the start to process this request right after the notification to
73 * the interested listeners
74 *
75 * @param experiment
76 * @param broadcast
77 * true: All views, false: only to registered listeners
78 */
79 public void startRequestInd(TmfExperiment experiment,
80 boolean broadcast) {
81 // trigger the start to process this request
82 experiment.sendRequest(this);
83 }
84
85 /**
86 * @param numOfEvents
87 * the numOfEvents to set
88 */
89 public void setNumOfEvents(long numOfEvents) {
90 this.numOfEvents = numOfEvents;
91 }
92
93 /**
94 * @return the numOfEvents
95 */
96 public long getNumOfEvents() {
97 return numOfEvents;
98 }
99
100 /**
101 * @param clearAllData
102 * indicates the need to clear all previous data e.g. a new
103 * experiment selection
104 */
105 public void setclearDataInd(boolean clearAllData) {
106 this.clearDataInd = clearAllData;
107 }
108
109 /**
110 * Returns indication - clearing of all existing data model is required e.g
111 * from the selection of a new experiment
112 *
113 * @return
114 */
115 public boolean isclearDataInd() {
116 return clearDataInd;
117 }
118
119 /**
120 * @return The time to start dispatching events to the application
121 */
122 public ITmfTimestamp getDispatchTime() {
123 return fDispatchTime;
124 }
125
126 }
This page took 0.042245 seconds and 5 git commands to generate.