Remove all existing @since annotations
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / trace / indexer / checkpoint / ITmfCheckpoint.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2014 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 * Patrick Tasse - Updated for location in checkpoint
12 *******************************************************************************/
13
14 package org.eclipse.tracecompass.tmf.core.trace.indexer.checkpoint;
15
16 import java.nio.ByteBuffer;
17
18 import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
19 import org.eclipse.tracecompass.tmf.core.trace.location.ITmfLocation;
20
21 /**
22 * The basic trace checkpoint structure in TMF. The purpose of the checkpoint is
23 * to associate a trace location to an event timestamp.
24 * *
25 * @see ITmfTimestamp
26 * @see ITmfLocation
27 *
28 * @author Francois Chouinard
29 */
30 public interface ITmfCheckpoint extends Comparable<ITmfCheckpoint> {
31
32 // ------------------------------------------------------------------------
33 // Getters
34 // ------------------------------------------------------------------------
35
36 /**
37 * The maximum size of the serialize buffer when determining the checkpoint
38 * size
39 */
40 static final int MAX_SERIALIZE_SIZE = 1024;
41
42 /**
43 * @return the timestamp of the event referred to by the context
44 */
45 ITmfTimestamp getTimestamp();
46
47 /**
48 * @return the location of the event referred to by the checkpoint
49 */
50 ITmfLocation getLocation();
51
52 // ------------------------------------------------------------------------
53 // Comparable
54 // ------------------------------------------------------------------------
55
56 @Override
57 int compareTo(ITmfCheckpoint checkpoint);
58
59 /**
60 * Returns the checkpoint rank for this checkpoint. The checkpoint rank can
61 * be seen as the index of the checkpoint in the order it was added.
62 *
63 * @return the checkpoint rank for this checkpoint
64 */
65 long getCheckpointRank();
66
67 /**
68 * Write the checkpoint to the ByteBuffer so that it can be saved to disk.
69 *
70 * @param bufferOut
71 * the buffer to write to
72 */
73 void serialize(ByteBuffer bufferOut);
74 }
This page took 0.032902 seconds and 5 git commands to generate.