Commit | Line | Data |
---|---|---|
e73a4ba5 GB |
1 | /******************************************************************************* |
2 | * Copyright (c) 2013 École Polytechnique de Montréal | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are made | |
5 | * 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 | * Geneviève Bastien - Initial implementation | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.core.signal; |
e73a4ba5 | 14 | |
2bdf0193 | 15 | import org.eclipse.tracecompass.tmf.core.synchronization.SynchronizationAlgorithm; |
e73a4ba5 GB |
16 | |
17 | /** | |
18 | * Signal indicating a trace synchronization has been done | |
19 | * | |
20 | * @author Geneviève Bastien | |
21 | * @since 3.0 | |
22 | */ | |
23 | public class TmfTraceSynchronizedSignal extends TmfSignal { | |
24 | ||
25 | private final SynchronizationAlgorithm fAlgoSync; | |
26 | ||
27 | /** | |
28 | * Constructor | |
29 | * | |
30 | * @param source | |
31 | * Object sending this signal | |
32 | * @param algoSync | |
33 | * The synchronization algorithm used | |
34 | */ | |
35 | public TmfTraceSynchronizedSignal(Object source, SynchronizationAlgorithm algoSync) { | |
36 | super(source); | |
37 | fAlgoSync = algoSync; | |
38 | } | |
39 | ||
40 | /** | |
41 | * Synchronization algorithm getter | |
42 | * | |
43 | * @return The algorithm object | |
44 | */ | |
45 | public SynchronizationAlgorithm getSyncAlgo() { | |
46 | return fAlgoSync; | |
47 | } | |
48 | ||
49 | @Override | |
50 | public String toString() { | |
51 | return "[" + getClass().getSimpleName() + " (" + fAlgoSync.toString() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ | |
52 | } | |
53 | } |