Commit | Line | Data |
---|---|---|
e73a4ba5 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2013, 2014 École Polytechnique de Montréal |
e73a4ba5 GB |
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 and API | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.core.event.matching; |
e73a4ba5 | 14 | |
27213c57 AM |
15 | import java.util.Collection; |
16 | ||
2bdf0193 | 17 | import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; |
e73a4ba5 GB |
18 | |
19 | /** | |
20 | * This class represent an action to be done when event matches are found. This | |
21 | * interface needs to be implemented by all classes that want to be warned when | |
22 | * new event matches are found. They need to register to an instance of | |
23 | * TmfEventMatches class in order to be informed of matches. | |
24 | * | |
25 | * @author Geneviève Bastien | |
26 | * @since 3.0 | |
27 | */ | |
28 | public interface IMatchProcessingUnit { | |
29 | ||
30 | /** | |
31 | * Once the traces are known, hook function to initialize some things | |
32 | * | |
33 | * @param fTraces the set of traces that will be synchronized | |
34 | */ | |
27213c57 | 35 | void init(Collection<ITmfTrace> fTraces); |
e73a4ba5 GB |
36 | |
37 | /** | |
38 | * Function called when a match is found | |
39 | * | |
40 | * @param match | |
41 | * The event match | |
42 | */ | |
43 | void addMatch(TmfEventDependency match); | |
44 | ||
45 | /** | |
46 | * Function called after all matching has been done, to do any post-match | |
47 | * treatment | |
48 | */ | |
49 | void matchingEnded(); | |
50 | ||
51 | /** | |
52 | * Counts the matches | |
53 | * | |
54 | * @return the number of matches | |
55 | */ | |
56 | int countMatches(); | |
57 | ||
58 | } |