tmf: Avoid HistoryTree to expose its internal HT_IO node.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / internal / tmf / core / statesystem / backends / historytree / HTConfig.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
5 *
6 * All rights reserved. This program and the accompanying materials are
7 * made available under the terms of the Eclipse Public License v1.0 which
8 * accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
10 *
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.internal.tmf.core.statesystem.backends.historytree;
14
15 import java.io.File;
16
17 /**
18 * Configuration object for a StateHistoryTree.
19 *
20 * @author alexmont
21 */
22 final class HTConfig {
23
24 private static final int DEFAULT_BLOCKSIZE = 64 * 1024;
25 private static final int DEFAULT_MAXCHILDREN = 50;
26
27 private final File stateFile;
28 private final int blockSize;
29 private final int maxChildren;
30 private final int providerVersion;
31 private final long treeStart;
32
33 HTConfig(File newStateFile, int blockSize, int maxChildren,
34 int providerVersion, long startTime) {
35 this.stateFile = newStateFile;
36 this.blockSize = blockSize;
37 this.maxChildren = maxChildren;
38 this.providerVersion = providerVersion;
39 this.treeStart = startTime;
40 }
41
42 /**
43 * Version using default values for blocksize and maxchildren
44 *
45 * @param stateFileName
46 * @param startTime
47 */
48 HTConfig(File newStateFile, int providerVersion, long startTime) {
49 this(newStateFile, DEFAULT_BLOCKSIZE, DEFAULT_MAXCHILDREN, providerVersion, startTime);
50 }
51
52 // ------------------------------------------------------------------------
53 // Getters
54 // ------------------------------------------------------------------------
55
56 public File getStateFile() {
57 return stateFile;
58 }
59
60 public int getBlockSize() {
61 return blockSize;
62 }
63
64 public int getMaxChildren() {
65 return maxChildren;
66 }
67
68 public int getProviderVersion() {
69 return providerVersion;
70 }
71
72 public long getTreeStart() {
73 return treeStart;
74 }
75 }
This page took 0.035072 seconds and 5 git commands to generate.