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