1 /*******************************************************************************
2 * Copyright (c) 2009, 2010, 2012 Ericsson
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
10 * Francois Chouinard - Initial API and implementation
11 * Francois Chouinard - Updated as per TMF Trace Model 1.0
12 *******************************************************************************/
14 package org
.eclipse
.linuxtools
.tmf
.core
.trace
;
17 * <b><u>ITmfContext</u></b>
19 * The basic trace context structure in TMF. The purpose of the context is to
20 * associate a trace location to an event of a specific rank (order).
22 * The context should be sufficient to allow the trace to position itself so
23 * that performing a trace read operation will yield the corresponding event.
25 public interface ITmfContext
extends Cloneable
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
32 * The initial context event rank, before anything is read from the trace
34 public long INITIAL_RANK
= -1L;
37 * The unknown event rank
39 public long UNKNOWN_RANK
= -2L;
41 // ------------------------------------------------------------------------
43 // ------------------------------------------------------------------------
46 * @return the rank of the event referred to by the context
48 public long getRank();
51 * @return the location of the event referred to by the context
53 public ITmfLocation
<?
extends Comparable
<?
>> getLocation();
56 * @return indicates if the context rank is valid (!= UNKNOWN_RANK)
58 public boolean hasValidRank();
60 // ------------------------------------------------------------------------
62 // ------------------------------------------------------------------------
65 * @param location the new location
67 public void setLocation(ITmfLocation
<?
extends Comparable
<?
>> location
);
70 * @param rank the new rank
72 public void setRank(long rank
);
75 * Increment the context rank
77 public void increaseRank();
82 public void dispose();
84 // ------------------------------------------------------------------------
86 // ------------------------------------------------------------------------
89 * @return a clone of the context
91 public ITmfContext
clone();
This page took 0.03308 seconds and 6 git commands to generate.