ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / signal / TmfTraceUpdatedSignal.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2013 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 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.signal;
14
15 import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
16 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
17
18 /**
19 * Signal indicating a trace has been updated.
20 *
21 * The trace has been indexed up to the specified range.
22 *
23 * @version 1.0
24 * @author Francois Chouinard
25 */
26 public class TmfTraceUpdatedSignal extends TmfSignal {
27
28 private final ITmfTrace fTrace;
29 private final TmfTimeRange fTimeRange;
30 private final long fNbEvents;
31
32 /**
33 * Constructor
34 *
35 * @param source
36 * Object sending this signal
37 * @param trace
38 * The trace that was updated
39 * @param range
40 * The new time range of the trace
41 * @param nbEvents
42 * The number of events in the trace
43 * @since 3.0
44 */
45 public TmfTraceUpdatedSignal(Object source, ITmfTrace trace, TmfTimeRange range, long nbEvents) {
46 super(source);
47 fTrace = trace;
48 fTimeRange = range;
49 fNbEvents = nbEvents;
50 }
51
52 /**
53 * @return The trace referred to by this signal
54 */
55 public ITmfTrace getTrace() {
56 return fTrace;
57 }
58
59 /**
60 * @return The time range indicated by this signal
61 * @since 2.0
62 */
63 public TmfTimeRange getRange() {
64 return fTimeRange;
65 }
66
67 /**
68 * Returns the number of events indicated by this signal
69 *
70 * @return the number of events indicated by this signal
71 * @since 3.0
72 */
73 public long getNbEvents() {
74 return fNbEvents;
75 }
76
77 @Override
78 @SuppressWarnings("nls")
79 public String toString() {
80 return "[TmfTraceUpdatedSignal (" + fTrace.toString() + ", "
81 + fTimeRange.toString() + ")]";
82 }
83
84 }
This page took 0.043725 seconds and 5 git commands to generate.