blob: 4b53a3d6e03e1c64bf8a8c7a8c568488552de1a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*******************************************************************************
* Copyright (c) 2009, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Francois Chouinard - Initial API and implementation
* Francois Chouinard - Updated as per TMF Trace Model 1.0
* Patrick Tasse - Updated for removal of context clone
*******************************************************************************/
package org.eclipse.linuxtools.tmf.core.trace;
/**
* The basic trace context structure in TMF. The purpose of the context is to
* associate a trace location to an event at a specific rank (order).
* <p>
* The context should be sufficient to allow the trace to position itself so
* that performing a trace read operation will yield the corresponding 'nth'
* event.
*
* @version 1.0
* @author Francois Chouinard
*
* @see ITmfLocation
*/
public interface ITmfContext {
// ------------------------------------------------------------------------
// Constants
// ------------------------------------------------------------------------
/**
* The unknown event rank
*/
public long UNKNOWN_RANK = -1L;
// ------------------------------------------------------------------------
// Getters
// ------------------------------------------------------------------------
/**
* @return the rank of the event at the context location
*/
public long getRank();
/**
* @return the location of the event at the context rank
*/
public ITmfLocation getLocation();
/**
* @return indicates if the context rank is valid (!= UNKNOWN_RANK)
*/
public boolean hasValidRank();
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
/**
* @param location the new location
*/
public void setLocation(ITmfLocation location);
/**
* @param rank the new rank
*/
public void setRank(long rank);
/**
* Increment the context rank
*/
public void increaseRank();
/**
* Cleanup hook
*/
public void dispose();
}
|