tmf: Update copyright headers in tmf.core
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / trace / ITmfContext.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2013 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 * Francois Chouinard - Updated as per TMF Trace Model 1.0
12 * Patrick Tasse - Updated for removal of context clone
13 *******************************************************************************/
14
15 package org.eclipse.linuxtools.tmf.core.trace;
16
17 /**
18 * The basic trace context structure in TMF. The purpose of the context is to
19 * associate a trace location to an event at a specific rank (order).
20 * <p>
21 * The context should be sufficient to allow the trace to position itself so
22 * that performing a trace read operation will yield the corresponding 'nth'
23 * event.
24 *
25 * @version 1.0
26 * @author Francois Chouinard
27 *
28 * @see ITmfLocation
29 */
30 public interface ITmfContext {
31
32 // ------------------------------------------------------------------------
33 // Constants
34 // ------------------------------------------------------------------------
35
36 /**
37 * The unknown event rank
38 */
39 public long UNKNOWN_RANK = -1L;
40
41 // ------------------------------------------------------------------------
42 // Getters
43 // ------------------------------------------------------------------------
44
45 /**
46 * @return the rank of the event at the context location
47 */
48 public long getRank();
49
50 /**
51 * @return the location of the event at the context rank
52 */
53 public ITmfLocation getLocation();
54
55 /**
56 * @return indicates if the context rank is valid (!= UNKNOWN_RANK)
57 */
58 public boolean hasValidRank();
59
60 // ------------------------------------------------------------------------
61 // Operations
62 // ------------------------------------------------------------------------
63
64 /**
65 * @param location the new location
66 */
67 public void setLocation(ITmfLocation location);
68
69 /**
70 * @param rank the new rank
71 */
72 public void setRank(long rank);
73
74 /**
75 * Increment the context rank
76 */
77 public void increaseRank();
78
79 /**
80 * Cleanup hook
81 */
82 public void dispose();
83
84 }
This page took 0.032071 seconds and 5 git commands to generate.