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 import java.nio.file.Paths; 9 import java.util.ArrayList; 10 import java.util.Collection; 11 import java.util.Collections; 12 import java.util.List; 13 14 /** 15 * Options to control the behavior of a database. It will be used 16 * during the creation of a {@link org.rocksdb.RocksDB} (i.e., RocksDB.open()). 17 * 18 * If {@link #dispose()} function is not called, then it will be GC'd 19 * automatically and native resources will be released as part of the process. 20 */ 21 public class Options extends RocksObject 22 implements DBOptionsInterface<Options>, 23 MutableDBOptionsInterface<Options>, 24 ColumnFamilyOptionsInterface<Options>, 25 MutableColumnFamilyOptionsInterface<Options> { 26 static { RocksDB.loadLibrary()27 RocksDB.loadLibrary(); 28 } 29 30 /** 31 * Construct options for opening a RocksDB. 32 * 33 * This constructor will create (by allocating a block of memory) 34 * an {@code rocksdb::Options} in the c++ side. 35 */ Options()36 public Options() { 37 super(newOptions()); 38 env_ = Env.getDefault(); 39 } 40 41 /** 42 * Construct options for opening a RocksDB. Reusing database options 43 * and column family options. 44 * 45 * @param dbOptions {@link org.rocksdb.DBOptions} instance 46 * @param columnFamilyOptions {@link org.rocksdb.ColumnFamilyOptions} 47 * instance 48 */ Options(final DBOptions dbOptions, final ColumnFamilyOptions columnFamilyOptions)49 public Options(final DBOptions dbOptions, 50 final ColumnFamilyOptions columnFamilyOptions) { 51 super(newOptions(dbOptions.nativeHandle_, 52 columnFamilyOptions.nativeHandle_)); 53 env_ = Env.getDefault(); 54 } 55 56 /** 57 * Copy constructor for ColumnFamilyOptions. 58 * 59 * NOTE: This does a shallow copy, which means comparator, merge_operator 60 * and other pointers will be cloned! 61 * 62 * @param other The Options to copy. 63 */ Options(Options other)64 public Options(Options other) { 65 super(copyOptions(other.nativeHandle_)); 66 this.env_ = other.env_; 67 this.memTableConfig_ = other.memTableConfig_; 68 this.tableFormatConfig_ = other.tableFormatConfig_; 69 this.rateLimiter_ = other.rateLimiter_; 70 this.comparator_ = other.comparator_; 71 this.compactionFilter_ = other.compactionFilter_; 72 this.compactionFilterFactory_ = other.compactionFilterFactory_; 73 this.compactionOptionsUniversal_ = other.compactionOptionsUniversal_; 74 this.compactionOptionsFIFO_ = other.compactionOptionsFIFO_; 75 this.compressionOptions_ = other.compressionOptions_; 76 this.rowCache_ = other.rowCache_; 77 this.writeBufferManager_ = other.writeBufferManager_; 78 } 79 80 @Override setIncreaseParallelism(final int totalThreads)81 public Options setIncreaseParallelism(final int totalThreads) { 82 assert(isOwningHandle()); 83 setIncreaseParallelism(nativeHandle_, totalThreads); 84 return this; 85 } 86 87 @Override setCreateIfMissing(final boolean flag)88 public Options setCreateIfMissing(final boolean flag) { 89 assert(isOwningHandle()); 90 setCreateIfMissing(nativeHandle_, flag); 91 return this; 92 } 93 94 @Override setCreateMissingColumnFamilies(final boolean flag)95 public Options setCreateMissingColumnFamilies(final boolean flag) { 96 assert(isOwningHandle()); 97 setCreateMissingColumnFamilies(nativeHandle_, flag); 98 return this; 99 } 100 101 @Override setEnv(final Env env)102 public Options setEnv(final Env env) { 103 assert(isOwningHandle()); 104 setEnv(nativeHandle_, env.nativeHandle_); 105 env_ = env; 106 return this; 107 } 108 109 @Override getEnv()110 public Env getEnv() { 111 return env_; 112 } 113 114 /** 115 * <p>Set appropriate parameters for bulk loading. 116 * The reason that this is a function that returns "this" instead of a 117 * constructor is to enable chaining of multiple similar calls in the future. 118 * </p> 119 * 120 * <p>All data will be in level 0 without any automatic compaction. 121 * It's recommended to manually call CompactRange(NULL, NULL) before reading 122 * from the database, because otherwise the read can be very slow.</p> 123 * 124 * @return the instance of the current Options. 125 */ prepareForBulkLoad()126 public Options prepareForBulkLoad() { 127 prepareForBulkLoad(nativeHandle_); 128 return this; 129 } 130 131 @Override createIfMissing()132 public boolean createIfMissing() { 133 assert(isOwningHandle()); 134 return createIfMissing(nativeHandle_); 135 } 136 137 @Override createMissingColumnFamilies()138 public boolean createMissingColumnFamilies() { 139 assert(isOwningHandle()); 140 return createMissingColumnFamilies(nativeHandle_); 141 } 142 143 @Override optimizeForSmallDb()144 public Options optimizeForSmallDb() { 145 optimizeForSmallDb(nativeHandle_); 146 return this; 147 } 148 149 @Override optimizeForPointLookup( long blockCacheSizeMb)150 public Options optimizeForPointLookup( 151 long blockCacheSizeMb) { 152 optimizeForPointLookup(nativeHandle_, 153 blockCacheSizeMb); 154 return this; 155 } 156 157 @Override optimizeLevelStyleCompaction()158 public Options optimizeLevelStyleCompaction() { 159 optimizeLevelStyleCompaction(nativeHandle_, 160 DEFAULT_COMPACTION_MEMTABLE_MEMORY_BUDGET); 161 return this; 162 } 163 164 @Override optimizeLevelStyleCompaction( long memtableMemoryBudget)165 public Options optimizeLevelStyleCompaction( 166 long memtableMemoryBudget) { 167 optimizeLevelStyleCompaction(nativeHandle_, 168 memtableMemoryBudget); 169 return this; 170 } 171 172 @Override optimizeUniversalStyleCompaction()173 public Options optimizeUniversalStyleCompaction() { 174 optimizeUniversalStyleCompaction(nativeHandle_, 175 DEFAULT_COMPACTION_MEMTABLE_MEMORY_BUDGET); 176 return this; 177 } 178 179 @Override optimizeUniversalStyleCompaction( final long memtableMemoryBudget)180 public Options optimizeUniversalStyleCompaction( 181 final long memtableMemoryBudget) { 182 optimizeUniversalStyleCompaction(nativeHandle_, 183 memtableMemoryBudget); 184 return this; 185 } 186 187 @Override setComparator(final BuiltinComparator builtinComparator)188 public Options setComparator(final BuiltinComparator builtinComparator) { 189 assert(isOwningHandle()); 190 setComparatorHandle(nativeHandle_, builtinComparator.ordinal()); 191 return this; 192 } 193 194 @Override setComparator( final AbstractComparator comparator)195 public Options setComparator( 196 final AbstractComparator comparator) { 197 assert(isOwningHandle()); 198 setComparatorHandle(nativeHandle_, comparator.nativeHandle_, 199 comparator.getComparatorType().getValue()); 200 comparator_ = comparator; 201 return this; 202 } 203 204 @Override setMergeOperatorName(final String name)205 public Options setMergeOperatorName(final String name) { 206 assert(isOwningHandle()); 207 if (name == null) { 208 throw new IllegalArgumentException( 209 "Merge operator name must not be null."); 210 } 211 setMergeOperatorName(nativeHandle_, name); 212 return this; 213 } 214 215 @Override setMergeOperator(final MergeOperator mergeOperator)216 public Options setMergeOperator(final MergeOperator mergeOperator) { 217 setMergeOperator(nativeHandle_, mergeOperator.nativeHandle_); 218 return this; 219 } 220 221 @Override setCompactionFilter( final AbstractCompactionFilter<? extends AbstractSlice<?>> compactionFilter)222 public Options setCompactionFilter( 223 final AbstractCompactionFilter<? extends AbstractSlice<?>> 224 compactionFilter) { 225 setCompactionFilterHandle(nativeHandle_, compactionFilter.nativeHandle_); 226 compactionFilter_ = compactionFilter; 227 return this; 228 } 229 230 @Override compactionFilter()231 public AbstractCompactionFilter<? extends AbstractSlice<?>> compactionFilter() { 232 assert (isOwningHandle()); 233 return compactionFilter_; 234 } 235 236 @Override setCompactionFilterFactory(final AbstractCompactionFilterFactory<? extends AbstractCompactionFilter<?>> compactionFilterFactory)237 public Options setCompactionFilterFactory(final AbstractCompactionFilterFactory<? extends AbstractCompactionFilter<?>> compactionFilterFactory) { 238 assert (isOwningHandle()); 239 setCompactionFilterFactoryHandle(nativeHandle_, compactionFilterFactory.nativeHandle_); 240 compactionFilterFactory_ = compactionFilterFactory; 241 return this; 242 } 243 244 @Override compactionFilterFactory()245 public AbstractCompactionFilterFactory<? extends AbstractCompactionFilter<?>> compactionFilterFactory() { 246 assert (isOwningHandle()); 247 return compactionFilterFactory_; 248 } 249 250 @Override setWriteBufferSize(final long writeBufferSize)251 public Options setWriteBufferSize(final long writeBufferSize) { 252 assert(isOwningHandle()); 253 setWriteBufferSize(nativeHandle_, writeBufferSize); 254 return this; 255 } 256 257 @Override writeBufferSize()258 public long writeBufferSize() { 259 assert(isOwningHandle()); 260 return writeBufferSize(nativeHandle_); 261 } 262 263 @Override setMaxWriteBufferNumber(final int maxWriteBufferNumber)264 public Options setMaxWriteBufferNumber(final int maxWriteBufferNumber) { 265 assert(isOwningHandle()); 266 setMaxWriteBufferNumber(nativeHandle_, maxWriteBufferNumber); 267 return this; 268 } 269 270 @Override maxWriteBufferNumber()271 public int maxWriteBufferNumber() { 272 assert(isOwningHandle()); 273 return maxWriteBufferNumber(nativeHandle_); 274 } 275 276 @Override errorIfExists()277 public boolean errorIfExists() { 278 assert(isOwningHandle()); 279 return errorIfExists(nativeHandle_); 280 } 281 282 @Override setErrorIfExists(final boolean errorIfExists)283 public Options setErrorIfExists(final boolean errorIfExists) { 284 assert(isOwningHandle()); 285 setErrorIfExists(nativeHandle_, errorIfExists); 286 return this; 287 } 288 289 @Override paranoidChecks()290 public boolean paranoidChecks() { 291 assert(isOwningHandle()); 292 return paranoidChecks(nativeHandle_); 293 } 294 295 @Override setParanoidChecks(final boolean paranoidChecks)296 public Options setParanoidChecks(final boolean paranoidChecks) { 297 assert(isOwningHandle()); 298 setParanoidChecks(nativeHandle_, paranoidChecks); 299 return this; 300 } 301 302 @Override maxOpenFiles()303 public int maxOpenFiles() { 304 assert(isOwningHandle()); 305 return maxOpenFiles(nativeHandle_); 306 } 307 308 @Override setMaxFileOpeningThreads(final int maxFileOpeningThreads)309 public Options setMaxFileOpeningThreads(final int maxFileOpeningThreads) { 310 assert(isOwningHandle()); 311 setMaxFileOpeningThreads(nativeHandle_, maxFileOpeningThreads); 312 return this; 313 } 314 315 @Override maxFileOpeningThreads()316 public int maxFileOpeningThreads() { 317 assert(isOwningHandle()); 318 return maxFileOpeningThreads(nativeHandle_); 319 } 320 321 @Override setMaxTotalWalSize(final long maxTotalWalSize)322 public Options setMaxTotalWalSize(final long maxTotalWalSize) { 323 assert(isOwningHandle()); 324 setMaxTotalWalSize(nativeHandle_, maxTotalWalSize); 325 return this; 326 } 327 328 @Override maxTotalWalSize()329 public long maxTotalWalSize() { 330 assert(isOwningHandle()); 331 return maxTotalWalSize(nativeHandle_); 332 } 333 334 @Override setMaxOpenFiles(final int maxOpenFiles)335 public Options setMaxOpenFiles(final int maxOpenFiles) { 336 assert(isOwningHandle()); 337 setMaxOpenFiles(nativeHandle_, maxOpenFiles); 338 return this; 339 } 340 341 @Override useFsync()342 public boolean useFsync() { 343 assert(isOwningHandle()); 344 return useFsync(nativeHandle_); 345 } 346 347 @Override setUseFsync(final boolean useFsync)348 public Options setUseFsync(final boolean useFsync) { 349 assert(isOwningHandle()); 350 setUseFsync(nativeHandle_, useFsync); 351 return this; 352 } 353 354 @Override setDbPaths(final Collection<DbPath> dbPaths)355 public Options setDbPaths(final Collection<DbPath> dbPaths) { 356 assert(isOwningHandle()); 357 358 final int len = dbPaths.size(); 359 final String paths[] = new String[len]; 360 final long targetSizes[] = new long[len]; 361 362 int i = 0; 363 for(final DbPath dbPath : dbPaths) { 364 paths[i] = dbPath.path.toString(); 365 targetSizes[i] = dbPath.targetSize; 366 i++; 367 } 368 setDbPaths(nativeHandle_, paths, targetSizes); 369 return this; 370 } 371 372 @Override dbPaths()373 public List<DbPath> dbPaths() { 374 final int len = (int)dbPathsLen(nativeHandle_); 375 if(len == 0) { 376 return Collections.emptyList(); 377 } else { 378 final String paths[] = new String[len]; 379 final long targetSizes[] = new long[len]; 380 381 dbPaths(nativeHandle_, paths, targetSizes); 382 383 final List<DbPath> dbPaths = new ArrayList<>(); 384 for(int i = 0; i < len; i++) { 385 dbPaths.add(new DbPath(Paths.get(paths[i]), targetSizes[i])); 386 } 387 return dbPaths; 388 } 389 } 390 391 @Override dbLogDir()392 public String dbLogDir() { 393 assert(isOwningHandle()); 394 return dbLogDir(nativeHandle_); 395 } 396 397 @Override setDbLogDir(final String dbLogDir)398 public Options setDbLogDir(final String dbLogDir) { 399 assert(isOwningHandle()); 400 setDbLogDir(nativeHandle_, dbLogDir); 401 return this; 402 } 403 404 @Override walDir()405 public String walDir() { 406 assert(isOwningHandle()); 407 return walDir(nativeHandle_); 408 } 409 410 @Override setWalDir(final String walDir)411 public Options setWalDir(final String walDir) { 412 assert(isOwningHandle()); 413 setWalDir(nativeHandle_, walDir); 414 return this; 415 } 416 417 @Override deleteObsoleteFilesPeriodMicros()418 public long deleteObsoleteFilesPeriodMicros() { 419 assert(isOwningHandle()); 420 return deleteObsoleteFilesPeriodMicros(nativeHandle_); 421 } 422 423 @Override setDeleteObsoleteFilesPeriodMicros( final long micros)424 public Options setDeleteObsoleteFilesPeriodMicros( 425 final long micros) { 426 assert(isOwningHandle()); 427 setDeleteObsoleteFilesPeriodMicros(nativeHandle_, micros); 428 return this; 429 } 430 431 @Override 432 @Deprecated maxBackgroundCompactions()433 public int maxBackgroundCompactions() { 434 assert(isOwningHandle()); 435 return maxBackgroundCompactions(nativeHandle_); 436 } 437 438 @Override setStatistics(final Statistics statistics)439 public Options setStatistics(final Statistics statistics) { 440 assert(isOwningHandle()); 441 setStatistics(nativeHandle_, statistics.nativeHandle_); 442 return this; 443 } 444 445 @Override statistics()446 public Statistics statistics() { 447 assert(isOwningHandle()); 448 final long statisticsNativeHandle = statistics(nativeHandle_); 449 if(statisticsNativeHandle == 0) { 450 return null; 451 } else { 452 return new Statistics(statisticsNativeHandle); 453 } 454 } 455 456 @Override 457 @Deprecated setBaseBackgroundCompactions( final int baseBackgroundCompactions)458 public void setBaseBackgroundCompactions( 459 final int baseBackgroundCompactions) { 460 assert(isOwningHandle()); 461 setBaseBackgroundCompactions(nativeHandle_, baseBackgroundCompactions); 462 } 463 464 @Override baseBackgroundCompactions()465 public int baseBackgroundCompactions() { 466 assert(isOwningHandle()); 467 return baseBackgroundCompactions(nativeHandle_); 468 } 469 470 @Override 471 @Deprecated setMaxBackgroundCompactions( final int maxBackgroundCompactions)472 public Options setMaxBackgroundCompactions( 473 final int maxBackgroundCompactions) { 474 assert(isOwningHandle()); 475 setMaxBackgroundCompactions(nativeHandle_, maxBackgroundCompactions); 476 return this; 477 } 478 479 @Override setMaxSubcompactions(final int maxSubcompactions)480 public Options setMaxSubcompactions(final int maxSubcompactions) { 481 assert(isOwningHandle()); 482 setMaxSubcompactions(nativeHandle_, maxSubcompactions); 483 return this; 484 } 485 486 @Override maxSubcompactions()487 public int maxSubcompactions() { 488 assert(isOwningHandle()); 489 return maxSubcompactions(nativeHandle_); 490 } 491 492 @Override 493 @Deprecated maxBackgroundFlushes()494 public int maxBackgroundFlushes() { 495 assert(isOwningHandle()); 496 return maxBackgroundFlushes(nativeHandle_); 497 } 498 499 @Override 500 @Deprecated setMaxBackgroundFlushes( final int maxBackgroundFlushes)501 public Options setMaxBackgroundFlushes( 502 final int maxBackgroundFlushes) { 503 assert(isOwningHandle()); 504 setMaxBackgroundFlushes(nativeHandle_, maxBackgroundFlushes); 505 return this; 506 } 507 508 @Override maxBackgroundJobs()509 public int maxBackgroundJobs() { 510 assert(isOwningHandle()); 511 return maxBackgroundJobs(nativeHandle_); 512 } 513 514 @Override setMaxBackgroundJobs(final int maxBackgroundJobs)515 public Options setMaxBackgroundJobs(final int maxBackgroundJobs) { 516 assert(isOwningHandle()); 517 setMaxBackgroundJobs(nativeHandle_, maxBackgroundJobs); 518 return this; 519 } 520 521 @Override maxLogFileSize()522 public long maxLogFileSize() { 523 assert(isOwningHandle()); 524 return maxLogFileSize(nativeHandle_); 525 } 526 527 @Override setMaxLogFileSize(final long maxLogFileSize)528 public Options setMaxLogFileSize(final long maxLogFileSize) { 529 assert(isOwningHandle()); 530 setMaxLogFileSize(nativeHandle_, maxLogFileSize); 531 return this; 532 } 533 534 @Override logFileTimeToRoll()535 public long logFileTimeToRoll() { 536 assert(isOwningHandle()); 537 return logFileTimeToRoll(nativeHandle_); 538 } 539 540 @Override setLogFileTimeToRoll(final long logFileTimeToRoll)541 public Options setLogFileTimeToRoll(final long logFileTimeToRoll) { 542 assert(isOwningHandle()); 543 setLogFileTimeToRoll(nativeHandle_, logFileTimeToRoll); 544 return this; 545 } 546 547 @Override keepLogFileNum()548 public long keepLogFileNum() { 549 assert(isOwningHandle()); 550 return keepLogFileNum(nativeHandle_); 551 } 552 553 @Override setKeepLogFileNum(final long keepLogFileNum)554 public Options setKeepLogFileNum(final long keepLogFileNum) { 555 assert(isOwningHandle()); 556 setKeepLogFileNum(nativeHandle_, keepLogFileNum); 557 return this; 558 } 559 560 561 @Override setRecycleLogFileNum(final long recycleLogFileNum)562 public Options setRecycleLogFileNum(final long recycleLogFileNum) { 563 assert(isOwningHandle()); 564 setRecycleLogFileNum(nativeHandle_, recycleLogFileNum); 565 return this; 566 } 567 568 @Override recycleLogFileNum()569 public long recycleLogFileNum() { 570 assert(isOwningHandle()); 571 return recycleLogFileNum(nativeHandle_); 572 } 573 574 @Override maxManifestFileSize()575 public long maxManifestFileSize() { 576 assert(isOwningHandle()); 577 return maxManifestFileSize(nativeHandle_); 578 } 579 580 @Override setMaxManifestFileSize( final long maxManifestFileSize)581 public Options setMaxManifestFileSize( 582 final long maxManifestFileSize) { 583 assert(isOwningHandle()); 584 setMaxManifestFileSize(nativeHandle_, maxManifestFileSize); 585 return this; 586 } 587 588 @Override setMaxTableFilesSizeFIFO( final long maxTableFilesSize)589 public Options setMaxTableFilesSizeFIFO( 590 final long maxTableFilesSize) { 591 assert(maxTableFilesSize > 0); // unsigned native type 592 assert(isOwningHandle()); 593 setMaxTableFilesSizeFIFO(nativeHandle_, maxTableFilesSize); 594 return this; 595 } 596 597 @Override maxTableFilesSizeFIFO()598 public long maxTableFilesSizeFIFO() { 599 return maxTableFilesSizeFIFO(nativeHandle_); 600 } 601 602 @Override tableCacheNumshardbits()603 public int tableCacheNumshardbits() { 604 assert(isOwningHandle()); 605 return tableCacheNumshardbits(nativeHandle_); 606 } 607 608 @Override setTableCacheNumshardbits( final int tableCacheNumshardbits)609 public Options setTableCacheNumshardbits( 610 final int tableCacheNumshardbits) { 611 assert(isOwningHandle()); 612 setTableCacheNumshardbits(nativeHandle_, tableCacheNumshardbits); 613 return this; 614 } 615 616 @Override walTtlSeconds()617 public long walTtlSeconds() { 618 assert(isOwningHandle()); 619 return walTtlSeconds(nativeHandle_); 620 } 621 622 @Override setWalTtlSeconds(final long walTtlSeconds)623 public Options setWalTtlSeconds(final long walTtlSeconds) { 624 assert(isOwningHandle()); 625 setWalTtlSeconds(nativeHandle_, walTtlSeconds); 626 return this; 627 } 628 629 @Override walSizeLimitMB()630 public long walSizeLimitMB() { 631 assert(isOwningHandle()); 632 return walSizeLimitMB(nativeHandle_); 633 } 634 635 @Override setWalSizeLimitMB(final long sizeLimitMB)636 public Options setWalSizeLimitMB(final long sizeLimitMB) { 637 assert(isOwningHandle()); 638 setWalSizeLimitMB(nativeHandle_, sizeLimitMB); 639 return this; 640 } 641 642 @Override manifestPreallocationSize()643 public long manifestPreallocationSize() { 644 assert(isOwningHandle()); 645 return manifestPreallocationSize(nativeHandle_); 646 } 647 648 @Override setManifestPreallocationSize(final long size)649 public Options setManifestPreallocationSize(final long size) { 650 assert(isOwningHandle()); 651 setManifestPreallocationSize(nativeHandle_, size); 652 return this; 653 } 654 655 @Override setUseDirectReads(final boolean useDirectReads)656 public Options setUseDirectReads(final boolean useDirectReads) { 657 assert(isOwningHandle()); 658 setUseDirectReads(nativeHandle_, useDirectReads); 659 return this; 660 } 661 662 @Override useDirectReads()663 public boolean useDirectReads() { 664 assert(isOwningHandle()); 665 return useDirectReads(nativeHandle_); 666 } 667 668 @Override setUseDirectIoForFlushAndCompaction( final boolean useDirectIoForFlushAndCompaction)669 public Options setUseDirectIoForFlushAndCompaction( 670 final boolean useDirectIoForFlushAndCompaction) { 671 assert(isOwningHandle()); 672 setUseDirectIoForFlushAndCompaction(nativeHandle_, useDirectIoForFlushAndCompaction); 673 return this; 674 } 675 676 @Override useDirectIoForFlushAndCompaction()677 public boolean useDirectIoForFlushAndCompaction() { 678 assert(isOwningHandle()); 679 return useDirectIoForFlushAndCompaction(nativeHandle_); 680 } 681 682 @Override setAllowFAllocate(final boolean allowFAllocate)683 public Options setAllowFAllocate(final boolean allowFAllocate) { 684 assert(isOwningHandle()); 685 setAllowFAllocate(nativeHandle_, allowFAllocate); 686 return this; 687 } 688 689 @Override allowFAllocate()690 public boolean allowFAllocate() { 691 assert(isOwningHandle()); 692 return allowFAllocate(nativeHandle_); 693 } 694 695 @Override allowMmapReads()696 public boolean allowMmapReads() { 697 assert(isOwningHandle()); 698 return allowMmapReads(nativeHandle_); 699 } 700 701 @Override setAllowMmapReads(final boolean allowMmapReads)702 public Options setAllowMmapReads(final boolean allowMmapReads) { 703 assert(isOwningHandle()); 704 setAllowMmapReads(nativeHandle_, allowMmapReads); 705 return this; 706 } 707 708 @Override allowMmapWrites()709 public boolean allowMmapWrites() { 710 assert(isOwningHandle()); 711 return allowMmapWrites(nativeHandle_); 712 } 713 714 @Override setAllowMmapWrites(final boolean allowMmapWrites)715 public Options setAllowMmapWrites(final boolean allowMmapWrites) { 716 assert(isOwningHandle()); 717 setAllowMmapWrites(nativeHandle_, allowMmapWrites); 718 return this; 719 } 720 721 @Override isFdCloseOnExec()722 public boolean isFdCloseOnExec() { 723 assert(isOwningHandle()); 724 return isFdCloseOnExec(nativeHandle_); 725 } 726 727 @Override setIsFdCloseOnExec(final boolean isFdCloseOnExec)728 public Options setIsFdCloseOnExec(final boolean isFdCloseOnExec) { 729 assert(isOwningHandle()); 730 setIsFdCloseOnExec(nativeHandle_, isFdCloseOnExec); 731 return this; 732 } 733 734 @Override statsDumpPeriodSec()735 public int statsDumpPeriodSec() { 736 assert(isOwningHandle()); 737 return statsDumpPeriodSec(nativeHandle_); 738 } 739 740 @Override setStatsDumpPeriodSec(final int statsDumpPeriodSec)741 public Options setStatsDumpPeriodSec(final int statsDumpPeriodSec) { 742 assert(isOwningHandle()); 743 setStatsDumpPeriodSec(nativeHandle_, statsDumpPeriodSec); 744 return this; 745 } 746 747 @Override setStatsPersistPeriodSec( final int statsPersistPeriodSec)748 public Options setStatsPersistPeriodSec( 749 final int statsPersistPeriodSec) { 750 assert(isOwningHandle()); 751 setStatsPersistPeriodSec(nativeHandle_, statsPersistPeriodSec); 752 return this; 753 } 754 755 @Override statsPersistPeriodSec()756 public int statsPersistPeriodSec() { 757 assert(isOwningHandle()); 758 return statsPersistPeriodSec(nativeHandle_); 759 } 760 761 @Override setStatsHistoryBufferSize( final long statsHistoryBufferSize)762 public Options setStatsHistoryBufferSize( 763 final long statsHistoryBufferSize) { 764 assert(isOwningHandle()); 765 setStatsHistoryBufferSize(nativeHandle_, statsHistoryBufferSize); 766 return this; 767 } 768 769 @Override statsHistoryBufferSize()770 public long statsHistoryBufferSize() { 771 assert(isOwningHandle()); 772 return statsHistoryBufferSize(nativeHandle_); 773 } 774 775 @Override adviseRandomOnOpen()776 public boolean adviseRandomOnOpen() { 777 return adviseRandomOnOpen(nativeHandle_); 778 } 779 780 @Override setAdviseRandomOnOpen(final boolean adviseRandomOnOpen)781 public Options setAdviseRandomOnOpen(final boolean adviseRandomOnOpen) { 782 assert(isOwningHandle()); 783 setAdviseRandomOnOpen(nativeHandle_, adviseRandomOnOpen); 784 return this; 785 } 786 787 @Override setDbWriteBufferSize(final long dbWriteBufferSize)788 public Options setDbWriteBufferSize(final long dbWriteBufferSize) { 789 assert(isOwningHandle()); 790 setDbWriteBufferSize(nativeHandle_, dbWriteBufferSize); 791 return this; 792 } 793 794 @Override setWriteBufferManager(final WriteBufferManager writeBufferManager)795 public Options setWriteBufferManager(final WriteBufferManager writeBufferManager) { 796 assert(isOwningHandle()); 797 setWriteBufferManager(nativeHandle_, writeBufferManager.nativeHandle_); 798 this.writeBufferManager_ = writeBufferManager; 799 return this; 800 } 801 802 @Override writeBufferManager()803 public WriteBufferManager writeBufferManager() { 804 assert(isOwningHandle()); 805 return this.writeBufferManager_; 806 } 807 808 @Override dbWriteBufferSize()809 public long dbWriteBufferSize() { 810 assert(isOwningHandle()); 811 return dbWriteBufferSize(nativeHandle_); 812 } 813 814 @Override setAccessHintOnCompactionStart(final AccessHint accessHint)815 public Options setAccessHintOnCompactionStart(final AccessHint accessHint) { 816 assert(isOwningHandle()); 817 setAccessHintOnCompactionStart(nativeHandle_, accessHint.getValue()); 818 return this; 819 } 820 821 @Override accessHintOnCompactionStart()822 public AccessHint accessHintOnCompactionStart() { 823 assert(isOwningHandle()); 824 return AccessHint.getAccessHint(accessHintOnCompactionStart(nativeHandle_)); 825 } 826 827 @Override setNewTableReaderForCompactionInputs( final boolean newTableReaderForCompactionInputs)828 public Options setNewTableReaderForCompactionInputs( 829 final boolean newTableReaderForCompactionInputs) { 830 assert(isOwningHandle()); 831 setNewTableReaderForCompactionInputs(nativeHandle_, 832 newTableReaderForCompactionInputs); 833 return this; 834 } 835 836 @Override newTableReaderForCompactionInputs()837 public boolean newTableReaderForCompactionInputs() { 838 assert(isOwningHandle()); 839 return newTableReaderForCompactionInputs(nativeHandle_); 840 } 841 842 @Override setCompactionReadaheadSize(final long compactionReadaheadSize)843 public Options setCompactionReadaheadSize(final long compactionReadaheadSize) { 844 assert(isOwningHandle()); 845 setCompactionReadaheadSize(nativeHandle_, compactionReadaheadSize); 846 return this; 847 } 848 849 @Override compactionReadaheadSize()850 public long compactionReadaheadSize() { 851 assert(isOwningHandle()); 852 return compactionReadaheadSize(nativeHandle_); 853 } 854 855 @Override setRandomAccessMaxBufferSize(final long randomAccessMaxBufferSize)856 public Options setRandomAccessMaxBufferSize(final long randomAccessMaxBufferSize) { 857 assert(isOwningHandle()); 858 setRandomAccessMaxBufferSize(nativeHandle_, randomAccessMaxBufferSize); 859 return this; 860 } 861 862 @Override randomAccessMaxBufferSize()863 public long randomAccessMaxBufferSize() { 864 assert(isOwningHandle()); 865 return randomAccessMaxBufferSize(nativeHandle_); 866 } 867 868 @Override setWritableFileMaxBufferSize(final long writableFileMaxBufferSize)869 public Options setWritableFileMaxBufferSize(final long writableFileMaxBufferSize) { 870 assert(isOwningHandle()); 871 setWritableFileMaxBufferSize(nativeHandle_, writableFileMaxBufferSize); 872 return this; 873 } 874 875 @Override writableFileMaxBufferSize()876 public long writableFileMaxBufferSize() { 877 assert(isOwningHandle()); 878 return writableFileMaxBufferSize(nativeHandle_); 879 } 880 881 @Override useAdaptiveMutex()882 public boolean useAdaptiveMutex() { 883 assert(isOwningHandle()); 884 return useAdaptiveMutex(nativeHandle_); 885 } 886 887 @Override setUseAdaptiveMutex(final boolean useAdaptiveMutex)888 public Options setUseAdaptiveMutex(final boolean useAdaptiveMutex) { 889 assert(isOwningHandle()); 890 setUseAdaptiveMutex(nativeHandle_, useAdaptiveMutex); 891 return this; 892 } 893 894 @Override bytesPerSync()895 public long bytesPerSync() { 896 return bytesPerSync(nativeHandle_); 897 } 898 899 @Override setBytesPerSync(final long bytesPerSync)900 public Options setBytesPerSync(final long bytesPerSync) { 901 assert(isOwningHandle()); 902 setBytesPerSync(nativeHandle_, bytesPerSync); 903 return this; 904 } 905 906 @Override setWalBytesPerSync(final long walBytesPerSync)907 public Options setWalBytesPerSync(final long walBytesPerSync) { 908 assert(isOwningHandle()); 909 setWalBytesPerSync(nativeHandle_, walBytesPerSync); 910 return this; 911 } 912 913 @Override walBytesPerSync()914 public long walBytesPerSync() { 915 assert(isOwningHandle()); 916 return walBytesPerSync(nativeHandle_); 917 } 918 919 @Override setStrictBytesPerSync(final boolean strictBytesPerSync)920 public Options setStrictBytesPerSync(final boolean strictBytesPerSync) { 921 assert(isOwningHandle()); 922 setStrictBytesPerSync(nativeHandle_, strictBytesPerSync); 923 return this; 924 } 925 926 @Override strictBytesPerSync()927 public boolean strictBytesPerSync() { 928 assert(isOwningHandle()); 929 return strictBytesPerSync(nativeHandle_); 930 } 931 932 @Override setEnableThreadTracking(final boolean enableThreadTracking)933 public Options setEnableThreadTracking(final boolean enableThreadTracking) { 934 assert(isOwningHandle()); 935 setEnableThreadTracking(nativeHandle_, enableThreadTracking); 936 return this; 937 } 938 939 @Override enableThreadTracking()940 public boolean enableThreadTracking() { 941 assert(isOwningHandle()); 942 return enableThreadTracking(nativeHandle_); 943 } 944 945 @Override setDelayedWriteRate(final long delayedWriteRate)946 public Options setDelayedWriteRate(final long delayedWriteRate) { 947 assert(isOwningHandle()); 948 setDelayedWriteRate(nativeHandle_, delayedWriteRate); 949 return this; 950 } 951 952 @Override delayedWriteRate()953 public long delayedWriteRate(){ 954 return delayedWriteRate(nativeHandle_); 955 } 956 957 @Override setEnablePipelinedWrite(final boolean enablePipelinedWrite)958 public Options setEnablePipelinedWrite(final boolean enablePipelinedWrite) { 959 setEnablePipelinedWrite(nativeHandle_, enablePipelinedWrite); 960 return this; 961 } 962 963 @Override enablePipelinedWrite()964 public boolean enablePipelinedWrite() { 965 return enablePipelinedWrite(nativeHandle_); 966 } 967 968 @Override setUnorderedWrite(final boolean unorderedWrite)969 public Options setUnorderedWrite(final boolean unorderedWrite) { 970 setUnorderedWrite(nativeHandle_, unorderedWrite); 971 return this; 972 } 973 974 @Override unorderedWrite()975 public boolean unorderedWrite() { 976 return unorderedWrite(nativeHandle_); 977 } 978 979 @Override setAllowConcurrentMemtableWrite( final boolean allowConcurrentMemtableWrite)980 public Options setAllowConcurrentMemtableWrite( 981 final boolean allowConcurrentMemtableWrite) { 982 setAllowConcurrentMemtableWrite(nativeHandle_, 983 allowConcurrentMemtableWrite); 984 return this; 985 } 986 987 @Override allowConcurrentMemtableWrite()988 public boolean allowConcurrentMemtableWrite() { 989 return allowConcurrentMemtableWrite(nativeHandle_); 990 } 991 992 @Override setEnableWriteThreadAdaptiveYield( final boolean enableWriteThreadAdaptiveYield)993 public Options setEnableWriteThreadAdaptiveYield( 994 final boolean enableWriteThreadAdaptiveYield) { 995 setEnableWriteThreadAdaptiveYield(nativeHandle_, 996 enableWriteThreadAdaptiveYield); 997 return this; 998 } 999 1000 @Override enableWriteThreadAdaptiveYield()1001 public boolean enableWriteThreadAdaptiveYield() { 1002 return enableWriteThreadAdaptiveYield(nativeHandle_); 1003 } 1004 1005 @Override setWriteThreadMaxYieldUsec(final long writeThreadMaxYieldUsec)1006 public Options setWriteThreadMaxYieldUsec(final long writeThreadMaxYieldUsec) { 1007 setWriteThreadMaxYieldUsec(nativeHandle_, writeThreadMaxYieldUsec); 1008 return this; 1009 } 1010 1011 @Override writeThreadMaxYieldUsec()1012 public long writeThreadMaxYieldUsec() { 1013 return writeThreadMaxYieldUsec(nativeHandle_); 1014 } 1015 1016 @Override setWriteThreadSlowYieldUsec(final long writeThreadSlowYieldUsec)1017 public Options setWriteThreadSlowYieldUsec(final long writeThreadSlowYieldUsec) { 1018 setWriteThreadSlowYieldUsec(nativeHandle_, writeThreadSlowYieldUsec); 1019 return this; 1020 } 1021 1022 @Override writeThreadSlowYieldUsec()1023 public long writeThreadSlowYieldUsec() { 1024 return writeThreadSlowYieldUsec(nativeHandle_); 1025 } 1026 1027 @Override setSkipStatsUpdateOnDbOpen(final boolean skipStatsUpdateOnDbOpen)1028 public Options setSkipStatsUpdateOnDbOpen(final boolean skipStatsUpdateOnDbOpen) { 1029 assert(isOwningHandle()); 1030 setSkipStatsUpdateOnDbOpen(nativeHandle_, skipStatsUpdateOnDbOpen); 1031 return this; 1032 } 1033 1034 @Override skipStatsUpdateOnDbOpen()1035 public boolean skipStatsUpdateOnDbOpen() { 1036 assert(isOwningHandle()); 1037 return skipStatsUpdateOnDbOpen(nativeHandle_); 1038 } 1039 1040 @Override setWalRecoveryMode(final WALRecoveryMode walRecoveryMode)1041 public Options setWalRecoveryMode(final WALRecoveryMode walRecoveryMode) { 1042 assert(isOwningHandle()); 1043 setWalRecoveryMode(nativeHandle_, walRecoveryMode.getValue()); 1044 return this; 1045 } 1046 1047 @Override walRecoveryMode()1048 public WALRecoveryMode walRecoveryMode() { 1049 assert(isOwningHandle()); 1050 return WALRecoveryMode.getWALRecoveryMode(walRecoveryMode(nativeHandle_)); 1051 } 1052 1053 @Override setAllow2pc(final boolean allow2pc)1054 public Options setAllow2pc(final boolean allow2pc) { 1055 assert(isOwningHandle()); 1056 setAllow2pc(nativeHandle_, allow2pc); 1057 return this; 1058 } 1059 1060 @Override allow2pc()1061 public boolean allow2pc() { 1062 assert(isOwningHandle()); 1063 return allow2pc(nativeHandle_); 1064 } 1065 1066 @Override setRowCache(final Cache rowCache)1067 public Options setRowCache(final Cache rowCache) { 1068 assert(isOwningHandle()); 1069 setRowCache(nativeHandle_, rowCache.nativeHandle_); 1070 this.rowCache_ = rowCache; 1071 return this; 1072 } 1073 1074 @Override rowCache()1075 public Cache rowCache() { 1076 assert(isOwningHandle()); 1077 return this.rowCache_; 1078 } 1079 1080 @Override setWalFilter(final AbstractWalFilter walFilter)1081 public Options setWalFilter(final AbstractWalFilter walFilter) { 1082 assert(isOwningHandle()); 1083 setWalFilter(nativeHandle_, walFilter.nativeHandle_); 1084 this.walFilter_ = walFilter; 1085 return this; 1086 } 1087 1088 @Override walFilter()1089 public WalFilter walFilter() { 1090 assert(isOwningHandle()); 1091 return this.walFilter_; 1092 } 1093 1094 @Override setFailIfOptionsFileError(final boolean failIfOptionsFileError)1095 public Options setFailIfOptionsFileError(final boolean failIfOptionsFileError) { 1096 assert(isOwningHandle()); 1097 setFailIfOptionsFileError(nativeHandle_, failIfOptionsFileError); 1098 return this; 1099 } 1100 1101 @Override failIfOptionsFileError()1102 public boolean failIfOptionsFileError() { 1103 assert(isOwningHandle()); 1104 return failIfOptionsFileError(nativeHandle_); 1105 } 1106 1107 @Override setDumpMallocStats(final boolean dumpMallocStats)1108 public Options setDumpMallocStats(final boolean dumpMallocStats) { 1109 assert(isOwningHandle()); 1110 setDumpMallocStats(nativeHandle_, dumpMallocStats); 1111 return this; 1112 } 1113 1114 @Override dumpMallocStats()1115 public boolean dumpMallocStats() { 1116 assert(isOwningHandle()); 1117 return dumpMallocStats(nativeHandle_); 1118 } 1119 1120 @Override setAvoidFlushDuringRecovery(final boolean avoidFlushDuringRecovery)1121 public Options setAvoidFlushDuringRecovery(final boolean avoidFlushDuringRecovery) { 1122 assert(isOwningHandle()); 1123 setAvoidFlushDuringRecovery(nativeHandle_, avoidFlushDuringRecovery); 1124 return this; 1125 } 1126 1127 @Override avoidFlushDuringRecovery()1128 public boolean avoidFlushDuringRecovery() { 1129 assert(isOwningHandle()); 1130 return avoidFlushDuringRecovery(nativeHandle_); 1131 } 1132 1133 @Override setAvoidFlushDuringShutdown(final boolean avoidFlushDuringShutdown)1134 public Options setAvoidFlushDuringShutdown(final boolean avoidFlushDuringShutdown) { 1135 assert(isOwningHandle()); 1136 setAvoidFlushDuringShutdown(nativeHandle_, avoidFlushDuringShutdown); 1137 return this; 1138 } 1139 1140 @Override avoidFlushDuringShutdown()1141 public boolean avoidFlushDuringShutdown() { 1142 assert(isOwningHandle()); 1143 return avoidFlushDuringShutdown(nativeHandle_); 1144 } 1145 1146 @Override setAllowIngestBehind(final boolean allowIngestBehind)1147 public Options setAllowIngestBehind(final boolean allowIngestBehind) { 1148 assert(isOwningHandle()); 1149 setAllowIngestBehind(nativeHandle_, allowIngestBehind); 1150 return this; 1151 } 1152 1153 @Override allowIngestBehind()1154 public boolean allowIngestBehind() { 1155 assert(isOwningHandle()); 1156 return allowIngestBehind(nativeHandle_); 1157 } 1158 1159 @Override setPreserveDeletes(final boolean preserveDeletes)1160 public Options setPreserveDeletes(final boolean preserveDeletes) { 1161 assert(isOwningHandle()); 1162 setPreserveDeletes(nativeHandle_, preserveDeletes); 1163 return this; 1164 } 1165 1166 @Override preserveDeletes()1167 public boolean preserveDeletes() { 1168 assert(isOwningHandle()); 1169 return preserveDeletes(nativeHandle_); 1170 } 1171 1172 @Override setTwoWriteQueues(final boolean twoWriteQueues)1173 public Options setTwoWriteQueues(final boolean twoWriteQueues) { 1174 assert(isOwningHandle()); 1175 setTwoWriteQueues(nativeHandle_, twoWriteQueues); 1176 return this; 1177 } 1178 1179 @Override twoWriteQueues()1180 public boolean twoWriteQueues() { 1181 assert(isOwningHandle()); 1182 return twoWriteQueues(nativeHandle_); 1183 } 1184 1185 @Override setManualWalFlush(final boolean manualWalFlush)1186 public Options setManualWalFlush(final boolean manualWalFlush) { 1187 assert(isOwningHandle()); 1188 setManualWalFlush(nativeHandle_, manualWalFlush); 1189 return this; 1190 } 1191 1192 @Override manualWalFlush()1193 public boolean manualWalFlush() { 1194 assert(isOwningHandle()); 1195 return manualWalFlush(nativeHandle_); 1196 } 1197 1198 @Override memTableConfig()1199 public MemTableConfig memTableConfig() { 1200 return this.memTableConfig_; 1201 } 1202 1203 @Override setMemTableConfig(final MemTableConfig config)1204 public Options setMemTableConfig(final MemTableConfig config) { 1205 memTableConfig_ = config; 1206 setMemTableFactory(nativeHandle_, config.newMemTableFactoryHandle()); 1207 return this; 1208 } 1209 1210 @Override setRateLimiter(final RateLimiter rateLimiter)1211 public Options setRateLimiter(final RateLimiter rateLimiter) { 1212 assert(isOwningHandle()); 1213 rateLimiter_ = rateLimiter; 1214 setRateLimiter(nativeHandle_, rateLimiter.nativeHandle_); 1215 return this; 1216 } 1217 1218 @Override setSstFileManager(final SstFileManager sstFileManager)1219 public Options setSstFileManager(final SstFileManager sstFileManager) { 1220 assert(isOwningHandle()); 1221 setSstFileManager(nativeHandle_, sstFileManager.nativeHandle_); 1222 return this; 1223 } 1224 1225 @Override setLogger(final Logger logger)1226 public Options setLogger(final Logger logger) { 1227 assert(isOwningHandle()); 1228 setLogger(nativeHandle_, logger.nativeHandle_); 1229 return this; 1230 } 1231 1232 @Override setInfoLogLevel(final InfoLogLevel infoLogLevel)1233 public Options setInfoLogLevel(final InfoLogLevel infoLogLevel) { 1234 assert(isOwningHandle()); 1235 setInfoLogLevel(nativeHandle_, infoLogLevel.getValue()); 1236 return this; 1237 } 1238 1239 @Override infoLogLevel()1240 public InfoLogLevel infoLogLevel() { 1241 assert(isOwningHandle()); 1242 return InfoLogLevel.getInfoLogLevel( 1243 infoLogLevel(nativeHandle_)); 1244 } 1245 1246 @Override memTableFactoryName()1247 public String memTableFactoryName() { 1248 assert(isOwningHandle()); 1249 return memTableFactoryName(nativeHandle_); 1250 } 1251 1252 @Override tableFormatConfig()1253 public TableFormatConfig tableFormatConfig() { 1254 return this.tableFormatConfig_; 1255 } 1256 1257 @Override setTableFormatConfig(final TableFormatConfig config)1258 public Options setTableFormatConfig(final TableFormatConfig config) { 1259 tableFormatConfig_ = config; 1260 setTableFactory(nativeHandle_, config.newTableFactoryHandle()); 1261 return this; 1262 } 1263 1264 @Override tableFactoryName()1265 public String tableFactoryName() { 1266 assert(isOwningHandle()); 1267 return tableFactoryName(nativeHandle_); 1268 } 1269 1270 @Override useFixedLengthPrefixExtractor(final int n)1271 public Options useFixedLengthPrefixExtractor(final int n) { 1272 assert(isOwningHandle()); 1273 useFixedLengthPrefixExtractor(nativeHandle_, n); 1274 return this; 1275 } 1276 1277 @Override useCappedPrefixExtractor(final int n)1278 public Options useCappedPrefixExtractor(final int n) { 1279 assert(isOwningHandle()); 1280 useCappedPrefixExtractor(nativeHandle_, n); 1281 return this; 1282 } 1283 1284 @Override compressionType()1285 public CompressionType compressionType() { 1286 return CompressionType.getCompressionType(compressionType(nativeHandle_)); 1287 } 1288 1289 @Override setCompressionPerLevel( final List<CompressionType> compressionLevels)1290 public Options setCompressionPerLevel( 1291 final List<CompressionType> compressionLevels) { 1292 final byte[] byteCompressionTypes = new byte[ 1293 compressionLevels.size()]; 1294 for (int i = 0; i < compressionLevels.size(); i++) { 1295 byteCompressionTypes[i] = compressionLevels.get(i).getValue(); 1296 } 1297 setCompressionPerLevel(nativeHandle_, byteCompressionTypes); 1298 return this; 1299 } 1300 1301 @Override compressionPerLevel()1302 public List<CompressionType> compressionPerLevel() { 1303 final byte[] byteCompressionTypes = 1304 compressionPerLevel(nativeHandle_); 1305 final List<CompressionType> compressionLevels = new ArrayList<>(); 1306 for (final Byte byteCompressionType : byteCompressionTypes) { 1307 compressionLevels.add(CompressionType.getCompressionType( 1308 byteCompressionType)); 1309 } 1310 return compressionLevels; 1311 } 1312 1313 @Override setCompressionType(CompressionType compressionType)1314 public Options setCompressionType(CompressionType compressionType) { 1315 setCompressionType(nativeHandle_, compressionType.getValue()); 1316 return this; 1317 } 1318 1319 1320 @Override setBottommostCompressionType( final CompressionType bottommostCompressionType)1321 public Options setBottommostCompressionType( 1322 final CompressionType bottommostCompressionType) { 1323 setBottommostCompressionType(nativeHandle_, 1324 bottommostCompressionType.getValue()); 1325 return this; 1326 } 1327 1328 @Override bottommostCompressionType()1329 public CompressionType bottommostCompressionType() { 1330 return CompressionType.getCompressionType( 1331 bottommostCompressionType(nativeHandle_)); 1332 } 1333 1334 @Override setBottommostCompressionOptions( final CompressionOptions bottommostCompressionOptions)1335 public Options setBottommostCompressionOptions( 1336 final CompressionOptions bottommostCompressionOptions) { 1337 setBottommostCompressionOptions(nativeHandle_, 1338 bottommostCompressionOptions.nativeHandle_); 1339 this.bottommostCompressionOptions_ = bottommostCompressionOptions; 1340 return this; 1341 } 1342 1343 @Override bottommostCompressionOptions()1344 public CompressionOptions bottommostCompressionOptions() { 1345 return this.bottommostCompressionOptions_; 1346 } 1347 1348 @Override setCompressionOptions( final CompressionOptions compressionOptions)1349 public Options setCompressionOptions( 1350 final CompressionOptions compressionOptions) { 1351 setCompressionOptions(nativeHandle_, compressionOptions.nativeHandle_); 1352 this.compressionOptions_ = compressionOptions; 1353 return this; 1354 } 1355 1356 @Override compressionOptions()1357 public CompressionOptions compressionOptions() { 1358 return this.compressionOptions_; 1359 } 1360 1361 @Override compactionStyle()1362 public CompactionStyle compactionStyle() { 1363 return CompactionStyle.fromValue(compactionStyle(nativeHandle_)); 1364 } 1365 1366 @Override setCompactionStyle( final CompactionStyle compactionStyle)1367 public Options setCompactionStyle( 1368 final CompactionStyle compactionStyle) { 1369 setCompactionStyle(nativeHandle_, compactionStyle.getValue()); 1370 return this; 1371 } 1372 1373 @Override numLevels()1374 public int numLevels() { 1375 return numLevels(nativeHandle_); 1376 } 1377 1378 @Override setNumLevels(int numLevels)1379 public Options setNumLevels(int numLevels) { 1380 setNumLevels(nativeHandle_, numLevels); 1381 return this; 1382 } 1383 1384 @Override levelZeroFileNumCompactionTrigger()1385 public int levelZeroFileNumCompactionTrigger() { 1386 return levelZeroFileNumCompactionTrigger(nativeHandle_); 1387 } 1388 1389 @Override setLevelZeroFileNumCompactionTrigger( final int numFiles)1390 public Options setLevelZeroFileNumCompactionTrigger( 1391 final int numFiles) { 1392 setLevelZeroFileNumCompactionTrigger( 1393 nativeHandle_, numFiles); 1394 return this; 1395 } 1396 1397 @Override levelZeroSlowdownWritesTrigger()1398 public int levelZeroSlowdownWritesTrigger() { 1399 return levelZeroSlowdownWritesTrigger(nativeHandle_); 1400 } 1401 1402 @Override setLevelZeroSlowdownWritesTrigger( final int numFiles)1403 public Options setLevelZeroSlowdownWritesTrigger( 1404 final int numFiles) { 1405 setLevelZeroSlowdownWritesTrigger(nativeHandle_, numFiles); 1406 return this; 1407 } 1408 1409 @Override levelZeroStopWritesTrigger()1410 public int levelZeroStopWritesTrigger() { 1411 return levelZeroStopWritesTrigger(nativeHandle_); 1412 } 1413 1414 @Override setLevelZeroStopWritesTrigger( final int numFiles)1415 public Options setLevelZeroStopWritesTrigger( 1416 final int numFiles) { 1417 setLevelZeroStopWritesTrigger(nativeHandle_, numFiles); 1418 return this; 1419 } 1420 1421 @Override targetFileSizeBase()1422 public long targetFileSizeBase() { 1423 return targetFileSizeBase(nativeHandle_); 1424 } 1425 1426 @Override setTargetFileSizeBase(long targetFileSizeBase)1427 public Options setTargetFileSizeBase(long targetFileSizeBase) { 1428 setTargetFileSizeBase(nativeHandle_, targetFileSizeBase); 1429 return this; 1430 } 1431 1432 @Override targetFileSizeMultiplier()1433 public int targetFileSizeMultiplier() { 1434 return targetFileSizeMultiplier(nativeHandle_); 1435 } 1436 1437 @Override setTargetFileSizeMultiplier(int multiplier)1438 public Options setTargetFileSizeMultiplier(int multiplier) { 1439 setTargetFileSizeMultiplier(nativeHandle_, multiplier); 1440 return this; 1441 } 1442 1443 @Override setMaxBytesForLevelBase(final long maxBytesForLevelBase)1444 public Options setMaxBytesForLevelBase(final long maxBytesForLevelBase) { 1445 setMaxBytesForLevelBase(nativeHandle_, maxBytesForLevelBase); 1446 return this; 1447 } 1448 1449 @Override maxBytesForLevelBase()1450 public long maxBytesForLevelBase() { 1451 return maxBytesForLevelBase(nativeHandle_); 1452 } 1453 1454 @Override setLevelCompactionDynamicLevelBytes( final boolean enableLevelCompactionDynamicLevelBytes)1455 public Options setLevelCompactionDynamicLevelBytes( 1456 final boolean enableLevelCompactionDynamicLevelBytes) { 1457 setLevelCompactionDynamicLevelBytes(nativeHandle_, 1458 enableLevelCompactionDynamicLevelBytes); 1459 return this; 1460 } 1461 1462 @Override levelCompactionDynamicLevelBytes()1463 public boolean levelCompactionDynamicLevelBytes() { 1464 return levelCompactionDynamicLevelBytes(nativeHandle_); 1465 } 1466 1467 @Override maxBytesForLevelMultiplier()1468 public double maxBytesForLevelMultiplier() { 1469 return maxBytesForLevelMultiplier(nativeHandle_); 1470 } 1471 1472 @Override setMaxBytesForLevelMultiplier(final double multiplier)1473 public Options setMaxBytesForLevelMultiplier(final double multiplier) { 1474 setMaxBytesForLevelMultiplier(nativeHandle_, multiplier); 1475 return this; 1476 } 1477 1478 @Override maxCompactionBytes()1479 public long maxCompactionBytes() { 1480 return maxCompactionBytes(nativeHandle_); 1481 } 1482 1483 @Override setMaxCompactionBytes(final long maxCompactionBytes)1484 public Options setMaxCompactionBytes(final long maxCompactionBytes) { 1485 setMaxCompactionBytes(nativeHandle_, maxCompactionBytes); 1486 return this; 1487 } 1488 1489 @Override arenaBlockSize()1490 public long arenaBlockSize() { 1491 return arenaBlockSize(nativeHandle_); 1492 } 1493 1494 @Override setArenaBlockSize(final long arenaBlockSize)1495 public Options setArenaBlockSize(final long arenaBlockSize) { 1496 setArenaBlockSize(nativeHandle_, arenaBlockSize); 1497 return this; 1498 } 1499 1500 @Override disableAutoCompactions()1501 public boolean disableAutoCompactions() { 1502 return disableAutoCompactions(nativeHandle_); 1503 } 1504 1505 @Override setDisableAutoCompactions( final boolean disableAutoCompactions)1506 public Options setDisableAutoCompactions( 1507 final boolean disableAutoCompactions) { 1508 setDisableAutoCompactions(nativeHandle_, disableAutoCompactions); 1509 return this; 1510 } 1511 1512 @Override maxSequentialSkipInIterations()1513 public long maxSequentialSkipInIterations() { 1514 return maxSequentialSkipInIterations(nativeHandle_); 1515 } 1516 1517 @Override setMaxSequentialSkipInIterations( final long maxSequentialSkipInIterations)1518 public Options setMaxSequentialSkipInIterations( 1519 final long maxSequentialSkipInIterations) { 1520 setMaxSequentialSkipInIterations(nativeHandle_, 1521 maxSequentialSkipInIterations); 1522 return this; 1523 } 1524 1525 @Override inplaceUpdateSupport()1526 public boolean inplaceUpdateSupport() { 1527 return inplaceUpdateSupport(nativeHandle_); 1528 } 1529 1530 @Override setInplaceUpdateSupport( final boolean inplaceUpdateSupport)1531 public Options setInplaceUpdateSupport( 1532 final boolean inplaceUpdateSupport) { 1533 setInplaceUpdateSupport(nativeHandle_, inplaceUpdateSupport); 1534 return this; 1535 } 1536 1537 @Override inplaceUpdateNumLocks()1538 public long inplaceUpdateNumLocks() { 1539 return inplaceUpdateNumLocks(nativeHandle_); 1540 } 1541 1542 @Override setInplaceUpdateNumLocks( final long inplaceUpdateNumLocks)1543 public Options setInplaceUpdateNumLocks( 1544 final long inplaceUpdateNumLocks) { 1545 setInplaceUpdateNumLocks(nativeHandle_, inplaceUpdateNumLocks); 1546 return this; 1547 } 1548 1549 @Override memtablePrefixBloomSizeRatio()1550 public double memtablePrefixBloomSizeRatio() { 1551 return memtablePrefixBloomSizeRatio(nativeHandle_); 1552 } 1553 1554 @Override setMemtablePrefixBloomSizeRatio(final double memtablePrefixBloomSizeRatio)1555 public Options setMemtablePrefixBloomSizeRatio(final double memtablePrefixBloomSizeRatio) { 1556 setMemtablePrefixBloomSizeRatio(nativeHandle_, memtablePrefixBloomSizeRatio); 1557 return this; 1558 } 1559 1560 @Override bloomLocality()1561 public int bloomLocality() { 1562 return bloomLocality(nativeHandle_); 1563 } 1564 1565 @Override setBloomLocality(final int bloomLocality)1566 public Options setBloomLocality(final int bloomLocality) { 1567 setBloomLocality(nativeHandle_, bloomLocality); 1568 return this; 1569 } 1570 1571 @Override maxSuccessiveMerges()1572 public long maxSuccessiveMerges() { 1573 return maxSuccessiveMerges(nativeHandle_); 1574 } 1575 1576 @Override setMaxSuccessiveMerges(long maxSuccessiveMerges)1577 public Options setMaxSuccessiveMerges(long maxSuccessiveMerges) { 1578 setMaxSuccessiveMerges(nativeHandle_, maxSuccessiveMerges); 1579 return this; 1580 } 1581 1582 @Override minWriteBufferNumberToMerge()1583 public int minWriteBufferNumberToMerge() { 1584 return minWriteBufferNumberToMerge(nativeHandle_); 1585 } 1586 1587 @Override setMinWriteBufferNumberToMerge( final int minWriteBufferNumberToMerge)1588 public Options setMinWriteBufferNumberToMerge( 1589 final int minWriteBufferNumberToMerge) { 1590 setMinWriteBufferNumberToMerge(nativeHandle_, minWriteBufferNumberToMerge); 1591 return this; 1592 } 1593 1594 @Override setOptimizeFiltersForHits( final boolean optimizeFiltersForHits)1595 public Options setOptimizeFiltersForHits( 1596 final boolean optimizeFiltersForHits) { 1597 setOptimizeFiltersForHits(nativeHandle_, optimizeFiltersForHits); 1598 return this; 1599 } 1600 1601 @Override optimizeFiltersForHits()1602 public boolean optimizeFiltersForHits() { 1603 return optimizeFiltersForHits(nativeHandle_); 1604 } 1605 1606 @Override 1607 public Options setMemtableHugePageSize( long memtableHugePageSize)1608 setMemtableHugePageSize( 1609 long memtableHugePageSize) { 1610 setMemtableHugePageSize(nativeHandle_, 1611 memtableHugePageSize); 1612 return this; 1613 } 1614 1615 @Override memtableHugePageSize()1616 public long memtableHugePageSize() { 1617 return memtableHugePageSize(nativeHandle_); 1618 } 1619 1620 @Override setSoftPendingCompactionBytesLimit(long softPendingCompactionBytesLimit)1621 public Options setSoftPendingCompactionBytesLimit(long softPendingCompactionBytesLimit) { 1622 setSoftPendingCompactionBytesLimit(nativeHandle_, 1623 softPendingCompactionBytesLimit); 1624 return this; 1625 } 1626 1627 @Override softPendingCompactionBytesLimit()1628 public long softPendingCompactionBytesLimit() { 1629 return softPendingCompactionBytesLimit(nativeHandle_); 1630 } 1631 1632 @Override setHardPendingCompactionBytesLimit(long hardPendingCompactionBytesLimit)1633 public Options setHardPendingCompactionBytesLimit(long hardPendingCompactionBytesLimit) { 1634 setHardPendingCompactionBytesLimit(nativeHandle_, hardPendingCompactionBytesLimit); 1635 return this; 1636 } 1637 1638 @Override hardPendingCompactionBytesLimit()1639 public long hardPendingCompactionBytesLimit() { 1640 return hardPendingCompactionBytesLimit(nativeHandle_); 1641 } 1642 1643 @Override setLevel0FileNumCompactionTrigger(int level0FileNumCompactionTrigger)1644 public Options setLevel0FileNumCompactionTrigger(int level0FileNumCompactionTrigger) { 1645 setLevel0FileNumCompactionTrigger(nativeHandle_, level0FileNumCompactionTrigger); 1646 return this; 1647 } 1648 1649 @Override level0FileNumCompactionTrigger()1650 public int level0FileNumCompactionTrigger() { 1651 return level0FileNumCompactionTrigger(nativeHandle_); 1652 } 1653 1654 @Override setLevel0SlowdownWritesTrigger(int level0SlowdownWritesTrigger)1655 public Options setLevel0SlowdownWritesTrigger(int level0SlowdownWritesTrigger) { 1656 setLevel0SlowdownWritesTrigger(nativeHandle_, level0SlowdownWritesTrigger); 1657 return this; 1658 } 1659 1660 @Override level0SlowdownWritesTrigger()1661 public int level0SlowdownWritesTrigger() { 1662 return level0SlowdownWritesTrigger(nativeHandle_); 1663 } 1664 1665 @Override setLevel0StopWritesTrigger(int level0StopWritesTrigger)1666 public Options setLevel0StopWritesTrigger(int level0StopWritesTrigger) { 1667 setLevel0StopWritesTrigger(nativeHandle_, level0StopWritesTrigger); 1668 return this; 1669 } 1670 1671 @Override level0StopWritesTrigger()1672 public int level0StopWritesTrigger() { 1673 return level0StopWritesTrigger(nativeHandle_); 1674 } 1675 1676 @Override setMaxBytesForLevelMultiplierAdditional(int[] maxBytesForLevelMultiplierAdditional)1677 public Options setMaxBytesForLevelMultiplierAdditional(int[] maxBytesForLevelMultiplierAdditional) { 1678 setMaxBytesForLevelMultiplierAdditional(nativeHandle_, maxBytesForLevelMultiplierAdditional); 1679 return this; 1680 } 1681 1682 @Override maxBytesForLevelMultiplierAdditional()1683 public int[] maxBytesForLevelMultiplierAdditional() { 1684 return maxBytesForLevelMultiplierAdditional(nativeHandle_); 1685 } 1686 1687 @Override setParanoidFileChecks(boolean paranoidFileChecks)1688 public Options setParanoidFileChecks(boolean paranoidFileChecks) { 1689 setParanoidFileChecks(nativeHandle_, paranoidFileChecks); 1690 return this; 1691 } 1692 1693 @Override paranoidFileChecks()1694 public boolean paranoidFileChecks() { 1695 return paranoidFileChecks(nativeHandle_); 1696 } 1697 1698 @Override setMaxWriteBufferNumberToMaintain( final int maxWriteBufferNumberToMaintain)1699 public Options setMaxWriteBufferNumberToMaintain( 1700 final int maxWriteBufferNumberToMaintain) { 1701 setMaxWriteBufferNumberToMaintain( 1702 nativeHandle_, maxWriteBufferNumberToMaintain); 1703 return this; 1704 } 1705 1706 @Override maxWriteBufferNumberToMaintain()1707 public int maxWriteBufferNumberToMaintain() { 1708 return maxWriteBufferNumberToMaintain(nativeHandle_); 1709 } 1710 1711 @Override setCompactionPriority( final CompactionPriority compactionPriority)1712 public Options setCompactionPriority( 1713 final CompactionPriority compactionPriority) { 1714 setCompactionPriority(nativeHandle_, compactionPriority.getValue()); 1715 return this; 1716 } 1717 1718 @Override compactionPriority()1719 public CompactionPriority compactionPriority() { 1720 return CompactionPriority.getCompactionPriority( 1721 compactionPriority(nativeHandle_)); 1722 } 1723 1724 @Override setReportBgIoStats(final boolean reportBgIoStats)1725 public Options setReportBgIoStats(final boolean reportBgIoStats) { 1726 setReportBgIoStats(nativeHandle_, reportBgIoStats); 1727 return this; 1728 } 1729 1730 @Override reportBgIoStats()1731 public boolean reportBgIoStats() { 1732 return reportBgIoStats(nativeHandle_); 1733 } 1734 1735 @Override setTtl(final long ttl)1736 public Options setTtl(final long ttl) { 1737 setTtl(nativeHandle_, ttl); 1738 return this; 1739 } 1740 1741 @Override ttl()1742 public long ttl() { 1743 return ttl(nativeHandle_); 1744 } 1745 1746 @Override setCompactionOptionsUniversal( final CompactionOptionsUniversal compactionOptionsUniversal)1747 public Options setCompactionOptionsUniversal( 1748 final CompactionOptionsUniversal compactionOptionsUniversal) { 1749 setCompactionOptionsUniversal(nativeHandle_, 1750 compactionOptionsUniversal.nativeHandle_); 1751 this.compactionOptionsUniversal_ = compactionOptionsUniversal; 1752 return this; 1753 } 1754 1755 @Override compactionOptionsUniversal()1756 public CompactionOptionsUniversal compactionOptionsUniversal() { 1757 return this.compactionOptionsUniversal_; 1758 } 1759 1760 @Override setCompactionOptionsFIFO(final CompactionOptionsFIFO compactionOptionsFIFO)1761 public Options setCompactionOptionsFIFO(final CompactionOptionsFIFO compactionOptionsFIFO) { 1762 setCompactionOptionsFIFO(nativeHandle_, 1763 compactionOptionsFIFO.nativeHandle_); 1764 this.compactionOptionsFIFO_ = compactionOptionsFIFO; 1765 return this; 1766 } 1767 1768 @Override compactionOptionsFIFO()1769 public CompactionOptionsFIFO compactionOptionsFIFO() { 1770 return this.compactionOptionsFIFO_; 1771 } 1772 1773 @Override setForceConsistencyChecks(final boolean forceConsistencyChecks)1774 public Options setForceConsistencyChecks(final boolean forceConsistencyChecks) { 1775 setForceConsistencyChecks(nativeHandle_, forceConsistencyChecks); 1776 return this; 1777 } 1778 1779 @Override forceConsistencyChecks()1780 public boolean forceConsistencyChecks() { 1781 return forceConsistencyChecks(nativeHandle_); 1782 } 1783 1784 @Override setAtomicFlush(final boolean atomicFlush)1785 public Options setAtomicFlush(final boolean atomicFlush) { 1786 setAtomicFlush(nativeHandle_, atomicFlush); 1787 return this; 1788 } 1789 1790 @Override atomicFlush()1791 public boolean atomicFlush() { 1792 return atomicFlush(nativeHandle_); 1793 } 1794 newOptions()1795 private native static long newOptions(); newOptions(long dbOptHandle, long cfOptHandle)1796 private native static long newOptions(long dbOptHandle, 1797 long cfOptHandle); copyOptions(long handle)1798 private native static long copyOptions(long handle); disposeInternal(final long handle)1799 @Override protected final native void disposeInternal(final long handle); setEnv(long optHandle, long envHandle)1800 private native void setEnv(long optHandle, long envHandle); prepareForBulkLoad(long handle)1801 private native void prepareForBulkLoad(long handle); 1802 1803 // DB native handles setIncreaseParallelism(long handle, int totalThreads)1804 private native void setIncreaseParallelism(long handle, int totalThreads); setCreateIfMissing(long handle, boolean flag)1805 private native void setCreateIfMissing(long handle, boolean flag); createIfMissing(long handle)1806 private native boolean createIfMissing(long handle); setCreateMissingColumnFamilies( long handle, boolean flag)1807 private native void setCreateMissingColumnFamilies( 1808 long handle, boolean flag); createMissingColumnFamilies(long handle)1809 private native boolean createMissingColumnFamilies(long handle); setErrorIfExists(long handle, boolean errorIfExists)1810 private native void setErrorIfExists(long handle, boolean errorIfExists); errorIfExists(long handle)1811 private native boolean errorIfExists(long handle); setParanoidChecks( long handle, boolean paranoidChecks)1812 private native void setParanoidChecks( 1813 long handle, boolean paranoidChecks); paranoidChecks(long handle)1814 private native boolean paranoidChecks(long handle); setRateLimiter(long handle, long rateLimiterHandle)1815 private native void setRateLimiter(long handle, 1816 long rateLimiterHandle); setSstFileManager(final long handle, final long sstFileManagerHandle)1817 private native void setSstFileManager(final long handle, 1818 final long sstFileManagerHandle); setLogger(long handle, long loggerHandle)1819 private native void setLogger(long handle, 1820 long loggerHandle); setInfoLogLevel(long handle, byte logLevel)1821 private native void setInfoLogLevel(long handle, byte logLevel); infoLogLevel(long handle)1822 private native byte infoLogLevel(long handle); setMaxOpenFiles(long handle, int maxOpenFiles)1823 private native void setMaxOpenFiles(long handle, int maxOpenFiles); maxOpenFiles(long handle)1824 private native int maxOpenFiles(long handle); setMaxTotalWalSize(long handle, long maxTotalWalSize)1825 private native void setMaxTotalWalSize(long handle, 1826 long maxTotalWalSize); setMaxFileOpeningThreads(final long handle, final int maxFileOpeningThreads)1827 private native void setMaxFileOpeningThreads(final long handle, 1828 final int maxFileOpeningThreads); maxFileOpeningThreads(final long handle)1829 private native int maxFileOpeningThreads(final long handle); maxTotalWalSize(long handle)1830 private native long maxTotalWalSize(long handle); setStatistics(final long handle, final long statisticsHandle)1831 private native void setStatistics(final long handle, final long statisticsHandle); statistics(final long handle)1832 private native long statistics(final long handle); useFsync(long handle)1833 private native boolean useFsync(long handle); setUseFsync(long handle, boolean useFsync)1834 private native void setUseFsync(long handle, boolean useFsync); setDbPaths(final long handle, final String[] paths, final long[] targetSizes)1835 private native void setDbPaths(final long handle, final String[] paths, 1836 final long[] targetSizes); dbPathsLen(final long handle)1837 private native long dbPathsLen(final long handle); dbPaths(final long handle, final String[] paths, final long[] targetSizes)1838 private native void dbPaths(final long handle, final String[] paths, 1839 final long[] targetSizes); setDbLogDir(long handle, String dbLogDir)1840 private native void setDbLogDir(long handle, String dbLogDir); dbLogDir(long handle)1841 private native String dbLogDir(long handle); setWalDir(long handle, String walDir)1842 private native void setWalDir(long handle, String walDir); walDir(long handle)1843 private native String walDir(long handle); setDeleteObsoleteFilesPeriodMicros( long handle, long micros)1844 private native void setDeleteObsoleteFilesPeriodMicros( 1845 long handle, long micros); deleteObsoleteFilesPeriodMicros(long handle)1846 private native long deleteObsoleteFilesPeriodMicros(long handle); setBaseBackgroundCompactions(long handle, int baseBackgroundCompactions)1847 private native void setBaseBackgroundCompactions(long handle, 1848 int baseBackgroundCompactions); baseBackgroundCompactions(long handle)1849 private native int baseBackgroundCompactions(long handle); setMaxBackgroundCompactions( long handle, int maxBackgroundCompactions)1850 private native void setMaxBackgroundCompactions( 1851 long handle, int maxBackgroundCompactions); maxBackgroundCompactions(long handle)1852 private native int maxBackgroundCompactions(long handle); setMaxSubcompactions(long handle, int maxSubcompactions)1853 private native void setMaxSubcompactions(long handle, int maxSubcompactions); maxSubcompactions(long handle)1854 private native int maxSubcompactions(long handle); setMaxBackgroundFlushes( long handle, int maxBackgroundFlushes)1855 private native void setMaxBackgroundFlushes( 1856 long handle, int maxBackgroundFlushes); maxBackgroundFlushes(long handle)1857 private native int maxBackgroundFlushes(long handle); setMaxBackgroundJobs(long handle, int maxMaxBackgroundJobs)1858 private native void setMaxBackgroundJobs(long handle, int maxMaxBackgroundJobs); maxBackgroundJobs(long handle)1859 private native int maxBackgroundJobs(long handle); setMaxLogFileSize(long handle, long maxLogFileSize)1860 private native void setMaxLogFileSize(long handle, long maxLogFileSize) 1861 throws IllegalArgumentException; maxLogFileSize(long handle)1862 private native long maxLogFileSize(long handle); setLogFileTimeToRoll( long handle, long logFileTimeToRoll)1863 private native void setLogFileTimeToRoll( 1864 long handle, long logFileTimeToRoll) throws IllegalArgumentException; logFileTimeToRoll(long handle)1865 private native long logFileTimeToRoll(long handle); setKeepLogFileNum(long handle, long keepLogFileNum)1866 private native void setKeepLogFileNum(long handle, long keepLogFileNum) 1867 throws IllegalArgumentException; keepLogFileNum(long handle)1868 private native long keepLogFileNum(long handle); setRecycleLogFileNum(long handle, long recycleLogFileNum)1869 private native void setRecycleLogFileNum(long handle, long recycleLogFileNum); recycleLogFileNum(long handle)1870 private native long recycleLogFileNum(long handle); setMaxManifestFileSize( long handle, long maxManifestFileSize)1871 private native void setMaxManifestFileSize( 1872 long handle, long maxManifestFileSize); maxManifestFileSize(long handle)1873 private native long maxManifestFileSize(long handle); setMaxTableFilesSizeFIFO( long handle, long maxTableFilesSize)1874 private native void setMaxTableFilesSizeFIFO( 1875 long handle, long maxTableFilesSize); maxTableFilesSizeFIFO(long handle)1876 private native long maxTableFilesSizeFIFO(long handle); setTableCacheNumshardbits( long handle, int tableCacheNumshardbits)1877 private native void setTableCacheNumshardbits( 1878 long handle, int tableCacheNumshardbits); tableCacheNumshardbits(long handle)1879 private native int tableCacheNumshardbits(long handle); setWalTtlSeconds(long handle, long walTtlSeconds)1880 private native void setWalTtlSeconds(long handle, long walTtlSeconds); walTtlSeconds(long handle)1881 private native long walTtlSeconds(long handle); setWalSizeLimitMB(long handle, long sizeLimitMB)1882 private native void setWalSizeLimitMB(long handle, long sizeLimitMB); walSizeLimitMB(long handle)1883 private native long walSizeLimitMB(long handle); setManifestPreallocationSize( long handle, long size)1884 private native void setManifestPreallocationSize( 1885 long handle, long size) throws IllegalArgumentException; manifestPreallocationSize(long handle)1886 private native long manifestPreallocationSize(long handle); setUseDirectReads(long handle, boolean useDirectReads)1887 private native void setUseDirectReads(long handle, boolean useDirectReads); useDirectReads(long handle)1888 private native boolean useDirectReads(long handle); setUseDirectIoForFlushAndCompaction( long handle, boolean useDirectIoForFlushAndCompaction)1889 private native void setUseDirectIoForFlushAndCompaction( 1890 long handle, boolean useDirectIoForFlushAndCompaction); useDirectIoForFlushAndCompaction(long handle)1891 private native boolean useDirectIoForFlushAndCompaction(long handle); setAllowFAllocate(final long handle, final boolean allowFAllocate)1892 private native void setAllowFAllocate(final long handle, 1893 final boolean allowFAllocate); allowFAllocate(final long handle)1894 private native boolean allowFAllocate(final long handle); setAllowMmapReads( long handle, boolean allowMmapReads)1895 private native void setAllowMmapReads( 1896 long handle, boolean allowMmapReads); allowMmapReads(long handle)1897 private native boolean allowMmapReads(long handle); setAllowMmapWrites( long handle, boolean allowMmapWrites)1898 private native void setAllowMmapWrites( 1899 long handle, boolean allowMmapWrites); allowMmapWrites(long handle)1900 private native boolean allowMmapWrites(long handle); setIsFdCloseOnExec( long handle, boolean isFdCloseOnExec)1901 private native void setIsFdCloseOnExec( 1902 long handle, boolean isFdCloseOnExec); isFdCloseOnExec(long handle)1903 private native boolean isFdCloseOnExec(long handle); setStatsDumpPeriodSec( long handle, int statsDumpPeriodSec)1904 private native void setStatsDumpPeriodSec( 1905 long handle, int statsDumpPeriodSec); statsDumpPeriodSec(long handle)1906 private native int statsDumpPeriodSec(long handle); setStatsPersistPeriodSec( final long handle, final int statsPersistPeriodSec)1907 private native void setStatsPersistPeriodSec( 1908 final long handle, final int statsPersistPeriodSec); statsPersistPeriodSec( final long handle)1909 private native int statsPersistPeriodSec( 1910 final long handle); setStatsHistoryBufferSize( final long handle, final long statsHistoryBufferSize)1911 private native void setStatsHistoryBufferSize( 1912 final long handle, final long statsHistoryBufferSize); statsHistoryBufferSize( final long handle)1913 private native long statsHistoryBufferSize( 1914 final long handle); setAdviseRandomOnOpen( long handle, boolean adviseRandomOnOpen)1915 private native void setAdviseRandomOnOpen( 1916 long handle, boolean adviseRandomOnOpen); adviseRandomOnOpen(long handle)1917 private native boolean adviseRandomOnOpen(long handle); setDbWriteBufferSize(final long handle, final long dbWriteBufferSize)1918 private native void setDbWriteBufferSize(final long handle, 1919 final long dbWriteBufferSize); setWriteBufferManager(final long handle, final long writeBufferManagerHandle)1920 private native void setWriteBufferManager(final long handle, 1921 final long writeBufferManagerHandle); dbWriteBufferSize(final long handle)1922 private native long dbWriteBufferSize(final long handle); setAccessHintOnCompactionStart(final long handle, final byte accessHintOnCompactionStart)1923 private native void setAccessHintOnCompactionStart(final long handle, 1924 final byte accessHintOnCompactionStart); accessHintOnCompactionStart(final long handle)1925 private native byte accessHintOnCompactionStart(final long handle); setNewTableReaderForCompactionInputs(final long handle, final boolean newTableReaderForCompactionInputs)1926 private native void setNewTableReaderForCompactionInputs(final long handle, 1927 final boolean newTableReaderForCompactionInputs); newTableReaderForCompactionInputs(final long handle)1928 private native boolean newTableReaderForCompactionInputs(final long handle); setCompactionReadaheadSize(final long handle, final long compactionReadaheadSize)1929 private native void setCompactionReadaheadSize(final long handle, 1930 final long compactionReadaheadSize); compactionReadaheadSize(final long handle)1931 private native long compactionReadaheadSize(final long handle); setRandomAccessMaxBufferSize(final long handle, final long randomAccessMaxBufferSize)1932 private native void setRandomAccessMaxBufferSize(final long handle, 1933 final long randomAccessMaxBufferSize); randomAccessMaxBufferSize(final long handle)1934 private native long randomAccessMaxBufferSize(final long handle); setWritableFileMaxBufferSize(final long handle, final long writableFileMaxBufferSize)1935 private native void setWritableFileMaxBufferSize(final long handle, 1936 final long writableFileMaxBufferSize); writableFileMaxBufferSize(final long handle)1937 private native long writableFileMaxBufferSize(final long handle); setUseAdaptiveMutex( long handle, boolean useAdaptiveMutex)1938 private native void setUseAdaptiveMutex( 1939 long handle, boolean useAdaptiveMutex); useAdaptiveMutex(long handle)1940 private native boolean useAdaptiveMutex(long handle); setBytesPerSync( long handle, long bytesPerSync)1941 private native void setBytesPerSync( 1942 long handle, long bytesPerSync); bytesPerSync(long handle)1943 private native long bytesPerSync(long handle); setWalBytesPerSync(long handle, long walBytesPerSync)1944 private native void setWalBytesPerSync(long handle, long walBytesPerSync); walBytesPerSync(long handle)1945 private native long walBytesPerSync(long handle); setStrictBytesPerSync( final long handle, final boolean strictBytesPerSync)1946 private native void setStrictBytesPerSync( 1947 final long handle, final boolean strictBytesPerSync); strictBytesPerSync( final long handle)1948 private native boolean strictBytesPerSync( 1949 final long handle); setEnableThreadTracking(long handle, boolean enableThreadTracking)1950 private native void setEnableThreadTracking(long handle, 1951 boolean enableThreadTracking); enableThreadTracking(long handle)1952 private native boolean enableThreadTracking(long handle); setDelayedWriteRate(long handle, long delayedWriteRate)1953 private native void setDelayedWriteRate(long handle, long delayedWriteRate); delayedWriteRate(long handle)1954 private native long delayedWriteRate(long handle); setEnablePipelinedWrite(final long handle, final boolean pipelinedWrite)1955 private native void setEnablePipelinedWrite(final long handle, 1956 final boolean pipelinedWrite); enablePipelinedWrite(final long handle)1957 private native boolean enablePipelinedWrite(final long handle); setUnorderedWrite(final long handle, final boolean unorderedWrite)1958 private native void setUnorderedWrite(final long handle, 1959 final boolean unorderedWrite); unorderedWrite(final long handle)1960 private native boolean unorderedWrite(final long handle); setAllowConcurrentMemtableWrite(long handle, boolean allowConcurrentMemtableWrite)1961 private native void setAllowConcurrentMemtableWrite(long handle, 1962 boolean allowConcurrentMemtableWrite); allowConcurrentMemtableWrite(long handle)1963 private native boolean allowConcurrentMemtableWrite(long handle); setEnableWriteThreadAdaptiveYield(long handle, boolean enableWriteThreadAdaptiveYield)1964 private native void setEnableWriteThreadAdaptiveYield(long handle, 1965 boolean enableWriteThreadAdaptiveYield); enableWriteThreadAdaptiveYield(long handle)1966 private native boolean enableWriteThreadAdaptiveYield(long handle); setWriteThreadMaxYieldUsec(long handle, long writeThreadMaxYieldUsec)1967 private native void setWriteThreadMaxYieldUsec(long handle, 1968 long writeThreadMaxYieldUsec); writeThreadMaxYieldUsec(long handle)1969 private native long writeThreadMaxYieldUsec(long handle); setWriteThreadSlowYieldUsec(long handle, long writeThreadSlowYieldUsec)1970 private native void setWriteThreadSlowYieldUsec(long handle, 1971 long writeThreadSlowYieldUsec); writeThreadSlowYieldUsec(long handle)1972 private native long writeThreadSlowYieldUsec(long handle); setSkipStatsUpdateOnDbOpen(final long handle, final boolean skipStatsUpdateOnDbOpen)1973 private native void setSkipStatsUpdateOnDbOpen(final long handle, 1974 final boolean skipStatsUpdateOnDbOpen); skipStatsUpdateOnDbOpen(final long handle)1975 private native boolean skipStatsUpdateOnDbOpen(final long handle); setWalRecoveryMode(final long handle, final byte walRecoveryMode)1976 private native void setWalRecoveryMode(final long handle, 1977 final byte walRecoveryMode); walRecoveryMode(final long handle)1978 private native byte walRecoveryMode(final long handle); setAllow2pc(final long handle, final boolean allow2pc)1979 private native void setAllow2pc(final long handle, 1980 final boolean allow2pc); allow2pc(final long handle)1981 private native boolean allow2pc(final long handle); setRowCache(final long handle, final long rowCacheHandle)1982 private native void setRowCache(final long handle, 1983 final long rowCacheHandle); setWalFilter(final long handle, final long walFilterHandle)1984 private native void setWalFilter(final long handle, 1985 final long walFilterHandle); setFailIfOptionsFileError(final long handle, final boolean failIfOptionsFileError)1986 private native void setFailIfOptionsFileError(final long handle, 1987 final boolean failIfOptionsFileError); failIfOptionsFileError(final long handle)1988 private native boolean failIfOptionsFileError(final long handle); setDumpMallocStats(final long handle, final boolean dumpMallocStats)1989 private native void setDumpMallocStats(final long handle, 1990 final boolean dumpMallocStats); dumpMallocStats(final long handle)1991 private native boolean dumpMallocStats(final long handle); setAvoidFlushDuringRecovery(final long handle, final boolean avoidFlushDuringRecovery)1992 private native void setAvoidFlushDuringRecovery(final long handle, 1993 final boolean avoidFlushDuringRecovery); avoidFlushDuringRecovery(final long handle)1994 private native boolean avoidFlushDuringRecovery(final long handle); setAvoidFlushDuringShutdown(final long handle, final boolean avoidFlushDuringShutdown)1995 private native void setAvoidFlushDuringShutdown(final long handle, 1996 final boolean avoidFlushDuringShutdown); avoidFlushDuringShutdown(final long handle)1997 private native boolean avoidFlushDuringShutdown(final long handle); setAllowIngestBehind(final long handle, final boolean allowIngestBehind)1998 private native void setAllowIngestBehind(final long handle, 1999 final boolean allowIngestBehind); allowIngestBehind(final long handle)2000 private native boolean allowIngestBehind(final long handle); setPreserveDeletes(final long handle, final boolean preserveDeletes)2001 private native void setPreserveDeletes(final long handle, 2002 final boolean preserveDeletes); preserveDeletes(final long handle)2003 private native boolean preserveDeletes(final long handle); setTwoWriteQueues(final long handle, final boolean twoWriteQueues)2004 private native void setTwoWriteQueues(final long handle, 2005 final boolean twoWriteQueues); twoWriteQueues(final long handle)2006 private native boolean twoWriteQueues(final long handle); setManualWalFlush(final long handle, final boolean manualWalFlush)2007 private native void setManualWalFlush(final long handle, 2008 final boolean manualWalFlush); manualWalFlush(final long handle)2009 private native boolean manualWalFlush(final long handle); 2010 2011 2012 // CF native handles optimizeForSmallDb(final long handle)2013 private native void optimizeForSmallDb(final long handle); optimizeForPointLookup(long handle, long blockCacheSizeMb)2014 private native void optimizeForPointLookup(long handle, 2015 long blockCacheSizeMb); optimizeLevelStyleCompaction(long handle, long memtableMemoryBudget)2016 private native void optimizeLevelStyleCompaction(long handle, 2017 long memtableMemoryBudget); optimizeUniversalStyleCompaction(long handle, long memtableMemoryBudget)2018 private native void optimizeUniversalStyleCompaction(long handle, 2019 long memtableMemoryBudget); setComparatorHandle(long handle, int builtinComparator)2020 private native void setComparatorHandle(long handle, int builtinComparator); setComparatorHandle(long optHandle, long comparatorHandle, byte comparatorType)2021 private native void setComparatorHandle(long optHandle, 2022 long comparatorHandle, byte comparatorType); setMergeOperatorName( long handle, String name)2023 private native void setMergeOperatorName( 2024 long handle, String name); setMergeOperator( long handle, long mergeOperatorHandle)2025 private native void setMergeOperator( 2026 long handle, long mergeOperatorHandle); setCompactionFilterHandle( long handle, long compactionFilterHandle)2027 private native void setCompactionFilterHandle( 2028 long handle, long compactionFilterHandle); setCompactionFilterFactoryHandle( long handle, long compactionFilterFactoryHandle)2029 private native void setCompactionFilterFactoryHandle( 2030 long handle, long compactionFilterFactoryHandle); setWriteBufferSize(long handle, long writeBufferSize)2031 private native void setWriteBufferSize(long handle, long writeBufferSize) 2032 throws IllegalArgumentException; writeBufferSize(long handle)2033 private native long writeBufferSize(long handle); setMaxWriteBufferNumber( long handle, int maxWriteBufferNumber)2034 private native void setMaxWriteBufferNumber( 2035 long handle, int maxWriteBufferNumber); maxWriteBufferNumber(long handle)2036 private native int maxWriteBufferNumber(long handle); setMinWriteBufferNumberToMerge( long handle, int minWriteBufferNumberToMerge)2037 private native void setMinWriteBufferNumberToMerge( 2038 long handle, int minWriteBufferNumberToMerge); minWriteBufferNumberToMerge(long handle)2039 private native int minWriteBufferNumberToMerge(long handle); setCompressionType(long handle, byte compressionType)2040 private native void setCompressionType(long handle, byte compressionType); compressionType(long handle)2041 private native byte compressionType(long handle); setCompressionPerLevel(long handle, byte[] compressionLevels)2042 private native void setCompressionPerLevel(long handle, 2043 byte[] compressionLevels); compressionPerLevel(long handle)2044 private native byte[] compressionPerLevel(long handle); setBottommostCompressionType(long handle, byte bottommostCompressionType)2045 private native void setBottommostCompressionType(long handle, 2046 byte bottommostCompressionType); bottommostCompressionType(long handle)2047 private native byte bottommostCompressionType(long handle); setBottommostCompressionOptions(final long handle, final long bottommostCompressionOptionsHandle)2048 private native void setBottommostCompressionOptions(final long handle, 2049 final long bottommostCompressionOptionsHandle); setCompressionOptions(long handle, long compressionOptionsHandle)2050 private native void setCompressionOptions(long handle, 2051 long compressionOptionsHandle); useFixedLengthPrefixExtractor( long handle, int prefixLength)2052 private native void useFixedLengthPrefixExtractor( 2053 long handle, int prefixLength); useCappedPrefixExtractor( long handle, int prefixLength)2054 private native void useCappedPrefixExtractor( 2055 long handle, int prefixLength); setNumLevels( long handle, int numLevels)2056 private native void setNumLevels( 2057 long handle, int numLevels); numLevels(long handle)2058 private native int numLevels(long handle); setLevelZeroFileNumCompactionTrigger( long handle, int numFiles)2059 private native void setLevelZeroFileNumCompactionTrigger( 2060 long handle, int numFiles); levelZeroFileNumCompactionTrigger(long handle)2061 private native int levelZeroFileNumCompactionTrigger(long handle); setLevelZeroSlowdownWritesTrigger( long handle, int numFiles)2062 private native void setLevelZeroSlowdownWritesTrigger( 2063 long handle, int numFiles); levelZeroSlowdownWritesTrigger(long handle)2064 private native int levelZeroSlowdownWritesTrigger(long handle); setLevelZeroStopWritesTrigger( long handle, int numFiles)2065 private native void setLevelZeroStopWritesTrigger( 2066 long handle, int numFiles); levelZeroStopWritesTrigger(long handle)2067 private native int levelZeroStopWritesTrigger(long handle); setTargetFileSizeBase( long handle, long targetFileSizeBase)2068 private native void setTargetFileSizeBase( 2069 long handle, long targetFileSizeBase); targetFileSizeBase(long handle)2070 private native long targetFileSizeBase(long handle); setTargetFileSizeMultiplier( long handle, int multiplier)2071 private native void setTargetFileSizeMultiplier( 2072 long handle, int multiplier); targetFileSizeMultiplier(long handle)2073 private native int targetFileSizeMultiplier(long handle); setMaxBytesForLevelBase( long handle, long maxBytesForLevelBase)2074 private native void setMaxBytesForLevelBase( 2075 long handle, long maxBytesForLevelBase); maxBytesForLevelBase(long handle)2076 private native long maxBytesForLevelBase(long handle); setLevelCompactionDynamicLevelBytes( long handle, boolean enableLevelCompactionDynamicLevelBytes)2077 private native void setLevelCompactionDynamicLevelBytes( 2078 long handle, boolean enableLevelCompactionDynamicLevelBytes); levelCompactionDynamicLevelBytes( long handle)2079 private native boolean levelCompactionDynamicLevelBytes( 2080 long handle); setMaxBytesForLevelMultiplier(long handle, double multiplier)2081 private native void setMaxBytesForLevelMultiplier(long handle, double multiplier); maxBytesForLevelMultiplier(long handle)2082 private native double maxBytesForLevelMultiplier(long handle); setMaxCompactionBytes(long handle, long maxCompactionBytes)2083 private native void setMaxCompactionBytes(long handle, long maxCompactionBytes); maxCompactionBytes(long handle)2084 private native long maxCompactionBytes(long handle); setArenaBlockSize( long handle, long arenaBlockSize)2085 private native void setArenaBlockSize( 2086 long handle, long arenaBlockSize) throws IllegalArgumentException; arenaBlockSize(long handle)2087 private native long arenaBlockSize(long handle); setDisableAutoCompactions( long handle, boolean disableAutoCompactions)2088 private native void setDisableAutoCompactions( 2089 long handle, boolean disableAutoCompactions); disableAutoCompactions(long handle)2090 private native boolean disableAutoCompactions(long handle); setCompactionStyle(long handle, byte compactionStyle)2091 private native void setCompactionStyle(long handle, byte compactionStyle); compactionStyle(long handle)2092 private native byte compactionStyle(long handle); setMaxSequentialSkipInIterations( long handle, long maxSequentialSkipInIterations)2093 private native void setMaxSequentialSkipInIterations( 2094 long handle, long maxSequentialSkipInIterations); maxSequentialSkipInIterations(long handle)2095 private native long maxSequentialSkipInIterations(long handle); setMemTableFactory(long handle, long factoryHandle)2096 private native void setMemTableFactory(long handle, long factoryHandle); memTableFactoryName(long handle)2097 private native String memTableFactoryName(long handle); setTableFactory(long handle, long factoryHandle)2098 private native void setTableFactory(long handle, long factoryHandle); tableFactoryName(long handle)2099 private native String tableFactoryName(long handle); setInplaceUpdateSupport( long handle, boolean inplaceUpdateSupport)2100 private native void setInplaceUpdateSupport( 2101 long handle, boolean inplaceUpdateSupport); inplaceUpdateSupport(long handle)2102 private native boolean inplaceUpdateSupport(long handle); setInplaceUpdateNumLocks( long handle, long inplaceUpdateNumLocks)2103 private native void setInplaceUpdateNumLocks( 2104 long handle, long inplaceUpdateNumLocks) 2105 throws IllegalArgumentException; inplaceUpdateNumLocks(long handle)2106 private native long inplaceUpdateNumLocks(long handle); setMemtablePrefixBloomSizeRatio( long handle, double memtablePrefixBloomSizeRatio)2107 private native void setMemtablePrefixBloomSizeRatio( 2108 long handle, double memtablePrefixBloomSizeRatio); memtablePrefixBloomSizeRatio(long handle)2109 private native double memtablePrefixBloomSizeRatio(long handle); setBloomLocality( long handle, int bloomLocality)2110 private native void setBloomLocality( 2111 long handle, int bloomLocality); bloomLocality(long handle)2112 private native int bloomLocality(long handle); setMaxSuccessiveMerges( long handle, long maxSuccessiveMerges)2113 private native void setMaxSuccessiveMerges( 2114 long handle, long maxSuccessiveMerges) 2115 throws IllegalArgumentException; maxSuccessiveMerges(long handle)2116 private native long maxSuccessiveMerges(long handle); setOptimizeFiltersForHits(long handle, boolean optimizeFiltersForHits)2117 private native void setOptimizeFiltersForHits(long handle, 2118 boolean optimizeFiltersForHits); optimizeFiltersForHits(long handle)2119 private native boolean optimizeFiltersForHits(long handle); setMemtableHugePageSize(long handle, long memtableHugePageSize)2120 private native void setMemtableHugePageSize(long handle, 2121 long memtableHugePageSize); memtableHugePageSize(long handle)2122 private native long memtableHugePageSize(long handle); setSoftPendingCompactionBytesLimit(long handle, long softPendingCompactionBytesLimit)2123 private native void setSoftPendingCompactionBytesLimit(long handle, 2124 long softPendingCompactionBytesLimit); softPendingCompactionBytesLimit(long handle)2125 private native long softPendingCompactionBytesLimit(long handle); setHardPendingCompactionBytesLimit(long handle, long hardPendingCompactionBytesLimit)2126 private native void setHardPendingCompactionBytesLimit(long handle, 2127 long hardPendingCompactionBytesLimit); hardPendingCompactionBytesLimit(long handle)2128 private native long hardPendingCompactionBytesLimit(long handle); setLevel0FileNumCompactionTrigger(long handle, int level0FileNumCompactionTrigger)2129 private native void setLevel0FileNumCompactionTrigger(long handle, 2130 int level0FileNumCompactionTrigger); level0FileNumCompactionTrigger(long handle)2131 private native int level0FileNumCompactionTrigger(long handle); setLevel0SlowdownWritesTrigger(long handle, int level0SlowdownWritesTrigger)2132 private native void setLevel0SlowdownWritesTrigger(long handle, 2133 int level0SlowdownWritesTrigger); level0SlowdownWritesTrigger(long handle)2134 private native int level0SlowdownWritesTrigger(long handle); setLevel0StopWritesTrigger(long handle, int level0StopWritesTrigger)2135 private native void setLevel0StopWritesTrigger(long handle, 2136 int level0StopWritesTrigger); level0StopWritesTrigger(long handle)2137 private native int level0StopWritesTrigger(long handle); setMaxBytesForLevelMultiplierAdditional(long handle, int[] maxBytesForLevelMultiplierAdditional)2138 private native void setMaxBytesForLevelMultiplierAdditional(long handle, 2139 int[] maxBytesForLevelMultiplierAdditional); maxBytesForLevelMultiplierAdditional(long handle)2140 private native int[] maxBytesForLevelMultiplierAdditional(long handle); setParanoidFileChecks(long handle, boolean paranoidFileChecks)2141 private native void setParanoidFileChecks(long handle, 2142 boolean paranoidFileChecks); paranoidFileChecks(long handle)2143 private native boolean paranoidFileChecks(long handle); setMaxWriteBufferNumberToMaintain(final long handle, final int maxWriteBufferNumberToMaintain)2144 private native void setMaxWriteBufferNumberToMaintain(final long handle, 2145 final int maxWriteBufferNumberToMaintain); maxWriteBufferNumberToMaintain(final long handle)2146 private native int maxWriteBufferNumberToMaintain(final long handle); setCompactionPriority(final long handle, final byte compactionPriority)2147 private native void setCompactionPriority(final long handle, 2148 final byte compactionPriority); compactionPriority(final long handle)2149 private native byte compactionPriority(final long handle); setReportBgIoStats(final long handle, final boolean reportBgIoStats)2150 private native void setReportBgIoStats(final long handle, 2151 final boolean reportBgIoStats); reportBgIoStats(final long handle)2152 private native boolean reportBgIoStats(final long handle); setTtl(final long handle, final long ttl)2153 private native void setTtl(final long handle, final long ttl); ttl(final long handle)2154 private native long ttl(final long handle); setCompactionOptionsUniversal(final long handle, final long compactionOptionsUniversalHandle)2155 private native void setCompactionOptionsUniversal(final long handle, 2156 final long compactionOptionsUniversalHandle); setCompactionOptionsFIFO(final long handle, final long compactionOptionsFIFOHandle)2157 private native void setCompactionOptionsFIFO(final long handle, 2158 final long compactionOptionsFIFOHandle); setForceConsistencyChecks(final long handle, final boolean forceConsistencyChecks)2159 private native void setForceConsistencyChecks(final long handle, 2160 final boolean forceConsistencyChecks); forceConsistencyChecks(final long handle)2161 private native boolean forceConsistencyChecks(final long handle); setAtomicFlush(final long handle, final boolean atomicFlush)2162 private native void setAtomicFlush(final long handle, 2163 final boolean atomicFlush); atomicFlush(final long handle)2164 private native boolean atomicFlush(final long handle); 2165 2166 // instance variables 2167 // NOTE: If you add new member variables, please update the copy constructor above! 2168 private Env env_; 2169 private MemTableConfig memTableConfig_; 2170 private TableFormatConfig tableFormatConfig_; 2171 private RateLimiter rateLimiter_; 2172 private AbstractComparator comparator_; 2173 private AbstractCompactionFilter<? extends AbstractSlice<?>> compactionFilter_; 2174 private AbstractCompactionFilterFactory<? extends AbstractCompactionFilter<?>> 2175 compactionFilterFactory_; 2176 private CompactionOptionsUniversal compactionOptionsUniversal_; 2177 private CompactionOptionsFIFO compactionOptionsFIFO_; 2178 private CompressionOptions bottommostCompressionOptions_; 2179 private CompressionOptions compressionOptions_; 2180 private Cache rowCache_; 2181 private WalFilter walFilter_; 2182 private WriteBufferManager writeBufferManager_; 2183 } 2184