Commit | Line | Data |
---|---|---|
a52fde77 AM |
1 | /******************************************************************************* |
2 | * Copyright (c) 2012 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.tmf.core.statesystem.backend.historytree; | |
14 | ||
15 | import java.io.File; | |
16 | ||
17 | /** | |
18 | * Configuration object for a StateHistoryTree. | |
19 | * | |
20 | * @author alexmont | |
21 | * | |
22 | */ | |
23 | final class HTConfig { | |
24 | ||
25 | public final File stateFile; | |
26 | public final int blockSize; | |
27 | public final int maxChildren; | |
28 | public final long treeStart; | |
29 | ||
30 | HTConfig(File newStateFile, int blockSize, int maxChildren, long startTime) { | |
31 | this.stateFile = newStateFile; | |
32 | this.blockSize = blockSize; | |
33 | this.maxChildren = maxChildren; | |
34 | this.treeStart = startTime; | |
35 | } | |
36 | ||
37 | /** | |
38 | * Version using default values for blocksize and maxchildren | |
39 | * | |
40 | * @param stateFileName | |
41 | * @param startTime | |
42 | */ | |
43 | HTConfig(File newStateFile, long startTime) { | |
44 | this(newStateFile, 64 * 1024, 50, startTime); | |
45 | } | |
46 | } |