e26e717f54629546cab99df1441b17cec327358a
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / component / ITmfEventProvider.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2014 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.core.component;
14
15 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
16 import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
17 import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
18
19 /**
20 * This is the interface of the data providers in TMF. Data providers have the
21 * capability of handling data requests.
22 *
23 * @author Francois Chouinard
24 *
25 * @see TmfEventProvider
26 * @since 3.0
27 */
28 public interface ITmfEventProvider extends ITmfComponent {
29
30 /**
31 * Queue the request for processing.
32 *
33 * @param request The request to process
34 */
35 void sendRequest(ITmfEventRequest request);
36
37 /**
38 * Increments/decrements the pending requests counters and fires the request
39 * if necessary (counter == 0). Used for coalescing requests across multiple
40 * TmfDataProvider's.
41 *
42 * @param isIncrement
43 * Should we increment (true) or decrement (false) the pending
44 * counter
45 */
46 void notifyPendingRequest(boolean isIncrement);
47
48 /**
49 * Return the next event based on the context supplied. The context
50 * will be updated for the subsequent read.
51 *
52 * @param context the trace read context (updated)
53 * @return the event referred to by context
54 */
55 ITmfEvent getNext(ITmfContext context);
56 }
This page took 0.033139 seconds and 4 git commands to generate.