1 /*******************************************************************************
2 * Copyright (c) 2012 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 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.core
.signal
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.statistics
.ITmfStatistics
;
18 import org
.eclipse
.linuxtools
.tmf
.core
.trace
.ITmfTrace
;
21 * Signal sent when a call to {@link ITmfStatistics#updateStats} has completed.
23 * @author Alexandre Montplaisir
27 public class TmfStatsUpdatedSignal
extends TmfSignal
{
29 private final ITmfTrace trace
;
30 private final boolean isGlobal
;
31 private final long eventTotal
;
32 private final Map
<String
, Long
> eventsPerType
;
38 * Object sending this signal
40 * The trace for which we track the statistics
42 * Is this a global query (whole range of the trace), or not
44 * The total number of events. This should be equal to the sum of
45 * the values in eventsPerType.
46 * @param eventsPerType
47 * The map representing the number of events of each type
51 public TmfStatsUpdatedSignal(Object source
, ITmfTrace trace
, boolean isGlobal
,
52 long eventTotal
, Map
<String
, Long
> eventsPerType
) {
55 this.isGlobal
= isGlobal
;
56 this.eventTotal
= eventTotal
;
57 this.eventsPerType
= eventsPerType
;
61 * @return The trace referred to by this signal
63 public ITmfTrace
getTrace() {
68 * @return True if it's a global query, false if it's for the current time
71 public boolean isGlobal() {
76 * @return The total number of events for this query
78 public long getEventTotal() {
83 * @return The map representing the number of events per type for this query
85 public Map
<String
, Long
> getEventsPerType() {
90 public String
toString() {
91 return "[TmfStatsUpdatedSignal (trace = " + trace
.toString() + //$NON-NLS-1$
92 ", total = " + eventTotal
+ ")]"; //$NON-NLS-1$ //$NON-NLS-2$
This page took 0.033177 seconds and 5 git commands to generate.