Add Iterator support to TMF traces
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / component / ITmfDataProvider.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010, 2012 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.ITmfRequest;
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 * @version 2.0
25 * @since 2.0
26 *
27 * @see TmfDataProvider
28 * @see TmfEventProvider
29 */
30 public interface ITmfDataProvider extends ITmfComponent {
31
32 /**
33 * Queue the request for processing.
34 *
35 * @param request The request to process
36 */
37 public void sendRequest(ITmfRequest request);
38
39 /**
40 * Queue the coalesced requests.
41 */
42 public void fireRequest();
43
44 /**
45 * Increments/decrements the pending requests counters and fires the request
46 * if necessary (counter == 0). Used for coalescing requests across multiple
47 * TmfDataProvider's.
48 *
49 * @param isIncrement
50 * Should we increment (true) or decrement (false) the pending
51 * counter
52 */
53 public void notifyPendingRequest(boolean isIncrement);
54
55 /**
56 * Return the next event based on the context supplied. The context
57 * will be updated for the subsequent read.
58 *
59 * @param context the trace read context (updated)
60 * @return the event referred to by context
61 */
62 public ITmfEvent getNext(ITmfContext context);
63
64 }
This page took 0.03094 seconds and 5 git commands to generate.