]>
Commit | Line | Data |
---|---|---|
494da23a TL |
1 | // Copyright (c) 2011-present, Facebook, Inc. All rights reserved. |
2 | // This source code is licensed under both the GPLv2 (found in the | |
3 | // COPYING file in the root directory) and Apache 2.0 License | |
4 | // (found in the LICENSE.Apache file in the root directory). | |
5 | ||
6 | package org.rocksdb; | |
7 | ||
8 | /** | |
9 | * TraceOptions is used for | |
10 | * {@link RocksDB#startTrace(TraceOptions, AbstractTraceWriter)}. | |
11 | */ | |
12 | public class TraceOptions { | |
13 | private final long maxTraceFileSize; | |
14 | ||
15 | public TraceOptions() { | |
1e59de90 | 16 | this.maxTraceFileSize = 64L * 1024L * 1024L * 1024L; // 64 GB |
494da23a TL |
17 | } |
18 | ||
19 | public TraceOptions(final long maxTraceFileSize) { | |
20 | this.maxTraceFileSize = maxTraceFileSize; | |
21 | } | |
22 | ||
23 | /** | |
1e59de90 TL |
24 | * To avoid the trace file size grows larger than the storage space, |
25 | * user can set the max trace file size in Bytes. Default is 64 GB. | |
494da23a TL |
26 | * |
27 | * @return the max trace size | |
28 | */ | |
29 | public long getMaxTraceFileSize() { | |
30 | return maxTraceFileSize; | |
31 | } | |
32 | } |