1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.trace
;
17 * <b><u>TmfContext</u></b>
19 * Trace context structure. It ties a trace location to an event rank. The
20 * context should be enough to restore the trace state so the corresponding
23 * Used to handle conflicting, concurrent accesses to the trace.
25 public class TmfContext
implements ITmfContext
, Cloneable
{
27 private ITmfLocation
<?
> fLocation
;
30 // ------------------------------------------------------------------------
32 // ------------------------------------------------------------------------
34 public TmfContext(ITmfLocation
<?
> loc
, long rank
) {
39 public TmfContext(ITmfLocation
<?
> location
) {
43 public TmfContext(TmfContext other
) {
44 this(other
.fLocation
, other
.fRank
);
47 protected TmfContext() {
51 // ------------------------------------------------------------------------
53 // ------------------------------------------------------------------------
56 public TmfContext
clone() {
58 return (TmfContext
) super.clone();
59 } catch (CloneNotSupportedException e
) {
65 // ------------------------------------------------------------------------
67 // ------------------------------------------------------------------------
69 public void setLocation(ITmfLocation
<?
> location
) {
73 public ITmfLocation
<?
> getLocation() {
77 public void setRank(long rank
) {
81 public long getRank() {
85 public void updateRank(int delta
) {