datastore: Add generic history tree
[deliverable/tracecompass.git] / statesystem / org.eclipse.tracecompass.datastore.core / src / org / eclipse / tracecompass / internal / provisional / datastore / core / interval / ISerializableObject.java
1 /*******************************************************************************
2 * Copyright (c) 2017 École Polytechnique de Montréal
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
10 package org.eclipse.tracecompass.internal.provisional.datastore.core.interval;
11
12 import org.eclipse.tracecompass.internal.provisional.datastore.core.serialization.ISafeByteBufferWriter;
13
14 /**
15 * An object that can be serialized
16 *
17 * @author Geneviève Bastien
18 */
19 public interface ISerializableObject {
20
21 /**
22 * Get the size on disk in bytes of an object
23 *
24 * @return the size occupied by this segment when stored in a Segment
25 * History Tree (in bytes)
26 */
27 int getSizeOnDisk();
28
29 /**
30 * Method to serialize an object to a safe byte buffer
31 *
32 * @param buffer
33 * The safe byte buffer to write to
34 */
35 void writeSegment(ISafeByteBufferWriter buffer);
36 }
This page took 0.030902 seconds and 5 git commands to generate.