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