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