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 TraceOptions()15 public TraceOptions() { 16 this.maxTraceFileSize = 64 * 1024 * 1024 * 1024; // 64 GB 17 } 18 TraceOptions(final long maxTraceFileSize)19 public TraceOptions(final long maxTraceFileSize) { 20 this.maxTraceFileSize = maxTraceFileSize; 21 } 22 23 /** 24 * To avoid the trace file size grows large than the storage space, 25 * user can set the max trace file size in Bytes. Default is 64GB 26 * 27 * @return the max trace size 28 */ getMaxTraceFileSize()29 public long getMaxTraceFileSize() { 30 return maxTraceFileSize; 31 } 32 } 33