Move alltests plugin to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / linuxtools / tmf / core / trace / indexer / checkpoint / ITmfCheckpoint.java
CommitLineData
5d837f9b 1/*******************************************************************************
ea271da6 2 * Copyright (c) 2012, 2013 Ericsson
1e1bef82 3 *
5d837f9b
FC
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
1e1bef82 8 *
5d837f9b
FC
9 * Contributors:
10 * Francois Chouinard - Initial API and implementation
ea271da6 11 * Patrick Tasse - Updated for location in checkpoint
5d837f9b
FC
12 *******************************************************************************/
13
a3db8436 14package org.eclipse.linuxtools.tmf.core.trace.indexer.checkpoint;
5d837f9b 15
032ecd45
MAL
16import java.nio.ByteBuffer;
17
3bd46eef 18import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
a3db8436 19import org.eclipse.linuxtools.tmf.core.trace.location.ITmfLocation;
5d837f9b
FC
20
21/**
5d837f9b
FC
22 * The basic trace checkpoint structure in TMF. The purpose of the checkpoint is
23 * to associate a trace location to an event timestamp.
a3db8436 24 * *
f7703ed6
FC
25 * @see ITmfTimestamp
26 * @see ITmfLocation
a3db8436
AM
27 *
28 * @author Francois Chouinard
29 * @since 3.0
5d837f9b 30 */
0316808c 31public interface ITmfCheckpoint extends Comparable<ITmfCheckpoint> {
5d837f9b
FC
32
33 // ------------------------------------------------------------------------
34 // Getters
35 // ------------------------------------------------------------------------
36
032ecd45
MAL
37 /**
38 * The maximum size of the serialize buffer when determining the checkpoint
39 * size
40 */
41 static final int MAX_SERIALIZE_SIZE = 1024;
42
5d837f9b 43 /**
3bd46eef
AM
44 * @return the timestamp of the event referred to by the context
45 * @since 2.0
5d837f9b 46 */
57a2a5ca 47 ITmfTimestamp getTimestamp();
5d837f9b 48
d905a64a 49 /**
ea271da6 50 * @return the location of the event referred to by the checkpoint
5d837f9b 51 */
57a2a5ca 52 ITmfLocation getLocation();
5d837f9b 53
5d837f9b
FC
54 // ------------------------------------------------------------------------
55 // Comparable
56 // ------------------------------------------------------------------------
57
5d837f9b 58 @Override
57a2a5ca 59 int compareTo(ITmfCheckpoint checkpoint);
5d837f9b 60
032ecd45
MAL
61 /**
62 * Returns the checkpoint rank for this checkpoint. The checkpoint rank can
63 * be seen as the index of the checkpoint in the order it was added.
64 *
65 * @return the checkpoint rank for this checkpoint
66 * @since 3.0
67 */
68 long getCheckpointRank();
69
70 /**
71 * Write the checkpoint to the ByteBuffer so that it can be saved to disk.
72 *
73 * @param bufferOut
74 * the buffer to write to
75 *
76 * @since 3.0
77 */
78 void serialize(ByteBuffer bufferOut);
5d837f9b 79}
This page took 0.082289 seconds and 5 git commands to generate.