From 24801d26c05c7ee059f8c40174f53314d753d439 Mon Sep 17 00:00:00 2001 From: Radek Hubner Date: Tue, 3 Oct 2023 11:56:13 +0400 Subject: [PATCH] Fix formatting. --- java/rocksjni/backup_engine_options.cc | 7 +- java/rocksjni/backupenginejni.cc | 4 +- java/rocksjni/checkpoint.cc | 4 +- java/rocksjni/clock_cache.cc | 4 +- java/rocksjni/columnfamilyhandle.cc | 7 +- java/rocksjni/compact_range_options.cc | 4 +- java/rocksjni/compaction_job_info.cc | 2 +- java/rocksjni/compaction_job_stats.cc | 2 +- java/rocksjni/compaction_options.cc | 2 +- java/rocksjni/compaction_options_fifo.cc | 5 +- java/rocksjni/comparator.cc | 3 +- java/rocksjni/compression_options.cc | 8 +- java/rocksjni/concurrent_task_limiter.cc | 5 +- java/rocksjni/config_options.cc | 2 +- java/rocksjni/env.cc | 7 +- java/rocksjni/env_options.cc | 5 +- java/rocksjni/filter.cc | 5 +- java/rocksjni/ingest_external_file_options.cc | 5 +- java/rocksjni/iterator.cc | 44 +- java/rocksjni/lru_cache.cc | 4 +- java/rocksjni/merge_operator.cc | 8 +- java/rocksjni/optimistic_transaction_db.cc | 4 +- .../optimistic_transaction_options.cc | 3 +- java/rocksjni/options.cc | 131 ++-- java/rocksjni/persistent_cache.cc | 2 +- java/rocksjni/portal.h | 4 +- java/rocksjni/ratelimiterjni.cc | 4 +- java/rocksjni/restorejni.cc | 4 +- java/rocksjni/rocksjni.cc | 10 +- java/rocksjni/slice.cc | 12 +- java/rocksjni/sst_file_manager.cc | 7 +- java/rocksjni/sst_file_reader_iterator.cc | 61 +- java/rocksjni/sst_file_readerjni.cc | 14 +- java/rocksjni/sst_file_writerjni.cc | 21 +- java/rocksjni/statistics.cc | 5 +- java/rocksjni/table.cc | 6 +- java/rocksjni/transaction.cc | 22 +- java/rocksjni/transaction_db.cc | 2 +- java/rocksjni/transaction_db_options.cc | 4 +- java/rocksjni/transaction_log.cc | 4 +- java/rocksjni/transaction_options.cc | 4 +- java/rocksjni/write_batch.cc | 122 ++-- java/rocksjni/write_batch_with_index.cc | 134 ++-- java/rocksjni/write_buffer_manager.cc | 4 +- .../main/java/org/rocksdb/AbstractSlice.java | 1 - .../rocksdb/AbstractTransactionNotifier.java | 1 - .../main/java/org/rocksdb/BackupEngine.java | 13 +- .../java/org/rocksdb/BackupEngineOptions.java | 15 +- .../rocksdb/CassandraValueMergeOperator.java | 4 +- .../src/main/java/org/rocksdb/Checkpoint.java | 3 +- .../src/main/java/org/rocksdb/ClockCache.java | 3 +- .../java/org/rocksdb/ColumnFamilyHandle.java | 6 +- .../java/org/rocksdb/ColumnFamilyOptions.java | 156 ++-- .../java/org/rocksdb/CompactRangeOptions.java | 26 +- .../java/org/rocksdb/CompactionJobInfo.java | 3 +- .../java/org/rocksdb/CompactionJobStats.java | 4 +- .../java/org/rocksdb/CompactionOptions.java | 3 +- .../org/rocksdb/CompactionOptionsFIFO.java | 9 +- .../rocksdb/CompactionOptionsUniversal.java | 15 +- .../java/org/rocksdb/ComparatorOptions.java | 14 +- .../java/org/rocksdb/CompressionOptions.java | 6 +- .../rocksdb/ConcurrentTaskLimiterImpl.java | 3 +- .../main/java/org/rocksdb/ConfigOptions.java | 3 +- java/src/main/java/org/rocksdb/DBOptions.java | 181 ++--- .../main/java/org/rocksdb/DirectSlice.java | 12 +- java/src/main/java/org/rocksdb/Env.java | 19 +- .../src/main/java/org/rocksdb/EnvOptions.java | 27 +- .../main/java/org/rocksdb/FlushOptions.java | 9 +- .../rocksdb/HashLinkedListMemTableConfig.java | 5 +- .../rocksdb/HashSkipListMemTableConfig.java | 3 +- .../rocksdb/IngestExternalFileOptions.java | 20 +- java/src/main/java/org/rocksdb/LRUCache.java | 3 +- .../org/rocksdb/OptimisticTransactionDB.java | 16 +- .../rocksdb/OptimisticTransactionOptions.java | 9 +- java/src/main/java/org/rocksdb/Options.java | 678 ++++++++---------- .../java/org/rocksdb/PersistentCache.java | 3 +- .../java/org/rocksdb/PlainTableConfig.java | 6 +- .../main/java/org/rocksdb/RateLimiter.java | 6 +- .../main/java/org/rocksdb/ReadOptions.java | 26 +- .../main/java/org/rocksdb/RestoreOptions.java | 3 +- java/src/main/java/org/rocksdb/RocksDB.java | 294 ++++---- java/src/main/java/org/rocksdb/RocksEnv.java | 3 +- .../main/java/org/rocksdb/RocksIterator.java | 55 +- .../main/java/org/rocksdb/RocksMemEnv.java | 3 +- java/src/main/java/org/rocksdb/Slice.java | 6 +- .../main/java/org/rocksdb/SstFileManager.java | 28 +- .../main/java/org/rocksdb/SstFileReader.java | 12 +- .../org/rocksdb/SstFileReaderIterator.java | 60 +- .../main/java/org/rocksdb/SstFileWriter.java | 27 +- .../SstPartitionerFixedPrefixFactory.java | 3 +- .../src/main/java/org/rocksdb/Statistics.java | 17 +- .../org/rocksdb/StringAppendOperator.java | 3 +- java/src/main/java/org/rocksdb/TimedEnv.java | 3 +- .../main/java/org/rocksdb/Transaction.java | 130 ++-- .../main/java/org/rocksdb/TransactionDB.java | 23 +- .../org/rocksdb/TransactionDBOptions.java | 14 +- .../org/rocksdb/TransactionLogIterator.java | 6 +- .../java/org/rocksdb/TransactionOptions.java | 16 +- java/src/main/java/org/rocksdb/TtlDB.java | 7 +- .../java/org/rocksdb/UInt64AddOperator.java | 5 +- .../java/org/rocksdb/WBWIRocksIterator.java | 40 +- .../src/main/java/org/rocksdb/WriteBatch.java | 157 ++-- .../java/org/rocksdb/WriteBatchWithIndex.java | 145 ++-- .../main/java/org/rocksdb/WriteOptions.java | 10 +- 104 files changed, 1448 insertions(+), 1654 deletions(-) diff --git a/java/rocksjni/backup_engine_options.cc b/java/rocksjni/backup_engine_options.cc index df9884a1ebcc..4304a48617da 100644 --- a/java/rocksjni/backup_engine_options.cc +++ b/java/rocksjni/backup_engine_options.cc @@ -197,8 +197,7 @@ jboolean Java_org_rocksdb_BackupEngineOptions_backupLogFiles(JNIEnv* /*env*/, * Signature: (JJ)V */ void Java_org_rocksdb_BackupEngineOptions_setBackupRateLimit( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, - jlong jbackup_rate_limit) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, jlong jbackup_rate_limit) { auto* bopt = reinterpret_cast(jhandle); bopt->backup_rate_limit = jbackup_rate_limit; @@ -356,8 +355,8 @@ jlong Java_org_rocksdb_BackupEngineOptions_callbackTriggerIntervalSize( * Signature: (J)V */ void Java_org_rocksdb_BackupEngineOptions_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { auto* bopt = reinterpret_cast(jhandle); assert(bopt != nullptr); diff --git a/java/rocksjni/backupenginejni.cc b/java/rocksjni/backupenginejni.cc index d93178b1d816..8d25b1a6ee30 100644 --- a/java/rocksjni/backupenginejni.cc +++ b/java/rocksjni/backupenginejni.cc @@ -271,8 +271,8 @@ void Java_org_rocksdb_BackupEngine_restoreDbFromLatestBackup( * Signature: (J)V */ void Java_org_rocksdb_BackupEngine_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jbe_handle) { + jclass /*jcls*/, + jlong jbe_handle) { auto* be = reinterpret_cast(jbe_handle); assert(be != nullptr); delete be; diff --git a/java/rocksjni/checkpoint.cc b/java/rocksjni/checkpoint.cc index 738d9a8b1cce..39a877cbc401 100644 --- a/java/rocksjni/checkpoint.cc +++ b/java/rocksjni/checkpoint.cc @@ -38,8 +38,8 @@ jlong Java_org_rocksdb_Checkpoint_newCheckpoint(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_Checkpoint_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong jhandle) { + jclass /*jobj*/, + jlong jhandle) { auto* checkpoint = reinterpret_cast(jhandle); assert(checkpoint != nullptr); delete checkpoint; diff --git a/java/rocksjni/clock_cache.cc b/java/rocksjni/clock_cache.cc index 01fca7dbfefc..5801311a3911 100644 --- a/java/rocksjni/clock_cache.cc +++ b/java/rocksjni/clock_cache.cc @@ -34,8 +34,8 @@ jlong Java_org_rocksdb_ClockCache_newClockCache( * Signature: (J)V */ void Java_org_rocksdb_ClockCache_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { auto* sptr_clock_cache = reinterpret_cast*>(jhandle); delete sptr_clock_cache; // delete std::shared_ptr diff --git a/java/rocksjni/columnfamilyhandle.cc b/java/rocksjni/columnfamilyhandle.cc index 9a6f30eb17ac..70456a65ed03 100644 --- a/java/rocksjni/columnfamilyhandle.cc +++ b/java/rocksjni/columnfamilyhandle.cc @@ -31,8 +31,7 @@ jbyteArray Java_org_rocksdb_ColumnFamilyHandle_getName(JNIEnv* env, * Method: getID * Signature: (J)I */ -jint Java_org_rocksdb_ColumnFamilyHandle_getID(JNIEnv* /*env*/, - jclass /*jcls*/, +jint Java_org_rocksdb_ColumnFamilyHandle_getID(JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle) { auto* cfh = reinterpret_cast(jhandle); const int32_t id = cfh->GetID(); @@ -64,8 +63,8 @@ jobject Java_org_rocksdb_ColumnFamilyHandle_getDescriptor(JNIEnv* env, * Signature: (J)V */ void Java_org_rocksdb_ColumnFamilyHandle_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong jhandle) { + jclass /*jobj*/, + jlong jhandle) { auto* cfh = reinterpret_cast(jhandle); assert(cfh != nullptr); delete cfh; diff --git a/java/rocksjni/compact_range_options.cc b/java/rocksjni/compact_range_options.cc index ff61fe18a860..a374795c4df6 100644 --- a/java/rocksjni/compact_range_options.cc +++ b/java/rocksjni/compact_range_options.cc @@ -330,8 +330,8 @@ jboolean Java_org_rocksdb_CompactRangeOptions_canceled(JNIEnv*, jclass, * Signature: (J)V */ void Java_org_rocksdb_CompactRangeOptions_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { auto* options = reinterpret_cast(jhandle); delete options; diff --git a/java/rocksjni/compaction_job_info.cc b/java/rocksjni/compaction_job_info.cc index 2066396aa26f..b3a48b3737af 100644 --- a/java/rocksjni/compaction_job_info.cc +++ b/java/rocksjni/compaction_job_info.cc @@ -29,7 +29,7 @@ jlong Java_org_rocksdb_CompactionJobInfo_newCompactionJobInfo(JNIEnv*, jclass) { * Signature: (J)V */ void Java_org_rocksdb_CompactionJobInfo_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* compact_job_info = reinterpret_cast(jhandle); delete compact_job_info; diff --git a/java/rocksjni/compaction_job_stats.cc b/java/rocksjni/compaction_job_stats.cc index 883c86682f9a..788a846efb34 100644 --- a/java/rocksjni/compaction_job_stats.cc +++ b/java/rocksjni/compaction_job_stats.cc @@ -31,7 +31,7 @@ jlong Java_org_rocksdb_CompactionJobStats_newCompactionJobStats(JNIEnv*, * Signature: (J)V */ void Java_org_rocksdb_CompactionJobStats_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* compact_job_stats = reinterpret_cast(jhandle); delete compact_job_stats; diff --git a/java/rocksjni/compaction_options.cc b/java/rocksjni/compaction_options.cc index 740a82b4ca1c..fe5e8edf91b0 100644 --- a/java/rocksjni/compaction_options.cc +++ b/java/rocksjni/compaction_options.cc @@ -29,7 +29,7 @@ jlong Java_org_rocksdb_CompactionOptions_newCompactionOptions(JNIEnv*, jclass) { * Signature: (J)V */ void Java_org_rocksdb_CompactionOptions_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* compact_opts = reinterpret_cast(jhandle); delete compact_opts; diff --git a/java/rocksjni/compaction_options_fifo.cc b/java/rocksjni/compaction_options_fifo.cc index 7ef379769bfc..535562fb47f7 100644 --- a/java/rocksjni/compaction_options_fifo.cc +++ b/java/rocksjni/compaction_options_fifo.cc @@ -64,8 +64,7 @@ void Java_org_rocksdb_CompactionOptionsFIFO_setAllowCompaction( * Method: allowCompaction * Signature: (J)Z */ -jboolean Java_org_rocksdb_CompactionOptionsFIFO_allowCompaction(JNIEnv*, - jclass, +jboolean Java_org_rocksdb_CompactionOptionsFIFO_allowCompaction(JNIEnv*, jclass, jlong jhandle) { auto* opt = reinterpret_cast(jhandle); @@ -78,6 +77,6 @@ jboolean Java_org_rocksdb_CompactionOptionsFIFO_allowCompaction(JNIEnv*, * Signature: (J)V */ void Java_org_rocksdb_CompactionOptionsFIFO_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { delete reinterpret_cast(jhandle); } diff --git a/java/rocksjni/comparator.cc b/java/rocksjni/comparator.cc index 9547a41fde43..be49f5ef176e 100644 --- a/java/rocksjni/comparator.cc +++ b/java/rocksjni/comparator.cc @@ -39,8 +39,7 @@ jlong Java_org_rocksdb_AbstractComparator_createNewComparator( * Method: usingDirectBuffers * Signature: (J)Z */ -jboolean Java_org_rocksdb_AbstractComparator_usingDirectBuffers(JNIEnv*, - jclass, +jboolean Java_org_rocksdb_AbstractComparator_usingDirectBuffers(JNIEnv*, jclass, jlong jhandle) { auto* c = reinterpret_cast(jhandle); diff --git a/java/rocksjni/compression_options.cc b/java/rocksjni/compression_options.cc index 387167567cf6..f19822fcb4a1 100644 --- a/java/rocksjni/compression_options.cc +++ b/java/rocksjni/compression_options.cc @@ -62,8 +62,7 @@ void Java_org_rocksdb_CompressionOptions_setLevel(JNIEnv*, jclass, * Method: level * Signature: (J)I */ -jint Java_org_rocksdb_CompressionOptions_level(JNIEnv*, jclass, - jlong jhandle) { +jint Java_org_rocksdb_CompressionOptions_level(JNIEnv*, jclass, jlong jhandle) { auto* opt = reinterpret_cast(jhandle); return static_cast(opt->level); } @@ -174,8 +173,7 @@ void Java_org_rocksdb_CompressionOptions_setUseZstdDictTrainer( * Method: zstdMaxTrainBytes * Signature: (J)Z */ -jboolean Java_org_rocksdb_CompressionOptions_useZstdDictTrainer(JNIEnv*, - jclass, +jboolean Java_org_rocksdb_CompressionOptions_useZstdDictTrainer(JNIEnv*, jclass, jlong jhandle) { auto* opt = reinterpret_cast(jhandle); return static_cast(opt->use_zstd_dict_trainer); @@ -209,6 +207,6 @@ jboolean Java_org_rocksdb_CompressionOptions_enabled(JNIEnv*, jclass, * Signature: (J)V */ void Java_org_rocksdb_CompressionOptions_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { delete reinterpret_cast(jhandle); } diff --git a/java/rocksjni/concurrent_task_limiter.cc b/java/rocksjni/concurrent_task_limiter.cc index 83fba7b81664..602fbd1190df 100644 --- a/java/rocksjni/concurrent_task_limiter.cc +++ b/java/rocksjni/concurrent_task_limiter.cc @@ -88,9 +88,8 @@ jint Java_org_rocksdb_ConcurrentTaskLimiterImpl_outstandingTask(JNIEnv*, jclass, * Method: disposeInternal * Signature: (J)V */ -void Java_org_rocksdb_ConcurrentTaskLimiterImpl_disposeInternalJni(JNIEnv*, - jclass, - jlong jhandle) { +void Java_org_rocksdb_ConcurrentTaskLimiterImpl_disposeInternalJni( + JNIEnv*, jclass, jlong jhandle) { auto* ptr = reinterpret_cast< std::shared_ptr*>(jhandle); delete ptr; // delete std::shared_ptr diff --git a/java/rocksjni/config_options.cc b/java/rocksjni/config_options.cc index eb9a483450fb..1532dd9e80ad 100644 --- a/java/rocksjni/config_options.cc +++ b/java/rocksjni/config_options.cc @@ -20,7 +20,7 @@ * Signature: (J)V */ void Java_org_rocksdb_ConfigOptions_disposeInternalJni(JNIEnv *, jclass, - jlong jhandle) { + jlong jhandle) { auto *co = reinterpret_cast(jhandle); assert(co != nullptr); delete co; diff --git a/java/rocksjni/env.cc b/java/rocksjni/env.cc index b15babc4afe0..a26b9f575854 100644 --- a/java/rocksjni/env.cc +++ b/java/rocksjni/env.cc @@ -33,8 +33,7 @@ jlong Java_org_rocksdb_Env_getDefaultEnvInternal(JNIEnv*, jclass) { * Method: disposeInternal * Signature: (J)V */ -void Java_org_rocksdb_RocksEnv_disposeInternal(JNIEnv*, jclass, - jlong jhandle) { +void Java_org_rocksdb_RocksEnv_disposeInternal(JNIEnv*, jclass, jlong jhandle) { auto* e = reinterpret_cast(jhandle); assert(e != nullptr); delete e; @@ -175,7 +174,7 @@ jlong Java_org_rocksdb_RocksMemEnv_createMemEnv(JNIEnv*, jclass, * Signature: (J)V */ void Java_org_rocksdb_RocksMemEnv_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* e = reinterpret_cast(jhandle); assert(e != nullptr); delete e; @@ -198,7 +197,7 @@ jlong Java_org_rocksdb_TimedEnv_createTimedEnv(JNIEnv*, jclass, * Signature: (J)V */ void Java_org_rocksdb_TimedEnv_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* e = reinterpret_cast(jhandle); assert(e != nullptr); delete e; diff --git a/java/rocksjni/env_options.cc b/java/rocksjni/env_options.cc index 6753c3bfa31a..9312ec2d6b45 100644 --- a/java/rocksjni/env_options.cc +++ b/java/rocksjni/env_options.cc @@ -57,7 +57,7 @@ jlong Java_org_rocksdb_EnvOptions_newEnvOptions__J(JNIEnv *, jclass, * Signature: (J)V */ void Java_org_rocksdb_EnvOptions_disposeInternalJni(JNIEnv *, jclass, - jlong jhandle) { + jlong jhandle) { auto *eo = reinterpret_cast(jhandle); assert(eo != nullptr); delete eo; @@ -294,8 +294,7 @@ jlong Java_org_rocksdb_EnvOptions_writableFileMaxBufferSize(JNIEnv *, jclass, * Method: setRateLimiter * Signature: (JJ)V */ -void Java_org_rocksdb_EnvOptions_setRateLimiter(JNIEnv *, jclass, - jlong jhandle, +void Java_org_rocksdb_EnvOptions_setRateLimiter(JNIEnv *, jclass, jlong jhandle, jlong rl_handle) { auto *sptr_rate_limiter = reinterpret_cast *>( diff --git a/java/rocksjni/filter.cc b/java/rocksjni/filter.cc index 0cd77e4ddbe1..a71401cdfbd0 100644 --- a/java/rocksjni/filter.cc +++ b/java/rocksjni/filter.cc @@ -37,8 +37,9 @@ jlong Java_org_rocksdb_BloomFilter_createNewBloomFilter(JNIEnv* /*env*/, * Method: disposeInternal * Signature: (J)V */ -void Java_org_rocksdb_Filter_disposeInternalJni(JNIEnv* /*env*/, jclass /*jcls*/, - jlong jhandle) { +void Java_org_rocksdb_Filter_disposeInternalJni(JNIEnv* /*env*/, + jclass /*jcls*/, + jlong jhandle) { auto* handle = reinterpret_cast*>( jhandle); diff --git a/java/rocksjni/ingest_external_file_options.cc b/java/rocksjni/ingest_external_file_options.cc index c1baf3e36f85..2a9b73b16899 100644 --- a/java/rocksjni/ingest_external_file_options.cc +++ b/java/rocksjni/ingest_external_file_options.cc @@ -190,9 +190,8 @@ Java_org_rocksdb_IngestExternalFileOptions_setWriteGlobalSeqno( * Method: disposeInternal * Signature: (J)V */ -void Java_org_rocksdb_IngestExternalFileOptions_disposeInternalJni(JNIEnv*, - jclass, - jlong jhandle) { +void Java_org_rocksdb_IngestExternalFileOptions_disposeInternalJni( + JNIEnv*, jclass, jlong jhandle) { auto* options = reinterpret_cast(jhandle); delete options; diff --git a/java/rocksjni/iterator.cc b/java/rocksjni/iterator.cc index 27f045c8b7d3..34c4430c0ef2 100644 --- a/java/rocksjni/iterator.cc +++ b/java/rocksjni/iterator.cc @@ -23,8 +23,8 @@ * Signature: (J)V */ void Java_org_rocksdb_RocksIterator_disposeInternalJni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { auto* it = reinterpret_cast(handle); assert(it != nullptr); delete it; @@ -36,8 +36,8 @@ void Java_org_rocksdb_RocksIterator_disposeInternalJni(JNIEnv* /*env*/, * Signature: (J)Z */ jboolean Java_org_rocksdb_RocksIterator_isValid0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { return reinterpret_cast(handle)->Valid(); } @@ -47,8 +47,8 @@ jboolean Java_org_rocksdb_RocksIterator_isValid0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_RocksIterator_seekToFirst0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { reinterpret_cast(handle)->SeekToFirst(); } @@ -58,8 +58,8 @@ void Java_org_rocksdb_RocksIterator_seekToFirst0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_RocksIterator_seekToLast0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { reinterpret_cast(handle)->SeekToLast(); } @@ -69,7 +69,7 @@ void Java_org_rocksdb_RocksIterator_seekToLast0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_RocksIterator_next0Jni(JNIEnv* /*env*/, jclass /*jcls*/, - jlong handle) { + jlong handle) { reinterpret_cast(handle)->Next(); } @@ -79,7 +79,7 @@ void Java_org_rocksdb_RocksIterator_next0Jni(JNIEnv* /*env*/, jclass /*jcls*/, * Signature: (J)V */ void Java_org_rocksdb_RocksIterator_prev0Jni(JNIEnv* /*env*/, jclass /*jobj*/, - jlong handle) { + jlong handle) { reinterpret_cast(handle)->Prev(); } @@ -89,7 +89,7 @@ void Java_org_rocksdb_RocksIterator_prev0Jni(JNIEnv* /*env*/, jclass /*jobj*/, * Signature: (J)V */ void Java_org_rocksdb_RocksIterator_refresh0Jni(JNIEnv* env, jclass /*jcls*/, - jlong handle) { + jlong handle) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Status s = it->Refresh(); @@ -106,8 +106,8 @@ void Java_org_rocksdb_RocksIterator_refresh0Jni(JNIEnv* env, jclass /*jcls*/, * Signature: (J[BI)V */ void Java_org_rocksdb_RocksIterator_seek0Jni(JNIEnv* env, jclass /*jcls*/, - jlong handle, jbyteArray jtarget, - jint jtarget_len) { + jlong handle, jbyteArray jtarget, + jint jtarget_len) { auto* it = reinterpret_cast(handle); auto seek = [&it](ROCKSDB_NAMESPACE::Slice& target_slice) { it->Seek(target_slice); @@ -141,9 +141,10 @@ void Java_org_rocksdb_RocksIterator_seekByteArray0Jni( * Signature: (JLjava/nio/ByteBuffer;II)V */ void Java_org_rocksdb_RocksIterator_seekDirect0Jni(JNIEnv* env, jclass /*jobj*/, - jlong handle, jobject jtarget, - jint jtarget_off, - jint jtarget_len) { + jlong handle, + jobject jtarget, + jint jtarget_off, + jint jtarget_len) { auto* it = reinterpret_cast(handle); auto seek = [&it](ROCKSDB_NAMESPACE::Slice& target_slice) { it->Seek(target_slice); @@ -173,10 +174,11 @@ void Java_org_rocksdb_RocksIterator_seekForPrevDirect0Jni( * Method: seekForPrev0 * Signature: (J[BI)V */ -void Java_org_rocksdb_RocksIterator_seekForPrev0Jni(JNIEnv* env, jclass /*jcls*/, - jlong handle, - jbyteArray jtarget, - jint jtarget_len) { +void Java_org_rocksdb_RocksIterator_seekForPrev0Jni(JNIEnv* env, + jclass /*jcls*/, + jlong handle, + jbyteArray jtarget, + jint jtarget_len) { auto* it = reinterpret_cast(handle); auto seek = [&it](ROCKSDB_NAMESPACE::Slice& target_slice) { it->SeekForPrev(target_slice); @@ -210,7 +212,7 @@ void Java_org_rocksdb_RocksIterator_seekForPrevByteArray0Jni( * Signature: (J)V */ void Java_org_rocksdb_RocksIterator_status0Jni(JNIEnv* env, jclass /*jcls*/, - jlong handle) { + jlong handle) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Status s = it->status(); diff --git a/java/rocksjni/lru_cache.cc b/java/rocksjni/lru_cache.cc index bd6e158cd709..1831ebc6abdc 100644 --- a/java/rocksjni/lru_cache.cc +++ b/java/rocksjni/lru_cache.cc @@ -41,8 +41,8 @@ jlong Java_org_rocksdb_LRUCache_newLRUCache(JNIEnv* /*env*/, jclass /*jcls*/, * Signature: (J)V */ void Java_org_rocksdb_LRUCache_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { auto* sptr_lru_cache = reinterpret_cast*>(jhandle); delete sptr_lru_cache; // delete std::shared_ptr diff --git a/java/rocksjni/merge_operator.cc b/java/rocksjni/merge_operator.cc index 0cbd9d9c2fdf..5696a058604d 100644 --- a/java/rocksjni/merge_operator.cc +++ b/java/rocksjni/merge_operator.cc @@ -62,8 +62,8 @@ jlong Java_org_rocksdb_StringAppendOperator_newSharedStringAppendOperator__Ljava * Signature: (J)V */ void Java_org_rocksdb_StringAppendOperator_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { auto* sptr_string_append_op = reinterpret_cast*>( jhandle); @@ -89,8 +89,8 @@ jlong Java_org_rocksdb_UInt64AddOperator_newSharedUInt64AddOperator( * Signature: (J)V */ void Java_org_rocksdb_UInt64AddOperator_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong jhandle) { + jclass /*jobj*/, + jlong jhandle) { auto* sptr_uint64_add_op = reinterpret_cast*>( jhandle); diff --git a/java/rocksjni/optimistic_transaction_db.cc b/java/rocksjni/optimistic_transaction_db.cc index b19aa1f5b229..d47771350741 100644 --- a/java/rocksjni/optimistic_transaction_db.cc +++ b/java/rocksjni/optimistic_transaction_db.cc @@ -145,8 +145,8 @@ Java_org_rocksdb_OptimisticTransactionDB_open__JLjava_lang_String_2_3_3B_3J( * Method: disposeInternal * Signature: (J)V */ -void Java_org_rocksdb_OptimisticTransactionDB_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { +void Java_org_rocksdb_OptimisticTransactionDB_disposeInternalJni( + JNIEnv*, jclass, jlong jhandle) { auto* optimistic_txn_db = reinterpret_cast(jhandle); assert(optimistic_txn_db != nullptr); diff --git a/java/rocksjni/optimistic_transaction_options.cc b/java/rocksjni/optimistic_transaction_options.cc index 83031c56099a..336e4784575e 100644 --- a/java/rocksjni/optimistic_transaction_options.cc +++ b/java/rocksjni/optimistic_transaction_options.cc @@ -57,8 +57,7 @@ void Java_org_rocksdb_OptimisticTransactionOptions_setSetSnapshot( * Signature: (JJ)V */ void Java_org_rocksdb_OptimisticTransactionOptions_setComparator( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, - jlong jcomparator_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, jlong jcomparator_handle) { auto* opts = reinterpret_cast( jhandle); diff --git a/java/rocksjni/options.cc b/java/rocksjni/options.cc index e1f4f99c64f2..0e53ae4b0906 100644 --- a/java/rocksjni/options.cc +++ b/java/rocksjni/options.cc @@ -80,7 +80,8 @@ jlong Java_org_rocksdb_Options_copyOptions(JNIEnv*, jclass, jlong jhandle) { * Method: disposeInternal * Signature: (J)V */ -void Java_org_rocksdb_Options_disposeInternalJni(JNIEnv*, jclass, jlong handle) { +void Java_org_rocksdb_Options_disposeInternalJni(JNIEnv*, jclass, + jlong handle) { auto* op = reinterpret_cast(handle); assert(op != nullptr); delete op; @@ -103,8 +104,8 @@ void Java_org_rocksdb_Options_setIncreaseParallelism(JNIEnv*, jclass, * Method: setCreateIfMissing * Signature: (JZ)V */ -void Java_org_rocksdb_Options_setCreateIfMissing(JNIEnv*, jclass, - jlong jhandle, jboolean flag) { +void Java_org_rocksdb_Options_setCreateIfMissing(JNIEnv*, jclass, jlong jhandle, + jboolean flag) { reinterpret_cast(jhandle)->create_if_missing = flag; } @@ -242,8 +243,7 @@ void Java_org_rocksdb_Options_setCompactionFilterHandle( * Signature: (JJ)V */ void JNICALL Java_org_rocksdb_Options_setCompactionFilterFactoryHandle( - JNIEnv*, jclass, jlong jopt_handle, - jlong jcompactionfilterfactory_handle) { + JNIEnv*, jclass, jlong jopt_handle, jlong jcompactionfilterfactory_handle) { auto* cff_factory = reinterpret_cast< std::shared_ptr*>( jcompactionfilterfactory_handle); @@ -289,8 +289,7 @@ void Java_org_rocksdb_Options_setWriteBufferManager( * Method: writeBufferSize * Signature: (J)J */ -jlong Java_org_rocksdb_Options_writeBufferSize(JNIEnv*, jclass, - jlong jhandle) { +jlong Java_org_rocksdb_Options_writeBufferSize(JNIEnv*, jclass, jlong jhandle) { return reinterpret_cast(jhandle) ->write_buffer_size; } @@ -408,8 +407,7 @@ void Java_org_rocksdb_Options_setEnv(JNIEnv*, jclass, jlong jhandle, * Method: setMaxTotalWalSize * Signature: (JJ)V */ -void Java_org_rocksdb_Options_setMaxTotalWalSize(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setMaxTotalWalSize(JNIEnv*, jclass, jlong jhandle, jlong jmax_total_wal_size) { reinterpret_cast(jhandle)->max_total_wal_size = static_cast(jmax_total_wal_size); @@ -420,8 +418,7 @@ void Java_org_rocksdb_Options_setMaxTotalWalSize(JNIEnv*, jclass, * Method: maxTotalWalSize * Signature: (J)J */ -jlong Java_org_rocksdb_Options_maxTotalWalSize(JNIEnv*, jclass, - jlong jhandle) { +jlong Java_org_rocksdb_Options_maxTotalWalSize(JNIEnv*, jclass, jlong jhandle) { return reinterpret_cast(jhandle) ->max_total_wal_size; } @@ -1043,8 +1040,7 @@ void Java_org_rocksdb_Options_setMaxManifestFileSize( * Method: setMemTableFactory * Signature: (JJ)V */ -void Java_org_rocksdb_Options_setMemTableFactory(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setMemTableFactory(JNIEnv*, jclass, jlong jhandle, jlong jfactory_handle) { reinterpret_cast(jhandle) ->memtable_factory.reset( @@ -1330,8 +1326,7 @@ jboolean Java_org_rocksdb_Options_allowMmapWrites(JNIEnv*, jclass, * Method: setAllowMmapWrites * Signature: (JZ)V */ -void Java_org_rocksdb_Options_setAllowMmapWrites(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setAllowMmapWrites(JNIEnv*, jclass, jlong jhandle, jboolean allow_mmap_writes) { reinterpret_cast(jhandle)->allow_mmap_writes = static_cast(allow_mmap_writes); @@ -1421,8 +1416,7 @@ jboolean Java_org_rocksdb_Options_isFdCloseOnExec(JNIEnv*, jclass, * Method: setIsFdCloseOnExec * Signature: (JZ)V */ -void Java_org_rocksdb_Options_setIsFdCloseOnExec(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setIsFdCloseOnExec(JNIEnv*, jclass, jlong jhandle, jboolean is_fd_close_on_exec) { reinterpret_cast(jhandle)->is_fd_close_on_exec = static_cast(is_fd_close_on_exec); @@ -1682,8 +1676,7 @@ void Java_org_rocksdb_Options_setBytesPerSync(JNIEnv*, jclass, jlong jhandle, * Method: setWalBytesPerSync * Signature: (JJ)V */ -void Java_org_rocksdb_Options_setWalBytesPerSync(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setWalBytesPerSync(JNIEnv*, jclass, jlong jhandle, jlong jwal_bytes_per_sync) { reinterpret_cast(jhandle)->wal_bytes_per_sync = static_cast(jwal_bytes_per_sync); @@ -1694,8 +1687,7 @@ void Java_org_rocksdb_Options_setWalBytesPerSync(JNIEnv*, jclass, * Method: walBytesPerSync * Signature: (J)J */ -jlong Java_org_rocksdb_Options_walBytesPerSync(JNIEnv*, jclass, - jlong jhandle) { +jlong Java_org_rocksdb_Options_walBytesPerSync(JNIEnv*, jclass, jlong jhandle) { auto* opt = reinterpret_cast(jhandle); return static_cast(opt->wal_bytes_per_sync); } @@ -2037,8 +2029,7 @@ void Java_org_rocksdb_Options_setWalRecoveryMode( * Method: walRecoveryMode * Signature: (J)B */ -jbyte Java_org_rocksdb_Options_walRecoveryMode(JNIEnv*, jclass, - jlong jhandle) { +jbyte Java_org_rocksdb_Options_walRecoveryMode(JNIEnv*, jclass, jlong jhandle) { auto* opt = reinterpret_cast(jhandle); return ROCKSDB_NAMESPACE::WALRecoveryModeJni::toJavaWALRecoveryMode( opt->wal_recovery_mode); @@ -2120,8 +2111,7 @@ jboolean Java_org_rocksdb_Options_failIfOptionsFileError(JNIEnv*, jclass, * Method: setDumpMallocStats * Signature: (JZ)V */ -void Java_org_rocksdb_Options_setDumpMallocStats(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setDumpMallocStats(JNIEnv*, jclass, jlong jhandle, jboolean jdump_malloc_stats) { auto* opt = reinterpret_cast(jhandle); opt->dump_malloc_stats = static_cast(jdump_malloc_stats); @@ -2482,8 +2472,7 @@ jint Java_org_rocksdb_Options_maxWriteBufferNumberToMaintain(JNIEnv*, jclass, * Signature: (JI)V */ void Java_org_rocksdb_Options_setMaxWriteBufferNumberToMaintain( - JNIEnv*, jclass, jlong jhandle, - jint jmax_write_buffer_number_to_maintain) { + JNIEnv*, jclass, jlong jhandle, jint jmax_write_buffer_number_to_maintain) { reinterpret_cast(jhandle) ->max_write_buffer_number_to_maintain = static_cast(jmax_write_buffer_number_to_maintain); @@ -2507,8 +2496,7 @@ void Java_org_rocksdb_Options_setCompressionType( * Method: compressionType * Signature: (J)B */ -jbyte Java_org_rocksdb_Options_compressionType(JNIEnv*, jclass, - jlong jhandle) { +jbyte Java_org_rocksdb_Options_compressionType(JNIEnv*, jclass, jlong jhandle) { auto* opts = reinterpret_cast(jhandle); return ROCKSDB_NAMESPACE::CompressionTypeJni::toJavaCompressionType( opts->compression); @@ -2680,8 +2668,7 @@ void Java_org_rocksdb_Options_setCompressionOptions( * Method: setCompactionStyle * Signature: (JB)V */ -void Java_org_rocksdb_Options_setCompactionStyle(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setCompactionStyle(JNIEnv*, jclass, jlong jhandle, jbyte jcompaction_style) { auto* options = reinterpret_cast(jhandle); options->compaction_style = @@ -2694,8 +2681,7 @@ void Java_org_rocksdb_Options_setCompactionStyle(JNIEnv*, jclass, * Method: compactionStyle * Signature: (J)B */ -jbyte Java_org_rocksdb_Options_compactionStyle(JNIEnv*, jclass, - jlong jhandle) { +jbyte Java_org_rocksdb_Options_compactionStyle(JNIEnv*, jclass, jlong jhandle) { auto* options = reinterpret_cast(jhandle); return ROCKSDB_NAMESPACE::CompactionStyleJni::toJavaCompactionStyle( options->compaction_style); @@ -2749,8 +2735,7 @@ void Java_org_rocksdb_Options_setNumLevels(JNIEnv*, jclass, jlong jhandle, * Method: levelZeroFileNumCompactionTrigger * Signature: (J)I */ -jint Java_org_rocksdb_Options_levelZeroFileNumCompactionTrigger(JNIEnv*, - jclass, +jint Java_org_rocksdb_Options_levelZeroFileNumCompactionTrigger(JNIEnv*, jclass, jlong jhandle) { return reinterpret_cast(jhandle) ->level0_file_num_compaction_trigger; @@ -3090,8 +3075,7 @@ jdouble Java_org_rocksdb_Options_memtablePrefixBloomSizeRatio(JNIEnv*, jclass, * Signature: (JI)V */ void Java_org_rocksdb_Options_setMemtablePrefixBloomSizeRatio( - JNIEnv*, jclass, jlong jhandle, - jdouble jmemtable_prefix_bloom_size_ratio) { + JNIEnv*, jclass, jlong jhandle, jdouble jmemtable_prefix_bloom_size_ratio) { reinterpret_cast(jhandle) ->memtable_prefix_bloom_size_ratio = static_cast(jmemtable_prefix_bloom_size_ratio); @@ -3558,8 +3542,7 @@ jbyte Java_org_rocksdb_Options_compactionPriority(JNIEnv*, jclass, * Method: setReportBgIoStats * Signature: (JZ)V */ -void Java_org_rocksdb_Options_setReportBgIoStats(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setReportBgIoStats(JNIEnv*, jclass, jlong jhandle, jboolean jreport_bg_io_stats) { auto* opts = reinterpret_cast(jhandle); opts->report_bg_io_stats = static_cast(jreport_bg_io_stats); @@ -3677,8 +3660,7 @@ jboolean Java_org_rocksdb_Options_forceConsistencyChecks(JNIEnv*, jclass, * Method: setEnableBlobFiles * Signature: (JZ)V */ -void Java_org_rocksdb_Options_setEnableBlobFiles(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_Options_setEnableBlobFiles(JNIEnv*, jclass, jlong jhandle, jboolean jenable_blob_files) { auto* opts = reinterpret_cast(jhandle); opts->enable_blob_files = static_cast(jenable_blob_files); @@ -3803,8 +3785,7 @@ void Java_org_rocksdb_Options_setBlobGarbageCollectionAgeCutoff( * Method: blobGarbageCollectionAgeCutoff * Signature: (J)D */ -jdouble Java_org_rocksdb_Options_blobGarbageCollectionAgeCutoff(JNIEnv*, - jclass, +jdouble Java_org_rocksdb_Options_blobGarbageCollectionAgeCutoff(JNIEnv*, jclass, jlong jhandle) { auto* opts = reinterpret_cast(jhandle); return static_cast(opts->blob_garbage_collection_age_cutoff); @@ -4041,7 +4022,7 @@ jlong Java_org_rocksdb_ColumnFamilyOptions_getColumnFamilyOptionsFromProps__Ljav * Signature: (J)V */ void Java_org_rocksdb_ColumnFamilyOptions_disposeInternalJni(JNIEnv*, jclass, - jlong handle) { + jlong handle) { auto* cfo = reinterpret_cast(handle); assert(cfo != nullptr); delete cfo; @@ -4065,8 +4046,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_oldDefaults(JNIEnv*, jclass, * Method: optimizeForSmallDb * Signature: (J)V */ -void Java_org_rocksdb_ColumnFamilyOptions_optimizeForSmallDb__J(JNIEnv*, - jclass, +void Java_org_rocksdb_ColumnFamilyOptions_optimizeForSmallDb__J(JNIEnv*, jclass, jlong jhandle) { reinterpret_cast(jhandle) ->OptimizeForSmallDb(); @@ -4217,8 +4197,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_setCompactionFilterHandle( * Signature: (JJ)V */ void Java_org_rocksdb_ColumnFamilyOptions_setCompactionFilterFactoryHandle( - JNIEnv*, jclass, jlong jopt_handle, - jlong jcompactionfilterfactory_handle) { + JNIEnv*, jclass, jlong jopt_handle, jlong jcompactionfilterfactory_handle) { auto* cff_factory = reinterpret_cast< std::shared_ptr*>( jcompactionfilterfactory_handle); @@ -4477,8 +4456,7 @@ jint Java_org_rocksdb_ColumnFamilyOptions_maxWriteBufferNumberToMaintain( * Signature: (JI)V */ void Java_org_rocksdb_ColumnFamilyOptions_setMaxWriteBufferNumberToMaintain( - JNIEnv*, jclass, jlong jhandle, - jint jmax_write_buffer_number_to_maintain) { + JNIEnv*, jclass, jlong jhandle, jint jmax_write_buffer_number_to_maintain) { reinterpret_cast(jhandle) ->max_write_buffer_number_to_maintain = static_cast(jmax_write_buffer_number_to_maintain); @@ -4791,8 +4769,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_setTargetFileSizeMultiplier( * Method: maxBytesForLevelBase * Signature: (J)J */ -jlong Java_org_rocksdb_ColumnFamilyOptions_maxBytesForLevelBase(JNIEnv*, - jclass, +jlong Java_org_rocksdb_ColumnFamilyOptions_maxBytesForLevelBase(JNIEnv*, jclass, jlong jhandle) { return reinterpret_cast(jhandle) ->max_bytes_for_level_base; @@ -5018,8 +4995,7 @@ jdouble Java_org_rocksdb_ColumnFamilyOptions_memtablePrefixBloomSizeRatio( * Signature: (JI)V */ void Java_org_rocksdb_ColumnFamilyOptions_setMemtablePrefixBloomSizeRatio( - JNIEnv*, jclass, jlong jhandle, - jdouble jmemtable_prefix_bloom_size_ratio) { + JNIEnv*, jclass, jlong jhandle, jdouble jmemtable_prefix_bloom_size_ratio) { reinterpret_cast(jhandle) ->memtable_prefix_bloom_size_ratio = static_cast(jmemtable_prefix_bloom_size_ratio); @@ -5149,8 +5125,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_setOptimizeFiltersForHits( * Method: memtableHugePageSize * Signature: (J)J */ -jlong Java_org_rocksdb_ColumnFamilyOptions_memtableHugePageSize(JNIEnv*, - jclass, +jlong Java_org_rocksdb_ColumnFamilyOptions_memtableHugePageSize(JNIEnv*, jclass, jlong jhandle) { return reinterpret_cast(jhandle) ->memtable_huge_page_size; @@ -5435,8 +5410,8 @@ jboolean Java_org_rocksdb_ColumnFamilyOptions_reportBgIoStats(JNIEnv*, jclass, * Method: setTtl * Signature: (JJ)V */ -void Java_org_rocksdb_ColumnFamilyOptions_setTtl(JNIEnv*, jclass, - jlong jhandle, jlong jttl) { +void Java_org_rocksdb_ColumnFamilyOptions_setTtl(JNIEnv*, jclass, jlong jhandle, + jlong jttl) { auto* cf_opts = reinterpret_cast(jhandle); cf_opts->ttl = static_cast(jttl); @@ -5757,8 +5732,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_setBlobFileStartingLevel( * Method: blobFileStartingLevel * Signature: (J)I */ -jint Java_org_rocksdb_ColumnFamilyOptions_blobFileStartingLevel(JNIEnv*, - jclass, +jint Java_org_rocksdb_ColumnFamilyOptions_blobFileStartingLevel(JNIEnv*, jclass, jlong jhandle) { auto* opts = reinterpret_cast(jhandle); @@ -5784,8 +5758,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_setPrepopulateBlobCache( * Method: prepopulateBlobCache * Signature: (J)B */ -jbyte Java_org_rocksdb_ColumnFamilyOptions_prepopulateBlobCache(JNIEnv*, - jclass, +jbyte Java_org_rocksdb_ColumnFamilyOptions_prepopulateBlobCache(JNIEnv*, jclass, jlong jhandle) { auto* opts = reinterpret_cast(jhandle); @@ -5927,7 +5900,7 @@ jlong Java_org_rocksdb_DBOptions_getDBOptionsFromProps__Ljava_lang_String_2( * Signature: (J)V */ void Java_org_rocksdb_DBOptions_disposeInternalJni(JNIEnv*, jclass, - jlong handle) { + jlong handle) { auto* dbo = reinterpret_cast(handle); assert(dbo != nullptr); delete dbo; @@ -6007,8 +5980,7 @@ void Java_org_rocksdb_DBOptions_setCreateMissingColumnFamilies(JNIEnv*, jclass, * Method: createMissingColumnFamilies * Signature: (J)Z */ -jboolean Java_org_rocksdb_DBOptions_createMissingColumnFamilies(JNIEnv*, - jclass, +jboolean Java_org_rocksdb_DBOptions_createMissingColumnFamilies(JNIEnv*, jclass, jlong jhandle) { return reinterpret_cast(jhandle) ->create_missing_column_families; @@ -6019,8 +5991,7 @@ jboolean Java_org_rocksdb_DBOptions_createMissingColumnFamilies(JNIEnv*, * Method: setErrorIfExists * Signature: (JZ)V */ -void Java_org_rocksdb_DBOptions_setErrorIfExists(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_DBOptions_setErrorIfExists(JNIEnv*, jclass, jlong jhandle, jboolean error_if_exists) { reinterpret_cast(jhandle)->error_if_exists = static_cast(error_if_exists); @@ -6665,8 +6636,7 @@ jint Java_org_rocksdb_DBOptions_tableCacheNumshardbits(JNIEnv*, jclass, * Method: setWalTtlSeconds * Signature: (JJ)V */ -void Java_org_rocksdb_DBOptions_setWalTtlSeconds(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_DBOptions_setWalTtlSeconds(JNIEnv*, jclass, jlong jhandle, jlong WAL_ttl_seconds) { reinterpret_cast(jhandle)->WAL_ttl_seconds = static_cast(WAL_ttl_seconds); @@ -6677,8 +6647,7 @@ void Java_org_rocksdb_DBOptions_setWalTtlSeconds(JNIEnv*, jclass, * Method: walTtlSeconds * Signature: (J)J */ -jlong Java_org_rocksdb_DBOptions_walTtlSeconds(JNIEnv*, jclass, - jlong jhandle) { +jlong Java_org_rocksdb_DBOptions_walTtlSeconds(JNIEnv*, jclass, jlong jhandle) { return reinterpret_cast(jhandle) ->WAL_ttl_seconds; } @@ -7896,7 +7865,7 @@ jlong Java_org_rocksdb_WriteOptions_copyWriteOptions(JNIEnv*, jclass, * Signature: ()V */ void Java_org_rocksdb_WriteOptions_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* write_options = reinterpret_cast(jhandle); assert(write_options != nullptr); @@ -7927,8 +7896,7 @@ jboolean Java_org_rocksdb_WriteOptions_sync(JNIEnv*, jclass, jlong jhandle) { * Method: setDisableWAL * Signature: (JZ)V */ -void Java_org_rocksdb_WriteOptions_setDisableWAL(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_WriteOptions_setDisableWAL(JNIEnv*, jclass, jlong jhandle, jboolean jflag) { reinterpret_cast(jhandle)->disableWAL = jflag; @@ -7973,8 +7941,7 @@ jboolean Java_org_rocksdb_WriteOptions_ignoreMissingColumnFamilies( * Method: setNoSlowdown * Signature: (JZ)V */ -void Java_org_rocksdb_WriteOptions_setNoSlowdown(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_WriteOptions_setNoSlowdown(JNIEnv*, jclass, jlong jhandle, jboolean jno_slowdown) { reinterpret_cast(jhandle)->no_slowdown = static_cast(jno_slowdown); @@ -8077,7 +8044,7 @@ jlong Java_org_rocksdb_ReadOptions_copyReadOptions(JNIEnv*, jclass, * Signature: (J)V */ void Java_org_rocksdb_ReadOptions_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* read_options = reinterpret_cast(jhandle); assert(read_options != nullptr); @@ -8480,8 +8447,7 @@ void Java_org_rocksdb_ReadOptions_setTimestamp(JNIEnv*, jclass, jlong jhandle, * Method: iterStartTs * Signature: (J)J */ -jlong Java_org_rocksdb_ReadOptions_iterStartTs(JNIEnv*, jclass, - jlong jhandle) { +jlong Java_org_rocksdb_ReadOptions_iterStartTs(JNIEnv*, jclass, jlong jhandle) { auto* opt = reinterpret_cast(jhandle); auto& iter_start_ts_handle = opt->iter_start_ts; return reinterpret_cast(iter_start_ts_handle); @@ -8492,8 +8458,7 @@ jlong Java_org_rocksdb_ReadOptions_iterStartTs(JNIEnv*, jclass, * Method: setIterStartTs * Signature: (JJ)V */ -void Java_org_rocksdb_ReadOptions_setIterStartTs(JNIEnv*, jclass, - jlong jhandle, +void Java_org_rocksdb_ReadOptions_setIterStartTs(JNIEnv*, jclass, jlong jhandle, jlong jiter_start_ts_handle) { auto* opt = reinterpret_cast(jhandle); opt->iter_start_ts = @@ -8662,7 +8627,7 @@ void Java_org_rocksdb_ComparatorOptions_setMaxReusedBufferSize( * Signature: (J)V */ void Java_org_rocksdb_ComparatorOptions_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* comparator_opt = reinterpret_cast( jhandle); @@ -8735,7 +8700,7 @@ jboolean Java_org_rocksdb_FlushOptions_allowWriteStall(JNIEnv*, jclass, * Signature: (J)V */ void Java_org_rocksdb_FlushOptions_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* flush_opt = reinterpret_cast(jhandle); assert(flush_opt != nullptr); delete flush_opt; diff --git a/java/rocksjni/persistent_cache.cc b/java/rocksjni/persistent_cache.cc index cf0dac1526d9..2b019ee6e1c5 100644 --- a/java/rocksjni/persistent_cache.cc +++ b/java/rocksjni/persistent_cache.cc @@ -52,7 +52,7 @@ jlong Java_org_rocksdb_PersistentCache_newPersistentCache( * Signature: (J)V */ void Java_org_rocksdb_PersistentCache_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* cache = reinterpret_cast*>( jhandle); diff --git a/java/rocksjni/portal.h b/java/rocksjni/portal.h index f0c5d36c3c66..f822077493bd 100644 --- a/java/rocksjni/portal.h +++ b/java/rocksjni/portal.h @@ -2127,8 +2127,8 @@ class JniUtil { std::function op, - JNIEnv* env, jbyteArray jkey, jint jkey_len, - jbyteArray jvalue, jint jvalue_len) { + JNIEnv* env, jbyteArray jkey, jint jkey_len, jbyteArray jvalue, + jint jvalue_len) { jbyte* key = env->GetByteArrayElements(jkey, nullptr); if (env->ExceptionCheck()) { // exception thrown: OutOfMemoryError diff --git a/java/rocksjni/ratelimiterjni.cc b/java/rocksjni/ratelimiterjni.cc index 39a7aff6f793..b22fa5931d82 100644 --- a/java/rocksjni/ratelimiterjni.cc +++ b/java/rocksjni/ratelimiterjni.cc @@ -37,8 +37,8 @@ jlong Java_org_rocksdb_RateLimiter_newRateLimiterHandle( * Signature: (J)V */ void Java_org_rocksdb_RateLimiter_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { auto* handle = reinterpret_cast*>( jhandle); diff --git a/java/rocksjni/restorejni.cc b/java/rocksjni/restorejni.cc index e98bc702e418..6f03d880405f 100644 --- a/java/rocksjni/restorejni.cc +++ b/java/rocksjni/restorejni.cc @@ -34,8 +34,8 @@ jlong Java_org_rocksdb_RestoreOptions_newRestoreOptions( * Signature: (J)V */ void Java_org_rocksdb_RestoreOptions_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong jhandle) { + jclass /*jobj*/, + jlong jhandle) { auto* ropt = reinterpret_cast(jhandle); assert(ropt); delete ropt; diff --git a/java/rocksjni/rocksjni.cc b/java/rocksjni/rocksjni.cc index cc9b88985386..548c36aa73a3 100644 --- a/java/rocksjni/rocksjni.cc +++ b/java/rocksjni/rocksjni.cc @@ -289,7 +289,8 @@ Java_org_rocksdb_RocksDB_openAsSecondary__JLjava_lang_String_2Ljava_lang_String_ * Method: disposeInternal * Signature: (J)V */ -void Java_org_rocksdb_RocksDB_disposeInternalJni(JNIEnv*, jclass, jlong jhandle) { +void Java_org_rocksdb_RocksDB_disposeInternalJni(JNIEnv*, jclass, + jlong jhandle) { auto* db = reinterpret_cast(jhandle); assert(db != nullptr); delete db; @@ -2463,8 +2464,7 @@ jlong Java_org_rocksdb_RocksDB_iteratorCF__JJ(JNIEnv*, jclass, jlong db_handle, * Method: iteratorCF * Signature: (JJJ)J */ -jlong Java_org_rocksdb_RocksDB_iteratorCF__JJJ(JNIEnv*, jclass, - jlong db_handle, +jlong Java_org_rocksdb_RocksDB_iteratorCF__JJJ(JNIEnv*, jclass, jlong db_handle, jlong jcf_handle, jlong jread_options_handle) { auto* db = reinterpret_cast(db_handle); @@ -2797,8 +2797,8 @@ jlongArray Java_org_rocksdb_RocksDB_getApproximateSizes( * Signature: (JJJJ)[J */ jlongArray Java_org_rocksdb_RocksDB_getApproximateMemTableStats( - JNIEnv* env, jclass, jlong jdb_handle, jlong jcf_handle, - jlong jstartHandle, jlong jlimitHandle) { + JNIEnv* env, jclass, jlong jdb_handle, jlong jcf_handle, jlong jstartHandle, + jlong jlimitHandle) { auto* start = reinterpret_cast(jstartHandle); auto* limit = reinterpret_cast(jlimitHandle); const ROCKSDB_NAMESPACE::Range range(*start, *limit); diff --git a/java/rocksjni/slice.cc b/java/rocksjni/slice.cc index b12227211adf..583d745661c2 100644 --- a/java/rocksjni/slice.cc +++ b/java/rocksjni/slice.cc @@ -66,8 +66,8 @@ jint Java_org_rocksdb_AbstractSlice_size0(JNIEnv* /*env*/, jclass /*jcls*/, * Method: empty0 * Signature: (J)Z */ -jboolean Java_org_rocksdb_AbstractSlice_empty0(JNIEnv* /*env*/, - jclass /*jcls*/, jlong handle) { +jboolean Java_org_rocksdb_AbstractSlice_empty0(JNIEnv* /*env*/, jclass /*jcls*/, + jlong handle) { const auto* slice = reinterpret_cast(handle); return slice->empty(); } @@ -118,8 +118,8 @@ jboolean Java_org_rocksdb_AbstractSlice_startsWith0(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_AbstractSlice_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { delete reinterpret_cast(handle); } @@ -247,8 +247,8 @@ void Java_org_rocksdb_DirectSlice_setLength0(JNIEnv* /*env*/, jclass /*jcls*/, * Method: disposeInternalBuf * Signature: (JJ)V */ -void Java_org_rocksdb_Slice_disposeInternalBuf(JNIEnv* /*env*/, - jclass /*jcls*/, jlong handle, +void Java_org_rocksdb_Slice_disposeInternalBuf(JNIEnv* /*env*/, jclass /*jcls*/, + jlong handle, jlong internalBufferOffset) { const auto* slice = reinterpret_cast(handle); const char* buf = slice->data_ - internalBufferOffset; diff --git a/java/rocksjni/sst_file_manager.cc b/java/rocksjni/sst_file_manager.cc index d905ec81c9aa..4278c71e5ec0 100644 --- a/java/rocksjni/sst_file_manager.cc +++ b/java/rocksjni/sst_file_manager.cc @@ -61,8 +61,7 @@ jlong Java_org_rocksdb_SstFileManager_newSstFileManager( * Signature: (JJ)V */ void Java_org_rocksdb_SstFileManager_setMaxAllowedSpaceUsage( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, - jlong jmax_allowed_space) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, jlong jmax_allowed_space) { auto* sptr_sst_file_manager = reinterpret_cast*>( jhandle); @@ -241,8 +240,8 @@ void Java_org_rocksdb_SstFileManager_setMaxTrashDBRatio(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_SstFileManager_disposeInternalJni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong jhandle) { + jclass /*cls*/, + jlong jhandle) { auto* sptr_sst_file_manager = reinterpret_cast*>( jhandle); diff --git a/java/rocksjni/sst_file_reader_iterator.cc b/java/rocksjni/sst_file_reader_iterator.cc index 71568ded0c70..e3a3f4767f3a 100644 --- a/java/rocksjni/sst_file_reader_iterator.cc +++ b/java/rocksjni/sst_file_reader_iterator.cc @@ -20,8 +20,8 @@ * Signature: (J)V */ void Java_org_rocksdb_SstFileReaderIterator_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong handle) { + jclass /*jobj*/, + jlong handle) { auto* it = reinterpret_cast(handle); assert(it != nullptr); delete it; @@ -33,8 +33,8 @@ void Java_org_rocksdb_SstFileReaderIterator_disposeInternalJni(JNIEnv* /*env*/, * Signature: (J)Z */ jboolean Java_org_rocksdb_SstFileReaderIterator_isValid0Jni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { return reinterpret_cast(handle)->Valid(); } @@ -44,8 +44,8 @@ jboolean Java_org_rocksdb_SstFileReaderIterator_isValid0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_SstFileReaderIterator_seekToFirst0Jni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { reinterpret_cast(handle)->SeekToFirst(); } @@ -55,8 +55,8 @@ void Java_org_rocksdb_SstFileReaderIterator_seekToFirst0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_SstFileReaderIterator_seekToLast0Jni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { reinterpret_cast(handle)->SeekToLast(); } @@ -66,8 +66,8 @@ void Java_org_rocksdb_SstFileReaderIterator_seekToLast0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_SstFileReaderIterator_next0Jni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { reinterpret_cast(handle)->Next(); } @@ -77,8 +77,8 @@ void Java_org_rocksdb_SstFileReaderIterator_next0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_SstFileReaderIterator_prev0Jni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { reinterpret_cast(handle)->Prev(); } @@ -87,10 +87,11 @@ void Java_org_rocksdb_SstFileReaderIterator_prev0Jni(JNIEnv* /*env*/, * Method: seek0 * Signature: (J[BI)V */ -void Java_org_rocksdb_SstFileReaderIterator_seek0Jni(JNIEnv* env, jclass /*cls*/, - jlong handle, - jbyteArray jtarget, - jint jtarget_len) { +void Java_org_rocksdb_SstFileReaderIterator_seek0Jni(JNIEnv* env, + jclass /*cls*/, + jlong handle, + jbyteArray jtarget, + jint jtarget_len) { jbyte* target = env->GetByteArrayElements(jtarget, nullptr); if (target == nullptr) { // exception thrown: OutOfMemoryError @@ -112,10 +113,10 @@ void Java_org_rocksdb_SstFileReaderIterator_seek0Jni(JNIEnv* env, jclass /*cls*/ * Signature: (J[BI)V */ void Java_org_rocksdb_SstFileReaderIterator_seekForPrev0Jni(JNIEnv* env, - jclass /*cls*/, - jlong handle, - jbyteArray jtarget, - jint jtarget_len) { + jclass /*cls*/, + jlong handle, + jbyteArray jtarget, + jint jtarget_len) { jbyte* target = env->GetByteArrayElements(jtarget, nullptr); if (target == nullptr) { // exception thrown: OutOfMemoryError @@ -137,8 +138,8 @@ void Java_org_rocksdb_SstFileReaderIterator_seekForPrev0Jni(JNIEnv* env, * Signature: (J)V */ void Java_org_rocksdb_SstFileReaderIterator_status0Jni(JNIEnv* env, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Status s = it->status(); @@ -155,7 +156,7 @@ void Java_org_rocksdb_SstFileReaderIterator_status0Jni(JNIEnv* env, * Signature: (J)[B */ jbyteArray Java_org_rocksdb_SstFileReaderIterator_key0(JNIEnv* env, - jclass /*jcls*/, + jclass /*jcls*/, jlong handle) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Slice key_slice = it->key(); @@ -177,7 +178,7 @@ jbyteArray Java_org_rocksdb_SstFileReaderIterator_key0(JNIEnv* env, * Signature: (J)[B */ jbyteArray Java_org_rocksdb_SstFileReaderIterator_value0(JNIEnv* env, - jclass /*jcls*/, + jclass /*jcls*/, jlong handle) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Slice value_slice = it->value(); @@ -200,7 +201,7 @@ jbyteArray Java_org_rocksdb_SstFileReaderIterator_value0(JNIEnv* env, * Signature: (JLjava/nio/ByteBuffer;II)I */ jint Java_org_rocksdb_SstFileReaderIterator_keyDirect0( - JNIEnv* env, jclass /*jcls*/, jlong handle, jobject jtarget, + JNIEnv* env, jclass /*jcls*/, jlong handle, jobject jtarget, jint jtarget_off, jint jtarget_len) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Slice key_slice = it->key(); @@ -217,7 +218,7 @@ jint Java_org_rocksdb_SstFileReaderIterator_keyDirect0( * Signature: (J[BII)I */ jint Java_org_rocksdb_SstFileReaderIterator_keyByteArray0( - JNIEnv* env, jclass /*jcls*/, jlong handle, jbyteArray jkey, jint jkey_off, + JNIEnv* env, jclass /*jcls*/, jlong handle, jbyteArray jkey, jint jkey_off, jint jkey_len) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Slice key_slice = it->key(); @@ -237,7 +238,7 @@ jint Java_org_rocksdb_SstFileReaderIterator_keyByteArray0( * Signature: (JLjava/nio/ByteBuffer;II)I */ jint Java_org_rocksdb_SstFileReaderIterator_valueDirect0( - JNIEnv* env, jclass /*jcls*/, jlong handle, jobject jtarget, + JNIEnv* env, jclass /*jcls*/, jlong handle, jobject jtarget, jint jtarget_off, jint jtarget_len) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Slice value_slice = it->value(); @@ -254,7 +255,7 @@ jint Java_org_rocksdb_SstFileReaderIterator_valueDirect0( * Signature: (J[BII)I */ jint Java_org_rocksdb_SstFileReaderIterator_valueByteArray0( - JNIEnv* env, jclass /*jcls*/, jlong handle, jbyteArray jvalue_target, + JNIEnv* env, jclass /*jcls*/, jlong handle, jbyteArray jvalue_target, jint jvalue_off, jint jvalue_len) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Slice value_slice = it->value(); @@ -360,8 +361,8 @@ void Java_org_rocksdb_SstFileReaderIterator_seekForPrevByteArray0Jni( * Signature: (J)V */ void Java_org_rocksdb_SstFileReaderIterator_refresh0Jni(JNIEnv* env, - jclass /*cls*/, - jlong handle) { + jclass /*cls*/, + jlong handle) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Status s = it->Refresh(); diff --git a/java/rocksjni/sst_file_readerjni.cc b/java/rocksjni/sst_file_readerjni.cc index 4de2f4f5fecd..4af472ecfb1c 100644 --- a/java/rocksjni/sst_file_readerjni.cc +++ b/java/rocksjni/sst_file_readerjni.cc @@ -39,7 +39,7 @@ jlong Java_org_rocksdb_SstFileReader_newSstFileReader(JNIEnv * /*env*/, * Method: open * Signature: (JLjava/lang/String;)V */ -void Java_org_rocksdb_SstFileReader_open(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileReader_open(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jstring jfile_path) { const char *file_path = env->GetStringUTFChars(jfile_path, nullptr); if (file_path == nullptr) { @@ -62,8 +62,7 @@ void Java_org_rocksdb_SstFileReader_open(JNIEnv *env, jclass /*jcls*/, * Signature: (JJ)J */ jlong Java_org_rocksdb_SstFileReader_newIterator(JNIEnv * /*env*/, - jclass /*jcls*/, - jlong jhandle, + jclass /*jcls*/, jlong jhandle, jlong jread_options_handle) { auto *sst_file_reader = reinterpret_cast(jhandle); @@ -78,8 +77,8 @@ jlong Java_org_rocksdb_SstFileReader_newIterator(JNIEnv * /*env*/, * Signature: (J)V */ void Java_org_rocksdb_SstFileReader_disposeInternalJni(JNIEnv * /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { delete reinterpret_cast(jhandle); } @@ -88,8 +87,7 @@ void Java_org_rocksdb_SstFileReader_disposeInternalJni(JNIEnv * /*env*/, * Method: verifyChecksum * Signature: (J)V */ -void Java_org_rocksdb_SstFileReader_verifyChecksum(JNIEnv *env, - jclass /*jcls*/, +void Java_org_rocksdb_SstFileReader_verifyChecksum(JNIEnv *env, jclass /*jcls*/, jlong jhandle) { auto *sst_file_reader = reinterpret_cast(jhandle); @@ -105,7 +103,7 @@ void Java_org_rocksdb_SstFileReader_verifyChecksum(JNIEnv *env, * Signature: (J)J */ jobject Java_org_rocksdb_SstFileReader_getTableProperties(JNIEnv *env, - jclass /*jcls*/, + jclass /*jcls*/, jlong jhandle) { auto *sst_file_reader = reinterpret_cast(jhandle); diff --git a/java/rocksjni/sst_file_writerjni.cc b/java/rocksjni/sst_file_writerjni.cc index bdec4f00fb0d..481adbc85640 100644 --- a/java/rocksjni/sst_file_writerjni.cc +++ b/java/rocksjni/sst_file_writerjni.cc @@ -73,7 +73,7 @@ jlong Java_org_rocksdb_SstFileWriter_newSstFileWriter__JJ(JNIEnv * /*env*/, * Method: open * Signature: (JLjava/lang/String;)V */ -void Java_org_rocksdb_SstFileWriter_open(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_open(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jstring jfile_path) { const char *file_path = env->GetStringUTFChars(jfile_path, nullptr); if (file_path == nullptr) { @@ -95,7 +95,7 @@ void Java_org_rocksdb_SstFileWriter_open(JNIEnv *env, jclass /*jcls*/, * Method: put * Signature: (JJJ)V */ -void Java_org_rocksdb_SstFileWriter_put__JJJ(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_put__JJJ(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jlong jkey_handle, jlong jvalue_handle) { auto *key_slice = reinterpret_cast(jkey_handle); @@ -114,7 +114,7 @@ void Java_org_rocksdb_SstFileWriter_put__JJJ(JNIEnv *env, jclass /*jcls*/, * Method: put * Signature: (JJJ)V */ -void Java_org_rocksdb_SstFileWriter_put__J_3B_3B(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_put__J_3B_3B(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jbyteArray jkey, jbyteArray jval) { jbyte *key = env->GetByteArrayElements(jkey, nullptr); @@ -187,7 +187,7 @@ jlong Java_org_rocksdb_SstFileWriter_fileSize(JNIEnv * /*env*/, jclass /*jcls*/, * Method: merge * Signature: (JJJ)V */ -void Java_org_rocksdb_SstFileWriter_merge__JJJ(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_merge__JJJ(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jlong jkey_handle, jlong jvalue_handle) { auto *key_slice = reinterpret_cast(jkey_handle); @@ -206,8 +206,7 @@ void Java_org_rocksdb_SstFileWriter_merge__JJJ(JNIEnv *env, jclass /*jcls*/, * Method: merge * Signature: (J[B[B)V */ -void Java_org_rocksdb_SstFileWriter_merge__J_3B_3B(JNIEnv *env, - jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_merge__J_3B_3B(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jbyteArray jkey, jbyteArray jval) { @@ -245,7 +244,7 @@ void Java_org_rocksdb_SstFileWriter_merge__J_3B_3B(JNIEnv *env, * Method: delete * Signature: (JJJ)V */ -void Java_org_rocksdb_SstFileWriter_delete__J_3B(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_delete__J_3B(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jbyteArray jkey) { jbyte *key = env->GetByteArrayElements(jkey, nullptr); @@ -272,7 +271,7 @@ void Java_org_rocksdb_SstFileWriter_delete__J_3B(JNIEnv *env, jclass /*jcls*/, * Method: delete * Signature: (JJJ)V */ -void Java_org_rocksdb_SstFileWriter_delete__JJ(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_delete__JJ(JNIEnv *env, jclass /*jcls*/, jlong jhandle, jlong jkey_handle) { auto *key_slice = reinterpret_cast(jkey_handle); @@ -289,7 +288,7 @@ void Java_org_rocksdb_SstFileWriter_delete__JJ(JNIEnv *env, jclass /*jcls*/, * Method: finish * Signature: (J)V */ -void Java_org_rocksdb_SstFileWriter_finish(JNIEnv *env, jclass /*jcls*/, +void Java_org_rocksdb_SstFileWriter_finish(JNIEnv *env, jclass /*jcls*/, jlong jhandle) { ROCKSDB_NAMESPACE::Status s = reinterpret_cast(jhandle)->Finish(); @@ -304,7 +303,7 @@ void Java_org_rocksdb_SstFileWriter_finish(JNIEnv *env, jclass /*jcls*/, * Signature: (J)V */ void Java_org_rocksdb_SstFileWriter_disposeInternalJni(JNIEnv * /*env*/, - jclass /*jobj*/, - jlong jhandle) { + jclass /*jobj*/, + jlong jhandle) { delete reinterpret_cast(jhandle); } diff --git a/java/rocksjni/statistics.cc b/java/rocksjni/statistics.cc index 47f7c90c3b65..d595086cff1c 100644 --- a/java/rocksjni/statistics.cc +++ b/java/rocksjni/statistics.cc @@ -105,7 +105,7 @@ jlong Java_org_rocksdb_Statistics_newStatistics___3BJ( * Signature: (J)V */ void Java_org_rocksdb_Statistics_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { if (jhandle > 0) { auto* pSptr_statistics = reinterpret_cast*>( @@ -149,8 +149,7 @@ void Java_org_rocksdb_Statistics_setStatsLevel(JNIEnv*, jclass, jlong jhandle, * Method: getTickerCount * Signature: (JB)J */ -jlong Java_org_rocksdb_Statistics_getTickerCount(JNIEnv*, jclass, - jlong jhandle, +jlong Java_org_rocksdb_Statistics_getTickerCount(JNIEnv*, jclass, jlong jhandle, jbyte jticker_type) { auto* pSptr_statistics = reinterpret_cast*>( diff --git a/java/rocksjni/table.cc b/java/rocksjni/table.cc index f1cf4f50a222..eb5de1695e6c 100644 --- a/java/rocksjni/table.cc +++ b/java/rocksjni/table.cc @@ -23,9 +23,9 @@ * Signature: (IIDIIBZZ)J */ jlong Java_org_rocksdb_PlainTableConfig_newTableFactoryHandle( - JNIEnv * /*env*/, jclass /*jcls*/, jint jkey_size, - jint jbloom_bits_per_key, jdouble jhash_table_ratio, jint jindex_sparseness, - jint jhuge_page_tlb_size, jbyte jencoding_type, jboolean jfull_scan_mode, + JNIEnv * /*env*/, jclass /*jcls*/, jint jkey_size, jint jbloom_bits_per_key, + jdouble jhash_table_ratio, jint jindex_sparseness, jint jhuge_page_tlb_size, + jbyte jencoding_type, jboolean jfull_scan_mode, jboolean jstore_index_in_file) { ROCKSDB_NAMESPACE::PlainTableOptions options = ROCKSDB_NAMESPACE::PlainTableOptions(); diff --git a/java/rocksjni/transaction.cc b/java/rocksjni/transaction.cc index 397a5fc97011..8ea9ba75f7df 100644 --- a/java/rocksjni/transaction.cc +++ b/java/rocksjni/transaction.cc @@ -38,8 +38,9 @@ void Java_org_rocksdb_Transaction_setSnapshot(JNIEnv* /*env*/, jclass /*jcls*/, * Method: setSnapshotOnNextOperation * Signature: (J)V */ -void Java_org_rocksdb_Transaction_setSnapshotOnNextOperation__J( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle) { +void Java_org_rocksdb_Transaction_setSnapshotOnNextOperation__J(JNIEnv* /*env*/, + jclass /*jcls*/, + jlong jhandle) { auto* txn = reinterpret_cast(jhandle); txn->SetSnapshotOnNextOperation(nullptr); } @@ -64,8 +65,7 @@ void Java_org_rocksdb_Transaction_setSnapshotOnNextOperation__JJ( * Method: getSnapshot * Signature: (J)J */ -jlong Java_org_rocksdb_Transaction_getSnapshot(JNIEnv* /*env*/, - jclass /*jcls*/, +jlong Java_org_rocksdb_Transaction_getSnapshot(JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle) { auto* txn = reinterpret_cast(jhandle); const ROCKSDB_NAMESPACE::Snapshot* snapshot = txn->GetSnapshot(); @@ -131,8 +131,7 @@ void Java_org_rocksdb_Transaction_rollback(JNIEnv* env, jclass /*jobj*/, * Method: setSavePoint * Signature: (J)V */ -void Java_org_rocksdb_Transaction_setSavePoint(JNIEnv* /*env*/, - jclass /*jcls*/, +void Java_org_rocksdb_Transaction_setSavePoint(JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle) { auto* txn = reinterpret_cast(jhandle); txn->SetSavePoint(); @@ -540,8 +539,8 @@ jlong Java_org_rocksdb_Transaction_getIterator__JJ(JNIEnv* /*env*/, * Signature: (JJJ)J */ jlong Java_org_rocksdb_Transaction_getIterator__JJJ( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, - jlong jread_options_handle, jlong jcolumn_family_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jhandle, jlong jread_options_handle, + jlong jcolumn_family_handle) { auto* txn = reinterpret_cast(jhandle); auto* read_options = reinterpret_cast(jread_options_handle); @@ -1379,8 +1378,7 @@ jlong Java_org_rocksdb_Transaction_getWriteBatch(JNIEnv* /*env*/, * Signature: (JJ)V */ void Java_org_rocksdb_Transaction_setLockTimeout(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle, + jclass /*jcls*/, jlong jhandle, jlong jlock_timeout) { auto* txn = reinterpret_cast(jhandle); txn->SetLockTimeout(jlock_timeout); @@ -1495,8 +1493,8 @@ jlong Java_org_rocksdb_Transaction_getCommitTimeWriteBatch(JNIEnv* /*env*/, * Method: setLogNumber * Signature: (JJ)V */ -void Java_org_rocksdb_Transaction_setLogNumber(JNIEnv* /*env*/, - jclass /*jcls*/, jlong jhandle, +void Java_org_rocksdb_Transaction_setLogNumber(JNIEnv* /*env*/, jclass /*jcls*/, + jlong jhandle, jlong jlog_number) { auto* txn = reinterpret_cast(jhandle); txn->SetLogNumber(jlog_number); diff --git a/java/rocksjni/transaction_db.cc b/java/rocksjni/transaction_db.cc index 8d9cb20200ec..595360acdeb6 100644 --- a/java/rocksjni/transaction_db.cc +++ b/java/rocksjni/transaction_db.cc @@ -148,7 +148,7 @@ jlongArray Java_org_rocksdb_TransactionDB_open__JJLjava_lang_String_2_3_3B_3J( * Signature: (J)V */ void Java_org_rocksdb_TransactionDB_disposeInternalJni(JNIEnv*, jclass, - jlong jhandle) { + jlong jhandle) { auto* txn_db = reinterpret_cast(jhandle); assert(txn_db != nullptr); delete txn_db; diff --git a/java/rocksjni/transaction_db_options.cc b/java/rocksjni/transaction_db_options.cc index 9ff76f0ff81b..813c53728914 100644 --- a/java/rocksjni/transaction_db_options.cc +++ b/java/rocksjni/transaction_db_options.cc @@ -163,7 +163,7 @@ void Java_org_rocksdb_TransactionDBOptions_setWritePolicy(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_TransactionDBOptions_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { delete reinterpret_cast(jhandle); } diff --git a/java/rocksjni/transaction_log.cc b/java/rocksjni/transaction_log.cc index e88a3e4614b6..955a2dfcb278 100644 --- a/java/rocksjni/transaction_log.cc +++ b/java/rocksjni/transaction_log.cc @@ -21,8 +21,8 @@ * Signature: (J)V */ void Java_org_rocksdb_TransactionLogIterator_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { delete reinterpret_cast(handle); } diff --git a/java/rocksjni/transaction_options.cc b/java/rocksjni/transaction_options.cc index fb3f5c075aaa..0a2414fc6d12 100644 --- a/java/rocksjni/transaction_options.cc +++ b/java/rocksjni/transaction_options.cc @@ -185,7 +185,7 @@ void Java_org_rocksdb_TransactionOptions_setMaxWriteBatchSize( * Signature: (J)V */ void Java_org_rocksdb_TransactionOptions_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong jhandle) { + jclass /*jobj*/, + jlong jhandle) { delete reinterpret_cast(jhandle); } diff --git a/java/rocksjni/write_batch.cc b/java/rocksjni/write_batch.cc index e8774e9157a0..8ead84671d98 100644 --- a/java/rocksjni/write_batch.cc +++ b/java/rocksjni/write_batch.cc @@ -66,7 +66,7 @@ jlong Java_org_rocksdb_WriteBatch_newWriteBatch___3BI(JNIEnv* env, * Signature: (J)I */ jint Java_org_rocksdb_WriteBatch_count0Jni(JNIEnv* /*env*/, jclass /*jobj*/, - jlong jwb_handle) { + jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -79,7 +79,7 @@ jint Java_org_rocksdb_WriteBatch_count0Jni(JNIEnv* /*env*/, jclass /*jobj*/, * Signature: (J)V */ void Java_org_rocksdb_WriteBatch_clear0Jni(JNIEnv* /*env*/, jclass /*jobj*/, - jlong jwb_handle) { + jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -92,8 +92,8 @@ void Java_org_rocksdb_WriteBatch_clear0Jni(JNIEnv* /*env*/, jclass /*jobj*/, * Signature: (J)V */ void Java_org_rocksdb_WriteBatch_setSavePoint0Jni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong jwb_handle) { + jclass /*jobj*/, + jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -106,8 +106,8 @@ void Java_org_rocksdb_WriteBatch_setSavePoint0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_WriteBatch_rollbackToSavePoint0Jni(JNIEnv* env, - jclass /*jobj*/, - jlong jwb_handle) { + jclass /*jobj*/, + jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -125,7 +125,7 @@ void Java_org_rocksdb_WriteBatch_rollbackToSavePoint0Jni(JNIEnv* env, * Signature: (J)V */ void Java_org_rocksdb_WriteBatch_popSavePointJni(JNIEnv* env, jclass /*jobj*/, - jlong jwb_handle) { + jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -142,9 +142,10 @@ void Java_org_rocksdb_WriteBatch_popSavePointJni(JNIEnv* env, jclass /*jobj*/, * Method: setMaxBytes * Signature: (JJ)V */ -void Java_org_rocksdb_WriteBatch_setMaxBytesJni(JNIEnv* /*env*/, jclass /*jobj*/, - jlong jwb_handle, - jlong jmax_bytes) { +void Java_org_rocksdb_WriteBatch_setMaxBytesJni(JNIEnv* /*env*/, + jclass /*jobj*/, + jlong jwb_handle, + jlong jmax_bytes) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -156,11 +157,9 @@ void Java_org_rocksdb_WriteBatch_setMaxBytesJni(JNIEnv* /*env*/, jclass /*jobj*/ * Method: put * Signature: (J[BI[BI)V */ -void Java_org_rocksdb_WriteBatch_putJni__J_3BI_3BI(JNIEnv* env, jclass, - jlong jwb_handle, - jbyteArray jkey, jint jkey_len, - jbyteArray jentry_value, - jint jentry_value_len) { +void Java_org_rocksdb_WriteBatch_putJni__J_3BI_3BI( + JNIEnv* env, jclass, jlong jwb_handle, jbyteArray jkey, jint jkey_len, + jbyteArray jentry_value, jint jentry_value_len) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto put = [&wb](ROCKSDB_NAMESPACE::Slice key, @@ -168,8 +167,8 @@ void Java_org_rocksdb_WriteBatch_putJni__J_3BI_3BI(JNIEnv* env, jclass, return wb->Put(key, value); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, - jentry_value, jentry_value_len); + ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, jentry_value, + jentry_value_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -193,8 +192,8 @@ void Java_org_rocksdb_WriteBatch_putJni__J_3BI_3BIJ( return wb->Put(cf_handle, key, value); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, - jentry_value, jentry_value_len); + ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, jentry_value, + jentry_value_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -206,10 +205,10 @@ void Java_org_rocksdb_WriteBatch_putJni__J_3BI_3BIJ( * Signature: (JLjava/nio/ByteBuffer;IILjava/nio/ByteBuffer;IIJ)V */ void Java_org_rocksdb_WriteBatch_putDirectJni(JNIEnv* env, jclass /*jobj*/, - jlong jwb_handle, jobject jkey, - jint jkey_offset, jint jkey_len, - jobject jval, jint jval_offset, - jint jval_len, jlong jcf_handle) { + jlong jwb_handle, jobject jkey, + jint jkey_offset, jint jkey_len, + jobject jval, jint jval_offset, + jint jval_len, jlong jcf_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto* cf_handle = @@ -279,8 +278,9 @@ void Java_org_rocksdb_WriteBatch_mergeJni__J_3BI_3BIJ( * Signature: (J[BI)V */ void Java_org_rocksdb_WriteBatch_deleteJni__J_3BI(JNIEnv* env, jclass, - jlong jwb_handle, - jbyteArray jkey, jint jkey_len) { + jlong jwb_handle, + jbyteArray jkey, + jint jkey_len) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto remove = [&wb](ROCKSDB_NAMESPACE::Slice key) { return wb->Delete(key); }; @@ -297,9 +297,10 @@ void Java_org_rocksdb_WriteBatch_deleteJni__J_3BI(JNIEnv* env, jclass, * Signature: (J[BIJ)V */ void Java_org_rocksdb_WriteBatch_deleteJni__J_3BIJ(JNIEnv* env, jclass, - jlong jwb_handle, - jbyteArray jkey, jint jkey_len, - jlong jcf_handle) { + jlong jwb_handle, + jbyteArray jkey, + jint jkey_len, + jlong jcf_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto* cf_handle = @@ -321,17 +322,16 @@ void Java_org_rocksdb_WriteBatch_deleteJni__J_3BIJ(JNIEnv* env, jclass, * Signature: (J[BI)V */ void Java_org_rocksdb_WriteBatch_singleDeleteJni__J_3BI(JNIEnv* env, jclass, - jlong jwb_handle, - jbyteArray jkey, - jint jkey_len) { + jlong jwb_handle, + jbyteArray jkey, + jint jkey_len) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto single_delete = [&wb](ROCKSDB_NAMESPACE::Slice key) { return wb->SingleDelete(key); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, - jkey_len); + ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, jkey_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -343,10 +343,10 @@ void Java_org_rocksdb_WriteBatch_singleDeleteJni__J_3BI(JNIEnv* env, jclass, * Signature: (J[BIJ)V */ void Java_org_rocksdb_WriteBatch_singleDeleteJni__J_3BIJ(JNIEnv* env, jclass, - jlong jwb_handle, - jbyteArray jkey, - jint jkey_len, - jlong jcf_handle) { + jlong jwb_handle, + jbyteArray jkey, + jint jkey_len, + jlong jcf_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto* cf_handle = @@ -356,8 +356,7 @@ void Java_org_rocksdb_WriteBatch_singleDeleteJni__J_3BIJ(JNIEnv* env, jclass, return wb->SingleDelete(cf_handle, key); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, - jkey_len); + ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, jkey_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -369,9 +368,10 @@ void Java_org_rocksdb_WriteBatch_singleDeleteJni__J_3BIJ(JNIEnv* env, jclass, * Signature: (JLjava/nio/ByteBuffer;IIJ)V */ void Java_org_rocksdb_WriteBatch_deleteDirectJni(JNIEnv* env, jclass /*jobj*/, - jlong jwb_handle, jobject jkey, - jint jkey_offset, jint jkey_len, - jlong jcf_handle) { + jlong jwb_handle, jobject jkey, + jint jkey_offset, + jint jkey_len, + jlong jcf_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto* cf_handle = @@ -441,8 +441,9 @@ void Java_org_rocksdb_WriteBatch_deleteRangeJni__J_3BI_3BIJ( * Signature: (J[BI)V */ void Java_org_rocksdb_WriteBatch_putLogDataJni(JNIEnv* env, jclass, - jlong jwb_handle, jbyteArray jblob, - jint jblob_len) { + jlong jwb_handle, + jbyteArray jblob, + jint jblob_len) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); auto putLogData = [&wb](ROCKSDB_NAMESPACE::Slice blob) { @@ -460,7 +461,7 @@ void Java_org_rocksdb_WriteBatch_putLogDataJni(JNIEnv* env, jclass, * Method: iterate * Signature: (JJ)V */ -void Java_org_rocksdb_WriteBatch_iterate(JNIEnv* env, jclass /*jcls*/, +void Java_org_rocksdb_WriteBatch_iterate(JNIEnv* env, jclass /*jcls*/, jlong jwb_handle, jlong handlerHandle) { auto* wb = reinterpret_cast(jwb_handle); @@ -481,7 +482,7 @@ void Java_org_rocksdb_WriteBatch_iterate(JNIEnv* env, jclass /*jcls*/, * Method: data * Signature: (J)[B */ -jbyteArray Java_org_rocksdb_WriteBatch_data(JNIEnv* env, jclass /*jcls*/, +jbyteArray Java_org_rocksdb_WriteBatch_data(JNIEnv* env, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -495,7 +496,7 @@ jbyteArray Java_org_rocksdb_WriteBatch_data(JNIEnv* env, jclass /*jcls*/, * Method: getDataSize * Signature: (J)J */ -jlong Java_org_rocksdb_WriteBatch_getDataSize(JNIEnv* /*env*/, jclass /*jcls*/, +jlong Java_org_rocksdb_WriteBatch_getDataSize(JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -509,7 +510,7 @@ jlong Java_org_rocksdb_WriteBatch_getDataSize(JNIEnv* /*env*/, jclass /*jcls*/, * Method: hasPut * Signature: (J)Z */ -jboolean Java_org_rocksdb_WriteBatch_hasPut(JNIEnv* /*env*/, jclass /*jcls*/, +jboolean Java_org_rocksdb_WriteBatch_hasPut(JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -522,8 +523,7 @@ jboolean Java_org_rocksdb_WriteBatch_hasPut(JNIEnv* /*env*/, jclass /*jcls*/, * Method: hasDelete * Signature: (J)Z */ -jboolean Java_org_rocksdb_WriteBatch_hasDelete(JNIEnv* /*env*/, - jclass /*jcls*/, +jboolean Java_org_rocksdb_WriteBatch_hasDelete(JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -537,7 +537,7 @@ jboolean Java_org_rocksdb_WriteBatch_hasDelete(JNIEnv* /*env*/, * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasSingleDelete( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -550,7 +550,7 @@ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasSingleDelete( * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasDeleteRange( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -563,7 +563,7 @@ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasDeleteRange( * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasMerge( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -576,7 +576,7 @@ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasMerge( * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasBeginPrepare( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -589,7 +589,7 @@ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasBeginPrepare( * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasEndPrepare( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -602,7 +602,7 @@ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasEndPrepare( * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasCommit( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -615,7 +615,7 @@ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasCommit( * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasRollback( - JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { + JNIEnv* /*env*/, jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -628,7 +628,7 @@ JNIEXPORT jboolean JNICALL Java_org_rocksdb_WriteBatch_hasRollback( * Signature: (J)V */ void Java_org_rocksdb_WriteBatch_markWalTerminationPoint(JNIEnv* /*env*/, - jclass /*jcls*/, + jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -642,7 +642,7 @@ void Java_org_rocksdb_WriteBatch_markWalTerminationPoint(JNIEnv* /*env*/, * Signature: (J)Lorg/rocksdb/WriteBatch/SavePoint; */ jobject Java_org_rocksdb_WriteBatch_getWalTerminationPoint(JNIEnv* env, - jclass /*jcls*/, + jclass /*jcls*/, jlong jwb_handle) { auto* wb = reinterpret_cast(jwb_handle); assert(wb != nullptr); @@ -657,8 +657,8 @@ jobject Java_org_rocksdb_WriteBatch_getWalTerminationPoint(JNIEnv* env, * Signature: (J)V */ void Java_org_rocksdb_WriteBatch_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong handle) { + jclass /*jobj*/, + jlong handle) { auto* wb = reinterpret_cast(handle); assert(wb != nullptr); delete wb; diff --git a/java/rocksjni/write_batch_with_index.cc b/java/rocksjni/write_batch_with_index.cc index b1a550bbd54f..5b7149bc37cf 100644 --- a/java/rocksjni/write_batch_with_index.cc +++ b/java/rocksjni/write_batch_with_index.cc @@ -73,8 +73,8 @@ jlong Java_org_rocksdb_WriteBatchWithIndex_newWriteBatchWithIndex__JBIZ( * Signature: (J)I */ jint Java_org_rocksdb_WriteBatchWithIndex_count0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jwbwi_handle) { + jclass /*jcls*/, + jlong jwbwi_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -88,8 +88,8 @@ jint Java_org_rocksdb_WriteBatchWithIndex_count0Jni(JNIEnv* /*env*/, * Signature: (J[BI[BI)V */ void Java_org_rocksdb_WriteBatchWithIndex_putJni__J_3BI_3BI( - JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, - jint jkey_len, jbyteArray jentry_value, jint jentry_value_len) { + JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, jint jkey_len, + jbyteArray jentry_value, jint jentry_value_len) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -98,8 +98,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_putJni__J_3BI_3BI( return wbwi->Put(key, value); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, - jentry_value, jentry_value_len); + ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, jentry_value, + jentry_value_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -111,9 +111,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_putJni__J_3BI_3BI( * Signature: (J[BI[BIJ)V */ void Java_org_rocksdb_WriteBatchWithIndex_putJni__J_3BI_3BIJ( - JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, - jint jkey_len, jbyteArray jentry_value, jint jentry_value_len, - jlong jcf_handle) { + JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, jint jkey_len, + jbyteArray jentry_value, jint jentry_value_len, jlong jcf_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -125,8 +124,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_putJni__J_3BI_3BIJ( return wbwi->Put(cf_handle, key, value); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, - jentry_value, jentry_value_len); + ROCKSDB_NAMESPACE::JniUtil::kv_op(put, env, jkey, jkey_len, jentry_value, + jentry_value_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -163,8 +162,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_putDirectJni( * Signature: (J[BI[BI)V */ void Java_org_rocksdb_WriteBatchWithIndex_mergeJni__J_3BI_3BI( - JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, - jint jkey_len, jbyteArray jentry_value, jint jentry_value_len) { + JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, jint jkey_len, + jbyteArray jentry_value, jint jentry_value_len) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -186,9 +185,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_mergeJni__J_3BI_3BI( * Signature: (J[BI[BIJ)V */ void Java_org_rocksdb_WriteBatchWithIndex_mergeJni__J_3BI_3BIJ( - JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, - jint jkey_len, jbyteArray jentry_value, jint jentry_value_len, - jlong jcf_handle) { + JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, jint jkey_len, + jbyteArray jentry_value, jint jentry_value_len, jlong jcf_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -212,11 +210,10 @@ void Java_org_rocksdb_WriteBatchWithIndex_mergeJni__J_3BI_3BIJ( * Method: delete * Signature: (J[BI)V */ -void Java_org_rocksdb_WriteBatchWithIndex_deleteJni__J_3BI(JNIEnv* env, - jclass, - jlong jwbwi_handle, - jbyteArray jkey, - jint jkey_len) { +void Java_org_rocksdb_WriteBatchWithIndex_deleteJni__J_3BI(JNIEnv* env, jclass, + jlong jwbwi_handle, + jbyteArray jkey, + jint jkey_len) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -235,9 +232,11 @@ void Java_org_rocksdb_WriteBatchWithIndex_deleteJni__J_3BI(JNIEnv* env, * Method: delete * Signature: (J[BIJ)V */ -void Java_org_rocksdb_WriteBatchWithIndex_deleteJni__J_3BIJ( - JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, - jint jkey_len, jlong jcf_handle) { +void Java_org_rocksdb_WriteBatchWithIndex_deleteJni__J_3BIJ(JNIEnv* env, jclass, + jlong jwbwi_handle, + jbyteArray jkey, + jint jkey_len, + jlong jcf_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -260,8 +259,7 @@ void Java_org_rocksdb_WriteBatchWithIndex_deleteJni__J_3BIJ( * Signature: (J[BI)V */ void Java_org_rocksdb_WriteBatchWithIndex_singleDeleteJni__J_3BI( - JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, - jint jkey_len) { + JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, jint jkey_len) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -269,8 +267,7 @@ void Java_org_rocksdb_WriteBatchWithIndex_singleDeleteJni__J_3BI( return wbwi->SingleDelete(key); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, - jkey_len); + ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, jkey_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -282,8 +279,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_singleDeleteJni__J_3BI( * Signature: (J[BIJ)V */ void Java_org_rocksdb_WriteBatchWithIndex_singleDeleteJni__J_3BIJ( - JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, - jint jkey_len, jlong jcf_handle) { + JNIEnv* env, jclass, jlong jwbwi_handle, jbyteArray jkey, jint jkey_len, + jlong jcf_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -294,8 +291,7 @@ void Java_org_rocksdb_WriteBatchWithIndex_singleDeleteJni__J_3BIJ( return wbwi->SingleDelete(cf_handle, key); }; std::unique_ptr status = - ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, - jkey_len); + ROCKSDB_NAMESPACE::JniUtil::k_op(single_delete, env, jkey, jkey_len); if (status != nullptr && !status->ok()) { ROCKSDB_NAMESPACE::RocksDBExceptionJni::ThrowNew(env, status); } @@ -380,9 +376,9 @@ void Java_org_rocksdb_WriteBatchWithIndex_deleteRangeJni__J_3BI_3BIJ( * Signature: (J[BI)V */ void Java_org_rocksdb_WriteBatchWithIndex_putLogDataJni(JNIEnv* env, jclass, - jlong jwbwi_handle, - jbyteArray jblob, - jint jblob_len) { + jlong jwbwi_handle, + jbyteArray jblob, + jint jblob_len) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -402,8 +398,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_putLogDataJni(JNIEnv* env, jclass, * Signature: (J)V */ void Java_org_rocksdb_WriteBatchWithIndex_clear0Jni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong jwbwi_handle) { + jclass /*jobj*/, + jlong jwbwi_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -417,8 +413,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_clear0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_WriteBatchWithIndex_setSavePoint0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jwbwi_handle) { + jclass /*jcls*/, + jlong jwbwi_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -452,8 +448,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_rollbackToSavePoint0Jni( * Signature: (J)V */ void Java_org_rocksdb_WriteBatchWithIndex_popSavePointJni(JNIEnv* env, - jclass /*jobj*/, - jlong jwbwi_handle) { + jclass /*jobj*/, + jlong jwbwi_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -473,9 +469,9 @@ void Java_org_rocksdb_WriteBatchWithIndex_popSavePointJni(JNIEnv* env, * Signature: (JJ)V */ void Java_org_rocksdb_WriteBatchWithIndex_setMaxBytesJni(JNIEnv* /*env*/, - jclass /*cls*/, - jlong jwbwi_handle, - jlong jmax_bytes) { + jclass /*cls*/, + jlong jwbwi_handle, + jlong jmax_bytes) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -488,9 +484,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_setMaxBytesJni(JNIEnv* /*env*/, * Method: getWriteBatch * Signature: (J)Lorg/rocksdb/WriteBatch; */ -jobject Java_org_rocksdb_WriteBatchWithIndex_getWriteBatchJni(JNIEnv* env, - jclass /*jobj*/, - jlong jwbwi_handle) { +jobject Java_org_rocksdb_WriteBatchWithIndex_getWriteBatchJni( + JNIEnv* env, jclass /*jobj*/, jlong jwbwi_handle) { auto* wbwi = reinterpret_cast(jwbwi_handle); assert(wbwi != nullptr); @@ -650,8 +645,8 @@ jbyteArray Java_org_rocksdb_WriteBatchWithIndex_getFromBatchAndDB__JJJ_3BIJ( * Signature: (J)V */ void Java_org_rocksdb_WriteBatchWithIndex_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { auto* wbwi = reinterpret_cast(handle); assert(wbwi != nullptr); @@ -666,8 +661,8 @@ void Java_org_rocksdb_WriteBatchWithIndex_disposeInternalJni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_WBWIRocksIterator_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jobj*/, - jlong handle) { + jclass /*jobj*/, + jlong handle) { auto* it = reinterpret_cast(handle); assert(it != nullptr); delete it; @@ -679,8 +674,8 @@ void Java_org_rocksdb_WBWIRocksIterator_disposeInternalJni(JNIEnv* /*env*/, * Signature: (J)Z */ jboolean Java_org_rocksdb_WBWIRocksIterator_isValid0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { return reinterpret_cast(handle)->Valid(); } @@ -690,8 +685,8 @@ jboolean Java_org_rocksdb_WBWIRocksIterator_isValid0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_WBWIRocksIterator_seekToFirst0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { reinterpret_cast(handle)->SeekToFirst(); } @@ -701,8 +696,8 @@ void Java_org_rocksdb_WBWIRocksIterator_seekToFirst0Jni(JNIEnv* /*env*/, * Signature: (J)V */ void Java_org_rocksdb_WBWIRocksIterator_seekToLast0Jni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong handle) { + jclass /*jcls*/, + jlong handle) { reinterpret_cast(handle)->SeekToLast(); } @@ -711,8 +706,9 @@ void Java_org_rocksdb_WBWIRocksIterator_seekToLast0Jni(JNIEnv* /*env*/, * Method: next0 * Signature: (J)V */ -void Java_org_rocksdb_WBWIRocksIterator_next0Jni(JNIEnv* /*env*/, jclass /*jcls*/, - jlong handle) { +void Java_org_rocksdb_WBWIRocksIterator_next0Jni(JNIEnv* /*env*/, + jclass /*jcls*/, + jlong handle) { reinterpret_cast(handle)->Next(); } @@ -721,8 +717,9 @@ void Java_org_rocksdb_WBWIRocksIterator_next0Jni(JNIEnv* /*env*/, jclass /*jcls* * Method: prev0 * Signature: (J)V */ -void Java_org_rocksdb_WBWIRocksIterator_prev0Jni(JNIEnv* /*env*/, jclass /*jcls*/, - jlong handle) { +void Java_org_rocksdb_WBWIRocksIterator_prev0Jni(JNIEnv* /*env*/, + jclass /*jcls*/, + jlong handle) { reinterpret_cast(handle)->Prev(); } @@ -732,8 +729,9 @@ void Java_org_rocksdb_WBWIRocksIterator_prev0Jni(JNIEnv* /*env*/, jclass /*jcls* * Signature: (J[BI)V */ void Java_org_rocksdb_WBWIRocksIterator_seek0Jni(JNIEnv* env, jclass /*jcls*/, - jlong handle, jbyteArray jtarget, - jint jtarget_len) { + jlong handle, + jbyteArray jtarget, + jint jtarget_len) { auto* it = reinterpret_cast(handle); jbyte* target = new jbyte[jtarget_len]; env->GetByteArrayRegion(jtarget, 0, jtarget_len, target); @@ -800,10 +798,10 @@ void Java_org_rocksdb_WBWIRocksIterator_seekByteArray0Jni( * Signature: (J[BI)V */ void Java_org_rocksdb_WBWIRocksIterator_seekForPrev0Jni(JNIEnv* env, - jclass /*jcls*/, - jlong handle, - jbyteArray jtarget, - jint jtarget_len) { + jclass /*jcls*/, + jlong handle, + jbyteArray jtarget, + jint jtarget_len) { auto* it = reinterpret_cast(handle); jbyte* target = new jbyte[jtarget_len]; env->GetByteArrayRegion(jtarget, 0, jtarget_len, target); @@ -870,7 +868,7 @@ void Java_org_rocksdb_WBWIRocksIterator_seekForPrevByteArray0Jni( * Signature: (J)V */ void Java_org_rocksdb_WBWIRocksIterator_status0Jni(JNIEnv* env, jclass /*jcls*/, - jlong handle) { + jlong handle) { auto* it = reinterpret_cast(handle); ROCKSDB_NAMESPACE::Status s = it->status(); diff --git a/java/rocksjni/write_buffer_manager.cc b/java/rocksjni/write_buffer_manager.cc index 68c77425ce48..8dd82063325f 100644 --- a/java/rocksjni/write_buffer_manager.cc +++ b/java/rocksjni/write_buffer_manager.cc @@ -37,8 +37,8 @@ jlong Java_org_rocksdb_WriteBufferManager_newWriteBufferManager( * Signature: (J)V */ void Java_org_rocksdb_WriteBufferManager_disposeInternalJni(JNIEnv* /*env*/, - jclass /*jcls*/, - jlong jhandle) { + jclass /*jcls*/, + jlong jhandle) { auto* write_buffer_manager = reinterpret_cast*>( jhandle); diff --git a/java/src/main/java/org/rocksdb/AbstractSlice.java b/java/src/main/java/org/rocksdb/AbstractSlice.java index 24f8ea81fbca..54eeb65fdb18 100644 --- a/java/src/main/java/org/rocksdb/AbstractSlice.java +++ b/java/src/main/java/org/rocksdb/AbstractSlice.java @@ -191,5 +191,4 @@ protected final void disposeInternal(final long handle) { } private static native void disposeInternalJni(final long handle); - } diff --git a/java/src/main/java/org/rocksdb/AbstractTransactionNotifier.java b/java/src/main/java/org/rocksdb/AbstractTransactionNotifier.java index f21a1ed1b461..40caaa0854cc 100644 --- a/java/src/main/java/org/rocksdb/AbstractTransactionNotifier.java +++ b/java/src/main/java/org/rocksdb/AbstractTransactionNotifier.java @@ -55,5 +55,4 @@ protected final void disposeInternal(final long handle) { } private static native void disposeInternalJni(final long handle); - } diff --git a/java/src/main/java/org/rocksdb/BackupEngine.java b/java/src/main/java/org/rocksdb/BackupEngine.java index 00eb70073acf..4ee675ad758e 100644 --- a/java/src/main/java/org/rocksdb/BackupEngine.java +++ b/java/src/main/java/org/rocksdb/BackupEngine.java @@ -241,8 +241,8 @@ private static native void createNewBackupWithMetadata(final long handle, final private static native void garbageCollect(final long handle) throws RocksDBException; - private static native void purgeOldBackups(final long handle, - final int numBackupsToKeep) throws RocksDBException; + private static native void purgeOldBackups(final long handle, final int numBackupsToKeep) + throws RocksDBException; private static native void deleteBackup(final long handle, final int backupId) throws RocksDBException; @@ -251,14 +251,13 @@ private static native void restoreDbFromBackup(final long handle, final int back final String dbDir, final String walDir, final long restoreOptionsHandle) throws RocksDBException; - private static native void restoreDbFromLatestBackup(final long handle, - final String dbDir, final String walDir, final long restoreOptionsHandle) - throws RocksDBException; + private static native void restoreDbFromLatestBackup(final long handle, final String dbDir, + final String walDir, final long restoreOptionsHandle) throws RocksDBException; - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - } diff --git a/java/src/main/java/org/rocksdb/BackupEngineOptions.java b/java/src/main/java/org/rocksdb/BackupEngineOptions.java index 5ade844526c2..02d432d0f7b9 100644 --- a/java/src/main/java/org/rocksdb/BackupEngineOptions.java +++ b/java/src/main/java/org/rocksdb/BackupEngineOptions.java @@ -444,20 +444,19 @@ public long callbackTriggerIntervalSize() { private static native void setBackupRateLimiter(long handle, long rateLimiterHandle); private static native void setRestoreRateLimit(long handle, long rateLimit); private static native long restoreRateLimit(long handle); - private static native void setRestoreRateLimiter(final long handle, - final long rateLimiterHandle); + private static native void setRestoreRateLimiter(final long handle, final long rateLimiterHandle); private static native void setShareFilesWithChecksum(long handle, boolean flag); private static native boolean shareFilesWithChecksum(long handle); - private static native void setMaxBackgroundOperations(final long handle, - final int maxBackgroundOperations); + private static native void setMaxBackgroundOperations( + final long handle, final int maxBackgroundOperations); private static native int maxBackgroundOperations(final long handle); - private static native void setCallbackTriggerIntervalSize(final long handle, - long callbackTriggerIntervalSize); + private static native void setCallbackTriggerIntervalSize( + final long handle, long callbackTriggerIntervalSize); private static native long callbackTriggerIntervalSize(final long handle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - } diff --git a/java/src/main/java/org/rocksdb/CassandraValueMergeOperator.java b/java/src/main/java/org/rocksdb/CassandraValueMergeOperator.java index f42a754a30f0..cdb82ee43473 100644 --- a/java/src/main/java/org/rocksdb/CassandraValueMergeOperator.java +++ b/java/src/main/java/org/rocksdb/CassandraValueMergeOperator.java @@ -21,10 +21,10 @@ public CassandraValueMergeOperator(final int gcGracePeriodInSeconds, final int o private static native long newSharedCassandraValueMergeOperator( int gcGracePeriodInSeconds, int limit); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - } diff --git a/java/src/main/java/org/rocksdb/Checkpoint.java b/java/src/main/java/org/rocksdb/Checkpoint.java index 405120626bbe..9acdfe2ffa91 100644 --- a/java/src/main/java/org/rocksdb/Checkpoint.java +++ b/java/src/main/java/org/rocksdb/Checkpoint.java @@ -55,7 +55,8 @@ private Checkpoint(final RocksDB db) { } private static native long newCheckpoint(long dbHandle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/ClockCache.java b/java/src/main/java/org/rocksdb/ClockCache.java index 4450848b9504..1ac7904623bc 100644 --- a/java/src/main/java/org/rocksdb/ClockCache.java +++ b/java/src/main/java/org/rocksdb/ClockCache.java @@ -55,7 +55,8 @@ public ClockCache(final long capacity, final int numShardBits, private static native long newClockCache( final long capacity, final int numShardBits, final boolean strictCapacityLimit); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/ColumnFamilyHandle.java b/java/src/main/java/org/rocksdb/ColumnFamilyHandle.java index 7fa1779a6da9..d5d62ef1d45d 100644 --- a/java/src/main/java/org/rocksdb/ColumnFamilyHandle.java +++ b/java/src/main/java/org/rocksdb/ColumnFamilyHandle.java @@ -144,8 +144,10 @@ protected void disposeInternal() { private static native byte[] getName(final long handle) throws RocksDBException; private static native int getID(final long handle); - private static native ColumnFamilyDescriptor getDescriptor(final long handle) throws RocksDBException; - @Override protected final void disposeInternal(final long handle) { + private static native ColumnFamilyDescriptor getDescriptor(final long handle) + throws RocksDBException; + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java b/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java index 15461fa8f0d8..d73096b23bfc 100644 --- a/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java +++ b/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java @@ -1337,7 +1337,8 @@ private static native long getColumnFamilyOptionsFromProps( private static native long copyColumnFamilyOptions(final long handle); private static native long newColumnFamilyOptionsFromOptions( final long optionsHandle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -1346,86 +1347,67 @@ private static native void oldDefaults( final long handle, final int majorVersion, final int minorVersion); private static native void optimizeForSmallDb(final long handle); private static native void optimizeForSmallDb(final long handle, final long cacheHandle); - private static native void optimizeForPointLookup(long handle, - long blockCacheSizeMb); - private static native void optimizeLevelStyleCompaction(long handle, - long memtableMemoryBudget); - private static native void optimizeUniversalStyleCompaction(long handle, - long memtableMemoryBudget); + private static native void optimizeForPointLookup(long handle, long blockCacheSizeMb); + private static native void optimizeLevelStyleCompaction(long handle, long memtableMemoryBudget); + private static native void optimizeUniversalStyleCompaction( + long handle, long memtableMemoryBudget); private static native void setComparatorHandle(long handle, int builtinComparator); - private static native void setComparatorHandle(long optHandle, - long comparatorHandle, byte comparatorType); + private static native void setComparatorHandle( + long optHandle, long comparatorHandle, byte comparatorType); private static native void setMergeOperatorName(long handle, String name); private static native void setMergeOperator(long handle, long mergeOperatorHandle); - private static native void setCompactionFilterHandle(long handle, - long compactionFilterHandle); - private static native void setCompactionFilterFactoryHandle(long handle, - long compactionFilterFactoryHandle); + private static native void setCompactionFilterHandle(long handle, long compactionFilterHandle); + private static native void setCompactionFilterFactoryHandle( + long handle, long compactionFilterFactoryHandle); private static native void setWriteBufferSize(long handle, long writeBufferSize) throws IllegalArgumentException; private static native long writeBufferSize(long handle); - private static native void setMaxWriteBufferNumber( - long handle, int maxWriteBufferNumber); + private static native void setMaxWriteBufferNumber(long handle, int maxWriteBufferNumber); private static native int maxWriteBufferNumber(long handle); private static native void setMinWriteBufferNumberToMerge( long handle, int minWriteBufferNumberToMerge); private static native int minWriteBufferNumberToMerge(long handle); private static native void setCompressionType(long handle, byte compressionType); private static native byte compressionType(long handle); - private static native void setCompressionPerLevel(long handle, - byte[] compressionLevels); + private static native void setCompressionPerLevel(long handle, byte[] compressionLevels); private static native byte[] compressionPerLevel(long handle); - private static native void setBottommostCompressionType(long handle, - byte bottommostCompressionType); + private static native void setBottommostCompressionType( + long handle, byte bottommostCompressionType); private static native byte bottommostCompressionType(long handle); - private static native void setBottommostCompressionOptions(final long handle, - final long bottommostCompressionOptionsHandle); - private static native void setCompressionOptions(long handle, - long compressionOptionsHandle); - private static native void useFixedLengthPrefixExtractor( - long handle, int prefixLength); - private static native void useCappedPrefixExtractor( - long handle, int prefixLength); - private static native void setNumLevels( - long handle, int numLevels); + private static native void setBottommostCompressionOptions( + final long handle, final long bottommostCompressionOptionsHandle); + private static native void setCompressionOptions(long handle, long compressionOptionsHandle); + private static native void useFixedLengthPrefixExtractor(long handle, int prefixLength); + private static native void useCappedPrefixExtractor(long handle, int prefixLength); + private static native void setNumLevels(long handle, int numLevels); private static native int numLevels(long handle); - private static native void setLevelZeroFileNumCompactionTrigger( - long handle, int numFiles); + private static native void setLevelZeroFileNumCompactionTrigger(long handle, int numFiles); private static native int levelZeroFileNumCompactionTrigger(long handle); - private static native void setLevelZeroSlowdownWritesTrigger( - long handle, int numFiles); + private static native void setLevelZeroSlowdownWritesTrigger(long handle, int numFiles); private static native int levelZeroSlowdownWritesTrigger(long handle); - private static native void setLevelZeroStopWritesTrigger( - long handle, int numFiles); + private static native void setLevelZeroStopWritesTrigger(long handle, int numFiles); private static native int levelZeroStopWritesTrigger(long handle); - private static native void setTargetFileSizeBase( - long handle, long targetFileSizeBase); + private static native void setTargetFileSizeBase(long handle, long targetFileSizeBase); private static native long targetFileSizeBase(long handle); - private static native void setTargetFileSizeMultiplier( - long handle, int multiplier); + private static native void setTargetFileSizeMultiplier(long handle, int multiplier); private static native int targetFileSizeMultiplier(long handle); - private static native void setMaxBytesForLevelBase( - long handle, long maxBytesForLevelBase); + private static native void setMaxBytesForLevelBase(long handle, long maxBytesForLevelBase); private static native long maxBytesForLevelBase(long handle); private static native void setLevelCompactionDynamicLevelBytes( long handle, boolean enableLevelCompactionDynamicLevelBytes); - private static native boolean levelCompactionDynamicLevelBytes( - long handle); + private static native boolean levelCompactionDynamicLevelBytes(long handle); private static native void setMaxBytesForLevelMultiplier(long handle, double multiplier); private static native double maxBytesForLevelMultiplier(long handle); private static native void setMaxCompactionBytes(long handle, long maxCompactionBytes); private static native long maxCompactionBytes(long handle); - private static native void setArenaBlockSize( - long handle, long arenaBlockSize) + private static native void setArenaBlockSize(long handle, long arenaBlockSize) throws IllegalArgumentException; private static native long arenaBlockSize(long handle); - private static native void setDisableAutoCompactions( - long handle, boolean disableAutoCompactions); + private static native void setDisableAutoCompactions(long handle, boolean disableAutoCompactions); private static native boolean disableAutoCompactions(long handle); private static native void setCompactionStyle(long handle, byte compactionStyle); private static native byte compactionStyle(long handle); - private static native void setMaxTableFilesSizeFIFO( - long handle, long max_table_files_size); + private static native void setMaxTableFilesSizeFIFO(long handle, long max_table_files_size); private static native long maxTableFilesSizeFIFO(long handle); private static native void setMaxSequentialSkipInIterations( long handle, long maxSequentialSkipInIterations); @@ -1439,11 +1421,9 @@ private static native void setCfPaths( private static native long cfPathsLen(final long handle); private static native void cfPaths( final long handle, final String[] paths, final long[] targetSizes); - private static native void setInplaceUpdateSupport( - long handle, boolean inplaceUpdateSupport); + private static native void setInplaceUpdateSupport(long handle, boolean inplaceUpdateSupport); private static native boolean inplaceUpdateSupport(long handle); - private static native void setInplaceUpdateNumLocks( - long handle, long inplaceUpdateNumLocks) + private static native void setInplaceUpdateNumLocks(long handle, long inplaceUpdateNumLocks) throws IllegalArgumentException; private static native long inplaceUpdateNumLocks(long handle); private static native void setMemtablePrefixBloomSizeRatio( @@ -1452,62 +1432,56 @@ private static native void setMemtablePrefixBloomSizeRatio( private static native void setExperimentalMempurgeThreshold( long handle, double experimentalMempurgeThreshold); private static native double experimentalMempurgeThreshold(long handle); - private static native void setMemtableWholeKeyFiltering(long handle, boolean memtableWholeKeyFiltering); + private static native void setMemtableWholeKeyFiltering( + long handle, boolean memtableWholeKeyFiltering); private static native boolean memtableWholeKeyFiltering(long handle); - private static native void setBloomLocality( - long handle, int bloomLocality); + private static native void setBloomLocality(long handle, int bloomLocality); private static native int bloomLocality(long handle); - private static native void setMaxSuccessiveMerges( - long handle, long maxSuccessiveMerges) + private static native void setMaxSuccessiveMerges(long handle, long maxSuccessiveMerges) throws IllegalArgumentException; private static native long maxSuccessiveMerges(long handle); - private static native void setOptimizeFiltersForHits(long handle, - boolean optimizeFiltersForHits); + private static native void setOptimizeFiltersForHits(long handle, boolean optimizeFiltersForHits); private static native boolean optimizeFiltersForHits(long handle); - private static native void setMemtableHugePageSize(long handle, - long memtableHugePageSize); + private static native void setMemtableHugePageSize(long handle, long memtableHugePageSize); private static native long memtableHugePageSize(long handle); - private static native void setSoftPendingCompactionBytesLimit(long handle, - long softPendingCompactionBytesLimit); + private static native void setSoftPendingCompactionBytesLimit( + long handle, long softPendingCompactionBytesLimit); private static native long softPendingCompactionBytesLimit(long handle); - private static native void setHardPendingCompactionBytesLimit(long handle, - long hardPendingCompactionBytesLimit); + private static native void setHardPendingCompactionBytesLimit( + long handle, long hardPendingCompactionBytesLimit); private static native long hardPendingCompactionBytesLimit(long handle); - private static native void setLevel0FileNumCompactionTrigger(long handle, - int level0FileNumCompactionTrigger); + private static native void setLevel0FileNumCompactionTrigger( + long handle, int level0FileNumCompactionTrigger); private static native int level0FileNumCompactionTrigger(long handle); - private static native void setLevel0SlowdownWritesTrigger(long handle, - int level0SlowdownWritesTrigger); + private static native void setLevel0SlowdownWritesTrigger( + long handle, int level0SlowdownWritesTrigger); private static native int level0SlowdownWritesTrigger(long handle); - private static native void setLevel0StopWritesTrigger(long handle, - int level0StopWritesTrigger); + private static native void setLevel0StopWritesTrigger(long handle, int level0StopWritesTrigger); private static native int level0StopWritesTrigger(long handle); - private static native void setMaxBytesForLevelMultiplierAdditional(long handle, - int[] maxBytesForLevelMultiplierAdditional); + private static native void setMaxBytesForLevelMultiplierAdditional( + long handle, int[] maxBytesForLevelMultiplierAdditional); private static native int[] maxBytesForLevelMultiplierAdditional(long handle); - private static native void setParanoidFileChecks(long handle, - boolean paranoidFileChecks); + private static native void setParanoidFileChecks(long handle, boolean paranoidFileChecks); private static native boolean paranoidFileChecks(long handle); - private static native void setMaxWriteBufferNumberToMaintain(final long handle, - final int maxWriteBufferNumberToMaintain); + private static native void setMaxWriteBufferNumberToMaintain( + final long handle, final int maxWriteBufferNumberToMaintain); private static native int maxWriteBufferNumberToMaintain(final long handle); - private static native void setCompactionPriority(final long handle, - final byte compactionPriority); + private static native void setCompactionPriority( + final long handle, final byte compactionPriority); private static native byte compactionPriority(final long handle); - private static native void setReportBgIoStats(final long handle, - final boolean reportBgIoStats); + private static native void setReportBgIoStats(final long handle, final boolean reportBgIoStats); private static native boolean reportBgIoStats(final long handle); private static native void setTtl(final long handle, final long ttl); private static native long ttl(final long handle); private static native void setPeriodicCompactionSeconds( final long handle, final long periodicCompactionSeconds); private static native long periodicCompactionSeconds(final long handle); - private static native void setCompactionOptionsUniversal(final long handle, - final long compactionOptionsUniversalHandle); - private static native void setCompactionOptionsFIFO(final long handle, - final long compactionOptionsFIFOHandle); - private static native void setForceConsistencyChecks(final long handle, - final boolean forceConsistencyChecks); + private static native void setCompactionOptionsUniversal( + final long handle, final long compactionOptionsUniversalHandle); + private static native void setCompactionOptionsFIFO( + final long handle, final long compactionOptionsFIFOHandle); + private static native void setForceConsistencyChecks( + final long handle, final boolean forceConsistencyChecks); private static native boolean forceConsistencyChecks(final long handle); private static native void setSstPartitionerFactory(long nativeHandle_, long newFactoryHandle); private static native void setCompactionThreadLimiter( @@ -1515,13 +1489,15 @@ private static native void setCompactionThreadLimiter( private static native void setMemtableMaxRangeDeletions(final long handle, final int count); private static native int memtableMaxRangeDeletions(final long handle); - private static native void setEnableBlobFiles(final long nativeHandle_, final boolean enableBlobFiles); + private static native void setEnableBlobFiles( + final long nativeHandle_, final boolean enableBlobFiles); private static native boolean enableBlobFiles(final long nativeHandle_); private static native void setMinBlobSize(final long nativeHandle_, final long minBlobSize); private static native long minBlobSize(final long nativeHandle_); private static native void setBlobFileSize(final long nativeHandle_, final long blobFileSize); private static native long blobFileSize(final long nativeHandle_); - private static native void setBlobCompressionType(final long nativeHandle_, final byte compressionType); + private static native void setBlobCompressionType( + final long nativeHandle_, final byte compressionType); private static native byte blobCompressionType(final long nativeHandle_); private static native void setEnableBlobGarbageCollection( final long nativeHandle_, final boolean enableBlobGarbageCollection); diff --git a/java/src/main/java/org/rocksdb/CompactRangeOptions.java b/java/src/main/java/org/rocksdb/CompactRangeOptions.java index 183673159c78..ba5fa6455d27 100644 --- a/java/src/main/java/org/rocksdb/CompactRangeOptions.java +++ b/java/src/main/java/org/rocksdb/CompactRangeOptions.java @@ -269,31 +269,27 @@ public boolean canceled() { } private static native long newCompactRangeOptions(); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); private static native boolean exclusiveManualCompaction(final long handle); - private static native void setExclusiveManualCompaction(final long handle, - final boolean exclusive_manual_compaction); + private static native void setExclusiveManualCompaction( + final long handle, final boolean exclusive_manual_compaction); private static native boolean changeLevel(final long handle); - private static native void setChangeLevel(final long handle, - final boolean changeLevel); + private static native void setChangeLevel(final long handle, final boolean changeLevel); private static native int targetLevel(final long handle); - private static native void setTargetLevel(final long handle, - final int targetLevel); + private static native void setTargetLevel(final long handle, final int targetLevel); private static native int targetPathId(final long handle); - private static native void setTargetPathId(final long handle, - final int targetPathId); + private static native void setTargetPathId(final long handle, final int targetPathId); private static native int bottommostLevelCompaction(final long handle); - private static native void setBottommostLevelCompaction(final long handle, - final int bottommostLevelCompaction); + private static native void setBottommostLevelCompaction( + final long handle, final int bottommostLevelCompaction); private static native boolean allowWriteStall(final long handle); - private static native void setAllowWriteStall(final long handle, - final boolean allowWriteStall); - private static native void setMaxSubcompactions(final long handle, - final int maxSubcompactions); + private static native void setAllowWriteStall(final long handle, final boolean allowWriteStall); + private static native void setMaxSubcompactions(final long handle, final int maxSubcompactions); private static native int maxSubcompactions(final long handle); private static native void setFullHistoryTSLow( diff --git a/java/src/main/java/org/rocksdb/CompactionJobInfo.java b/java/src/main/java/org/rocksdb/CompactionJobInfo.java index cd1636d4de53..29369f174a1a 100644 --- a/java/src/main/java/org/rocksdb/CompactionJobInfo.java +++ b/java/src/main/java/org/rocksdb/CompactionJobInfo.java @@ -143,7 +143,8 @@ public CompressionType compression() { private static native long newCompactionJobInfo(); - @Override protected void disposeInternal(final long handle) { + @Override + protected void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/CompactionJobStats.java b/java/src/main/java/org/rocksdb/CompactionJobStats.java index 7197f95b2d07..857de7b62430 100644 --- a/java/src/main/java/org/rocksdb/CompactionJobStats.java +++ b/java/src/main/java/org/rocksdb/CompactionJobStats.java @@ -263,12 +263,12 @@ public long numSingleDelMismatch() { } private static native long newCompactionJobStats(); - @Override protected void disposeInternal(final long handle) { + @Override + protected void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native void reset(final long handle); private static native void add(final long handle, final long compactionJobStatsHandle); diff --git a/java/src/main/java/org/rocksdb/CompactionOptions.java b/java/src/main/java/org/rocksdb/CompactionOptions.java index 868674fe1efa..08cbdf6378b3 100644 --- a/java/src/main/java/org/rocksdb/CompactionOptions.java +++ b/java/src/main/java/org/rocksdb/CompactionOptions.java @@ -107,7 +107,8 @@ public CompactionOptions setMaxSubcompactions(final int maxSubcompactions) { } private static native long newCompactionOptions(); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/CompactionOptionsFIFO.java b/java/src/main/java/org/rocksdb/CompactionOptionsFIFO.java index b23ecca2588b..24ebe0da2ff1 100644 --- a/java/src/main/java/org/rocksdb/CompactionOptionsFIFO.java +++ b/java/src/main/java/org/rocksdb/CompactionOptionsFIFO.java @@ -76,15 +76,14 @@ public boolean allowCompaction() { } private static native long newCompactionOptionsFIFO(); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native void setMaxTableFilesSize(final long handle, - final long maxTableFilesSize); + private static native void setMaxTableFilesSize(final long handle, final long maxTableFilesSize); private static native long maxTableFilesSize(final long handle); - private static native void setAllowCompaction(final long handle, - final boolean allowCompaction); + private static native void setAllowCompaction(final long handle, final boolean allowCompaction); private static native boolean allowCompaction(final long handle); } diff --git a/java/src/main/java/org/rocksdb/CompactionOptionsUniversal.java b/java/src/main/java/org/rocksdb/CompactionOptionsUniversal.java index 97ab021f8079..f18915b8f569 100644 --- a/java/src/main/java/org/rocksdb/CompactionOptionsUniversal.java +++ b/java/src/main/java/org/rocksdb/CompactionOptionsUniversal.java @@ -248,18 +248,17 @@ public boolean allowTrivialMove() { } private static native long newCompactionOptionsUniversal(); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); private static native void setSizeRatio(final long handle, final int sizeRatio); private static native int sizeRatio(final long handle); - private static native void setMinMergeWidth( - final long handle, final int minMergeWidth); + private static native void setMinMergeWidth(final long handle, final int minMergeWidth); private static native int minMergeWidth(final long handle); - private static native void setMaxMergeWidth( - final long handle, final int maxMergeWidth); + private static native void setMaxMergeWidth(final long handle, final int maxMergeWidth); private static native int maxMergeWidth(final long handle); private static native void setMaxSizeAmplificationPercent( final long handle, final int maxSizeAmplificationPercent); @@ -267,10 +266,8 @@ private static native void setMaxSizeAmplificationPercent( private static native void setCompressionSizePercent( final long handle, final int compressionSizePercent); private static native int compressionSizePercent(final long handle); - private static native void setStopStyle( - final long handle, final byte stopStyle); + private static native void setStopStyle(final long handle, final byte stopStyle); private static native byte stopStyle(final long handle); - private static native void setAllowTrivialMove( - final long handle, final boolean allowTrivialMove); + private static native void setAllowTrivialMove(final long handle, final boolean allowTrivialMove); private static native boolean allowTrivialMove(final long handle); } diff --git a/java/src/main/java/org/rocksdb/ComparatorOptions.java b/java/src/main/java/org/rocksdb/ComparatorOptions.java index 0441341766c6..da287b51816b 100644 --- a/java/src/main/java/org/rocksdb/ComparatorOptions.java +++ b/java/src/main/java/org/rocksdb/ComparatorOptions.java @@ -121,15 +121,15 @@ public ComparatorOptions setMaxReusedBufferSize(final int maxReusedBufferSize) { private static native long newComparatorOptions(); private static native byte reusedSynchronisationType(final long handle); - private static native void setReusedSynchronisationType(final long handle, - final byte reusedSynchronisationType); + private static native void setReusedSynchronisationType( + final long handle, final byte reusedSynchronisationType); private static native boolean useDirectBuffer(final long handle); - private static native void setUseDirectBuffer(final long handle, - final boolean useDirectBuffer); + private static native void setUseDirectBuffer(final long handle, final boolean useDirectBuffer); private static native int maxReusedBufferSize(final long handle); - private static native void setMaxReusedBufferSize(final long handle, - final int maxReuseBufferSize); - @Override protected final void disposeInternal(final long handle) { + private static native void setMaxReusedBufferSize( + final long handle, final int maxReuseBufferSize); + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/CompressionOptions.java b/java/src/main/java/org/rocksdb/CompressionOptions.java index 5ee9ca3904f3..e6316af451e6 100644 --- a/java/src/main/java/org/rocksdb/CompressionOptions.java +++ b/java/src/main/java/org/rocksdb/CompressionOptions.java @@ -132,7 +132,8 @@ public boolean enabled() { } private static native long newCompressionOptions(); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -145,8 +146,7 @@ public boolean enabled() { private static native int strategy(final long handle); private static native void setMaxDictBytes(final long handle, final int maxDictBytes); private static native int maxDictBytes(final long handle); - private static native void setZstdMaxTrainBytes(final long handle, - final int zstdMaxTrainBytes); + private static native void setZstdMaxTrainBytes(final long handle, final int zstdMaxTrainBytes); private static native int zstdMaxTrainBytes(final long handle); private static native void setEnabled(final long handle, final boolean enabled); private static native boolean enabled(final long handle); diff --git a/java/src/main/java/org/rocksdb/ConcurrentTaskLimiterImpl.java b/java/src/main/java/org/rocksdb/ConcurrentTaskLimiterImpl.java index 2e5943ddaecc..1c496ff2f5c8 100644 --- a/java/src/main/java/org/rocksdb/ConcurrentTaskLimiterImpl.java +++ b/java/src/main/java/org/rocksdb/ConcurrentTaskLimiterImpl.java @@ -44,7 +44,8 @@ private static native long newConcurrentTaskLimiterImpl0( private static native void resetMaxOutstandingTask(final long handle); private static native int outstandingTask(final long handle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/ConfigOptions.java b/java/src/main/java/org/rocksdb/ConfigOptions.java index f3b9eafffe54..9be836099f63 100644 --- a/java/src/main/java/org/rocksdb/ConfigOptions.java +++ b/java/src/main/java/org/rocksdb/ConfigOptions.java @@ -42,7 +42,8 @@ public ConfigOptions setSanityLevel(final SanityLevel level) { return this; } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } diff --git a/java/src/main/java/org/rocksdb/DBOptions.java b/java/src/main/java/org/rocksdb/DBOptions.java index 4e3fbabc6e5a..35dfdf28c06e 100644 --- a/java/src/main/java/org/rocksdb/DBOptions.java +++ b/java/src/main/java/org/rocksdb/DBOptions.java @@ -1256,7 +1256,8 @@ private DBOptions(final long nativeHandle) { private static native long newDBOptions(); private static native long copyDBOptions(final long handle); private static native long newDBOptionsFromOptions(final long optionsHandle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -1265,73 +1266,62 @@ private DBOptions(final long nativeHandle) { private static native void setIncreaseParallelism(long handle, int totalThreads); private static native void setCreateIfMissing(long handle, boolean flag); private static native boolean createIfMissing(long handle); - private static native void setCreateMissingColumnFamilies( - long handle, boolean flag); + private static native void setCreateMissingColumnFamilies(long handle, boolean flag); private static native boolean createMissingColumnFamilies(long handle); private static native void setEnv(long handle, long envHandle); private static native void setErrorIfExists(long handle, boolean errorIfExists); private static native boolean errorIfExists(long handle); - private static native void setParanoidChecks( - long handle, boolean paranoidChecks); + private static native void setParanoidChecks(long handle, boolean paranoidChecks); private static native boolean paranoidChecks(long handle); - private static native void setRateLimiter(long handle, - long rateLimiterHandle); - private static native void setSstFileManager(final long handle, - final long sstFileManagerHandle); - private static native void setLogger(long handle, - long loggerHandle); + private static native void setRateLimiter(long handle, long rateLimiterHandle); + private static native void setSstFileManager(final long handle, final long sstFileManagerHandle); + private static native void setLogger(long handle, long loggerHandle); private static native void setInfoLogLevel(long handle, byte logLevel); private static native byte infoLogLevel(long handle); private static native void setMaxOpenFiles(long handle, int maxOpenFiles); private static native int maxOpenFiles(long handle); - private static native void setMaxFileOpeningThreads(final long handle, - final int maxFileOpeningThreads); + private static native void setMaxFileOpeningThreads( + final long handle, final int maxFileOpeningThreads); private static native int maxFileOpeningThreads(final long handle); - private static native void setMaxTotalWalSize(long handle, - long maxTotalWalSize); + private static native void setMaxTotalWalSize(long handle, long maxTotalWalSize); private static native long maxTotalWalSize(long handle); private static native void setStatistics(final long handle, final long statisticsHandle); private static native long statistics(final long handle); private static native boolean useFsync(long handle); private static native void setUseFsync(long handle, boolean useFsync); - private static native void setDbPaths(final long handle, final String[] paths, - final long[] targetSizes); + private static native void setDbPaths( + final long handle, final String[] paths, final long[] targetSizes); private static native long dbPathsLen(final long handle); - private static native void dbPaths(final long handle, final String[] paths, - final long[] targetSizes); + private static native void dbPaths( + final long handle, final String[] paths, final long[] targetSizes); private static native void setDbLogDir(long handle, String dbLogDir); private static native String dbLogDir(long handle); private static native void setWalDir(long handle, String walDir); private static native String walDir(long handle); - private static native void setDeleteObsoleteFilesPeriodMicros( - long handle, long micros); + private static native void setDeleteObsoleteFilesPeriodMicros(long handle, long micros); private static native long deleteObsoleteFilesPeriodMicros(long handle); - private static native void setMaxBackgroundCompactions( - long handle, int maxBackgroundCompactions); + private static native void setMaxBackgroundCompactions(long handle, int maxBackgroundCompactions); private static native int maxBackgroundCompactions(long handle); private static native void setMaxSubcompactions(long handle, int maxSubcompactions); private static native int maxSubcompactions(long handle); - private static native void setMaxBackgroundFlushes( - long handle, int maxBackgroundFlushes); + private static native void setMaxBackgroundFlushes(long handle, int maxBackgroundFlushes); private static native int maxBackgroundFlushes(long handle); private static native void setMaxBackgroundJobs(long handle, int maxBackgroundJobs); private static native int maxBackgroundJobs(long handle); private static native void setMaxLogFileSize(long handle, long maxLogFileSize) throws IllegalArgumentException; private static native long maxLogFileSize(long handle); - private static native void setLogFileTimeToRoll( - long handle, long logFileTimeToRoll) throws IllegalArgumentException; + private static native void setLogFileTimeToRoll(long handle, long logFileTimeToRoll) + throws IllegalArgumentException; private static native long logFileTimeToRoll(long handle); private static native void setKeepLogFileNum(long handle, long keepLogFileNum) throws IllegalArgumentException; private static native long keepLogFileNum(long handle); private static native void setRecycleLogFileNum(long handle, long recycleLogFileNum); private static native long recycleLogFileNum(long handle); - private static native void setMaxManifestFileSize( - long handle, long maxManifestFileSize); + private static native void setMaxManifestFileSize(long handle, long maxManifestFileSize); private static native long maxManifestFileSize(long handle); - private static native void setTableCacheNumshardbits( - long handle, int tableCacheNumshardbits); + private static native void setTableCacheNumshardbits(long handle, int tableCacheNumshardbits); private static native int tableCacheNumshardbits(long handle); private static native void setWalTtlSeconds(long handle, long walTtlSeconds); private static native long walTtlSeconds(long handle); @@ -1340,134 +1330,111 @@ private static native void setTableCacheNumshardbits( private static native void setMaxWriteBatchGroupSizeBytes( final long handle, final long maxWriteBatchGroupSizeBytes); private static native long maxWriteBatchGroupSizeBytes(final long handle); - private static native void setManifestPreallocationSize( - long handle, long size) throws IllegalArgumentException; + private static native void setManifestPreallocationSize(long handle, long size) + throws IllegalArgumentException; private static native long manifestPreallocationSize(long handle); private static native void setUseDirectReads(long handle, boolean useDirectReads); private static native boolean useDirectReads(long handle); private static native void setUseDirectIoForFlushAndCompaction( long handle, boolean useDirectIoForFlushAndCompaction); private static native boolean useDirectIoForFlushAndCompaction(long handle); - private static native void setAllowFAllocate(final long handle, - final boolean allowFAllocate); + private static native void setAllowFAllocate(final long handle, final boolean allowFAllocate); private static native boolean allowFAllocate(final long handle); - private static native void setAllowMmapReads( - long handle, boolean allowMmapReads); + private static native void setAllowMmapReads(long handle, boolean allowMmapReads); private static native boolean allowMmapReads(long handle); - private static native void setAllowMmapWrites( - long handle, boolean allowMmapWrites); + private static native void setAllowMmapWrites(long handle, boolean allowMmapWrites); private static native boolean allowMmapWrites(long handle); - private static native void setIsFdCloseOnExec( - long handle, boolean isFdCloseOnExec); + private static native void setIsFdCloseOnExec(long handle, boolean isFdCloseOnExec); private static native boolean isFdCloseOnExec(long handle); - private static native void setStatsDumpPeriodSec( - long handle, int statsDumpPeriodSec); + private static native void setStatsDumpPeriodSec(long handle, int statsDumpPeriodSec); private static native int statsDumpPeriodSec(long handle); private static native void setStatsPersistPeriodSec( final long handle, final int statsPersistPeriodSec); - private static native int statsPersistPeriodSec( - final long handle); + private static native int statsPersistPeriodSec(final long handle); private static native void setStatsHistoryBufferSize( final long handle, final long statsHistoryBufferSize); - private static native long statsHistoryBufferSize( - final long handle); - private static native void setAdviseRandomOnOpen( - long handle, boolean adviseRandomOnOpen); + private static native long statsHistoryBufferSize(final long handle); + private static native void setAdviseRandomOnOpen(long handle, boolean adviseRandomOnOpen); private static native boolean adviseRandomOnOpen(long handle); - private static native void setDbWriteBufferSize(final long handle, - final long dbWriteBufferSize); - private static native void setWriteBufferManager(final long dbOptionsHandle, - final long writeBufferManagerHandle); + private static native void setDbWriteBufferSize(final long handle, final long dbWriteBufferSize); + private static native void setWriteBufferManager( + final long dbOptionsHandle, final long writeBufferManagerHandle); private static native long dbWriteBufferSize(final long handle); - private static native void setAccessHintOnCompactionStart(final long handle, - final byte accessHintOnCompactionStart); + private static native void setAccessHintOnCompactionStart( + final long handle, final byte accessHintOnCompactionStart); private static native byte accessHintOnCompactionStart(final long handle); - private static native void setCompactionReadaheadSize(final long handle, - final long compactionReadaheadSize); + private static native void setCompactionReadaheadSize( + final long handle, final long compactionReadaheadSize); private static native long compactionReadaheadSize(final long handle); - private static native void setRandomAccessMaxBufferSize(final long handle, - final long randomAccessMaxBufferSize); + private static native void setRandomAccessMaxBufferSize( + final long handle, final long randomAccessMaxBufferSize); private static native long randomAccessMaxBufferSize(final long handle); - private static native void setWritableFileMaxBufferSize(final long handle, - final long writableFileMaxBufferSize); + private static native void setWritableFileMaxBufferSize( + final long handle, final long writableFileMaxBufferSize); private static native long writableFileMaxBufferSize(final long handle); - private static native void setUseAdaptiveMutex( - long handle, boolean useAdaptiveMutex); + private static native void setUseAdaptiveMutex(long handle, boolean useAdaptiveMutex); private static native boolean useAdaptiveMutex(long handle); - private static native void setBytesPerSync( - long handle, long bytesPerSync); + private static native void setBytesPerSync(long handle, long bytesPerSync); private static native long bytesPerSync(long handle); private static native void setWalBytesPerSync(long handle, long walBytesPerSync); private static native long walBytesPerSync(long handle); private static native void setStrictBytesPerSync( final long handle, final boolean strictBytesPerSync); - private static native boolean strictBytesPerSync( - final long handle); + private static native boolean strictBytesPerSync(final long handle); private static native void setEventListeners( final long handle, final long[] eventListenerHandles); private static native AbstractEventListener[] eventListeners(final long handle); - private static native void setEnableThreadTracking(long handle, - boolean enableThreadTracking); + private static native void setEnableThreadTracking(long handle, boolean enableThreadTracking); private static native boolean enableThreadTracking(long handle); private static native void setDelayedWriteRate(long handle, long delayedWriteRate); private static native long delayedWriteRate(long handle); - private static native void setEnablePipelinedWrite(final long handle, - final boolean enablePipelinedWrite); + private static native void setEnablePipelinedWrite( + final long handle, final boolean enablePipelinedWrite); private static native boolean enablePipelinedWrite(final long handle); - private static native void setUnorderedWrite(final long handle, - final boolean unorderedWrite); + private static native void setUnorderedWrite(final long handle, final boolean unorderedWrite); private static native boolean unorderedWrite(final long handle); - private static native void setAllowConcurrentMemtableWrite(long handle, - boolean allowConcurrentMemtableWrite); + private static native void setAllowConcurrentMemtableWrite( + long handle, boolean allowConcurrentMemtableWrite); private static native boolean allowConcurrentMemtableWrite(long handle); - private static native void setEnableWriteThreadAdaptiveYield(long handle, - boolean enableWriteThreadAdaptiveYield); + private static native void setEnableWriteThreadAdaptiveYield( + long handle, boolean enableWriteThreadAdaptiveYield); private static native boolean enableWriteThreadAdaptiveYield(long handle); - private static native void setWriteThreadMaxYieldUsec(long handle, - long writeThreadMaxYieldUsec); + private static native void setWriteThreadMaxYieldUsec(long handle, long writeThreadMaxYieldUsec); private static native long writeThreadMaxYieldUsec(long handle); - private static native void setWriteThreadSlowYieldUsec(long handle, - long writeThreadSlowYieldUsec); + private static native void setWriteThreadSlowYieldUsec( + long handle, long writeThreadSlowYieldUsec); private static native long writeThreadSlowYieldUsec(long handle); - private static native void setSkipStatsUpdateOnDbOpen(final long handle, - final boolean skipStatsUpdateOnDbOpen); + private static native void setSkipStatsUpdateOnDbOpen( + final long handle, final boolean skipStatsUpdateOnDbOpen); private static native boolean skipStatsUpdateOnDbOpen(final long handle); private static native void setSkipCheckingSstFileSizesOnDbOpen( final long handle, final boolean skipChecking); private static native boolean skipCheckingSstFileSizesOnDbOpen(final long handle); - private static native void setWalRecoveryMode(final long handle, - final byte walRecoveryMode); + private static native void setWalRecoveryMode(final long handle, final byte walRecoveryMode); private static native byte walRecoveryMode(final long handle); - private static native void setAllow2pc(final long handle, - final boolean allow2pc); + private static native void setAllow2pc(final long handle, final boolean allow2pc); private static native boolean allow2pc(final long handle); - private static native void setRowCache(final long handle, - final long rowCacheHandle); - private static native void setWalFilter(final long handle, - final long walFilterHandle); - private static native void setFailIfOptionsFileError(final long handle, - final boolean failIfOptionsFileError); + private static native void setRowCache(final long handle, final long rowCacheHandle); + private static native void setWalFilter(final long handle, final long walFilterHandle); + private static native void setFailIfOptionsFileError( + final long handle, final boolean failIfOptionsFileError); private static native boolean failIfOptionsFileError(final long handle); - private static native void setDumpMallocStats(final long handle, - final boolean dumpMallocStats); + private static native void setDumpMallocStats(final long handle, final boolean dumpMallocStats); private static native boolean dumpMallocStats(final long handle); - private static native void setAvoidFlushDuringRecovery(final long handle, - final boolean avoidFlushDuringRecovery); + private static native void setAvoidFlushDuringRecovery( + final long handle, final boolean avoidFlushDuringRecovery); private static native boolean avoidFlushDuringRecovery(final long handle); - private static native void setAvoidFlushDuringShutdown(final long handle, - final boolean avoidFlushDuringShutdown); + private static native void setAvoidFlushDuringShutdown( + final long handle, final boolean avoidFlushDuringShutdown); private static native boolean avoidFlushDuringShutdown(final long handle); - private static native void setAllowIngestBehind(final long handle, - final boolean allowIngestBehind); + private static native void setAllowIngestBehind( + final long handle, final boolean allowIngestBehind); private static native boolean allowIngestBehind(final long handle); - private static native void setTwoWriteQueues(final long handle, - final boolean twoWriteQueues); + private static native void setTwoWriteQueues(final long handle, final boolean twoWriteQueues); private static native boolean twoWriteQueues(final long handle); - private static native void setManualWalFlush(final long handle, - final boolean manualWalFlush); + private static native void setManualWalFlush(final long handle, final boolean manualWalFlush); private static native boolean manualWalFlush(final long handle); - private static native void setAtomicFlush(final long handle, - final boolean atomicFlush); + private static native void setAtomicFlush(final long handle, final boolean atomicFlush); private static native boolean atomicFlush(final long handle); private static native void setAvoidUnnecessaryBlockingIO( final long handle, final boolean avoidBlockingIO); diff --git a/java/src/main/java/org/rocksdb/DirectSlice.java b/java/src/main/java/org/rocksdb/DirectSlice.java index 0b019cbded72..88ec29e3bd65 100644 --- a/java/src/main/java/org/rocksdb/DirectSlice.java +++ b/java/src/main/java/org/rocksdb/DirectSlice.java @@ -126,11 +126,9 @@ protected void disposeInternal() { private static native long createNewDirectSlice0(final ByteBuffer data, final int length); private static native long createNewDirectSlice1(final ByteBuffer data); @Override protected final native ByteBuffer data0(long handle); - private static native byte get0(long handle, int offset); - private static native void clear0(long handle, boolean internalBuffer, - long internalBufferOffset); - private static native void removePrefix0(long handle, int length); - private static native void setLength0(long handle, int length); - private static native void disposeInternalBuf(final long handle, - long internalBufferOffset); + private static native byte get0(long handle, int offset); + private static native void clear0(long handle, boolean internalBuffer, long internalBufferOffset); + private static native void removePrefix0(long handle, int length); + private static native void setLength0(long handle, int length); + private static native void disposeInternalBuf(final long handle, long internalBufferOffset); } diff --git a/java/src/main/java/org/rocksdb/Env.java b/java/src/main/java/org/rocksdb/Env.java index ded9e7341465..5ec1b7768a8b 100644 --- a/java/src/main/java/org/rocksdb/Env.java +++ b/java/src/main/java/org/rocksdb/Env.java @@ -152,16 +152,11 @@ public List getThreadList() throws RocksDBException { private static native long getDefaultEnvInternal(); private static native void setBackgroundThreads( final long handle, final int number, final byte priority); - private static native int getBackgroundThreads(final long handle, - final byte priority); - private static native int getThreadPoolQueueLen(final long handle, - final byte priority); - private static native void incBackgroundThreadsIfNeeded(final long handle, - final int number, final byte priority); - private static native void lowerThreadPoolIOPriority(final long handle, - final byte priority); - private static native void lowerThreadPoolCPUPriority(final long handle, - final byte priority); - private static native ThreadStatus[] getThreadList(final long handle) - throws RocksDBException; + private static native int getBackgroundThreads(final long handle, final byte priority); + private static native int getThreadPoolQueueLen(final long handle, final byte priority); + private static native void incBackgroundThreadsIfNeeded( + final long handle, final int number, final byte priority); + private static native void lowerThreadPoolIOPriority(final long handle, final byte priority); + private static native void lowerThreadPoolCPUPriority(final long handle, final byte priority); + private static native ThreadStatus[] getThreadList(final long handle) throws RocksDBException; } diff --git a/java/src/main/java/org/rocksdb/EnvOptions.java b/java/src/main/java/org/rocksdb/EnvOptions.java index 305f11a9a5be..c97641de295c 100644 --- a/java/src/main/java/org/rocksdb/EnvOptions.java +++ b/java/src/main/java/org/rocksdb/EnvOptions.java @@ -325,31 +325,25 @@ public RateLimiter rateLimiter() { private static native long newEnvOptions(); private static native long newEnvOptions(final long dboptions_handle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native void setUseMmapReads(final long handle, - final boolean useMmapReads); + private static native void setUseMmapReads(final long handle, final boolean useMmapReads); private static native boolean useMmapReads(final long handle); - private static native void setUseMmapWrites(final long handle, - final boolean useMmapWrites); + private static native void setUseMmapWrites(final long handle, final boolean useMmapWrites); private static native boolean useMmapWrites(final long handle); - private static native void setUseDirectReads(final long handle, - final boolean useDirectReads); + private static native void setUseDirectReads(final long handle, final boolean useDirectReads); private static native boolean useDirectReads(final long handle); - private static native void setUseDirectWrites(final long handle, - final boolean useDirectWrites); + private static native void setUseDirectWrites(final long handle, final boolean useDirectWrites); private static native boolean useDirectWrites(final long handle); - private static native void setAllowFallocate(final long handle, - final boolean allowFallocate); + private static native void setAllowFallocate(final long handle, final boolean allowFallocate); private static native boolean allowFallocate(final long handle); - private static native void setSetFdCloexec(final long handle, - final boolean setFdCloexec); + private static native void setSetFdCloexec(final long handle, final boolean setFdCloexec); private static native boolean setFdCloexec(final long handle); - private static native void setBytesPerSync(final long handle, - final long bytesPerSync); + private static native void setBytesPerSync(final long handle, final long bytesPerSync); private static native long bytesPerSync(final long handle); private static native void setFallocateWithKeepSize( final long handle, final boolean fallocateWithKeepSize); @@ -363,7 +357,6 @@ private static native void setRandomAccessMaxBufferSize( private static native void setWritableFileMaxBufferSize( final long handle, final long writableFileMaxBufferSize); private static native long writableFileMaxBufferSize(final long handle); - private static native void setRateLimiter(final long handle, - final long rateLimiterHandle); + private static native void setRateLimiter(final long handle, final long rateLimiterHandle); private RateLimiter rateLimiter; } diff --git a/java/src/main/java/org/rocksdb/FlushOptions.java b/java/src/main/java/org/rocksdb/FlushOptions.java index 5518ae61a2a5..d85b0e75e80e 100644 --- a/java/src/main/java/org/rocksdb/FlushOptions.java +++ b/java/src/main/java/org/rocksdb/FlushOptions.java @@ -79,16 +79,15 @@ public boolean allowWriteStall() { } private static native long newFlushOptions(); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native void setWaitForFlush(final long handle, - final boolean wait); + private static native void setWaitForFlush(final long handle, final boolean wait); private static native boolean waitForFlush(final long handle); - private static native void setAllowWriteStall(final long handle, - final boolean allowWriteStall); + private static native void setAllowWriteStall(final long handle, final boolean allowWriteStall); private static native boolean allowWriteStall(final long handle); } diff --git a/java/src/main/java/org/rocksdb/HashLinkedListMemTableConfig.java b/java/src/main/java/org/rocksdb/HashLinkedListMemTableConfig.java index 754db2cf4901..c4c40801ab46 100644 --- a/java/src/main/java/org/rocksdb/HashLinkedListMemTableConfig.java +++ b/java/src/main/java/org/rocksdb/HashLinkedListMemTableConfig.java @@ -161,9 +161,8 @@ public int thresholdUseSkiplist() { thresholdUseSkiplist_); } - private static native long newMemTableFactoryHandle(long bucketCount, - long hugePageTlbSize, int bucketEntriesLoggingThreshold, - boolean ifLogBucketDistWhenFlush, int thresholdUseSkiplist) + private static native long newMemTableFactoryHandle(long bucketCount, long hugePageTlbSize, + int bucketEntriesLoggingThreshold, boolean ifLogBucketDistWhenFlush, int thresholdUseSkiplist) throws IllegalArgumentException; private long bucketCount_; diff --git a/java/src/main/java/org/rocksdb/HashSkipListMemTableConfig.java b/java/src/main/java/org/rocksdb/HashSkipListMemTableConfig.java index 4a68774d8738..372f257887e3 100644 --- a/java/src/main/java/org/rocksdb/HashSkipListMemTableConfig.java +++ b/java/src/main/java/org/rocksdb/HashSkipListMemTableConfig.java @@ -97,8 +97,7 @@ public int branchingFactor() { } private static native long newMemTableFactoryHandle( - long bucketCount, int height, int branchingFactor) - throws IllegalArgumentException; + long bucketCount, int height, int branchingFactor) throws IllegalArgumentException; private long bucketCount_; private int branchingFactor_; diff --git a/java/src/main/java/org/rocksdb/IngestExternalFileOptions.java b/java/src/main/java/org/rocksdb/IngestExternalFileOptions.java index c1c82151b16e..aed28131a17e 100644 --- a/java/src/main/java/org/rocksdb/IngestExternalFileOptions.java +++ b/java/src/main/java/org/rocksdb/IngestExternalFileOptions.java @@ -205,7 +205,8 @@ public IngestExternalFileOptions setWriteGlobalSeqno( private static native long newIngestExternalFileOptions(final boolean moveFiles, final boolean snapshotConsistency, final boolean allowGlobalSeqNo, final boolean allowBlockingFlush); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } @@ -214,18 +215,15 @@ private static native long newIngestExternalFileOptions(final boolean moveFiles, private static native boolean moveFiles(final long handle); private static native void setMoveFiles(final long handle, final boolean move_files); private static native boolean snapshotConsistency(final long handle); - private static native void setSnapshotConsistency(final long handle, - final boolean snapshotConsistency); + private static native void setSnapshotConsistency( + final long handle, final boolean snapshotConsistency); private static native boolean allowGlobalSeqNo(final long handle); - private static native void setAllowGlobalSeqNo(final long handle, - final boolean allowGloablSeqNo); + private static native void setAllowGlobalSeqNo(final long handle, final boolean allowGloablSeqNo); private static native boolean allowBlockingFlush(final long handle); - private static native void setAllowBlockingFlush(final long handle, - final boolean allowBlockingFlush); + private static native void setAllowBlockingFlush( + final long handle, final boolean allowBlockingFlush); private static native boolean ingestBehind(final long handle); - private static native void setIngestBehind(final long handle, - final boolean ingestBehind); + private static native void setIngestBehind(final long handle, final boolean ingestBehind); private static native boolean writeGlobalSeqno(final long handle); - private static native void setWriteGlobalSeqno(final long handle, - final boolean writeGlobalSeqNo); + private static native void setWriteGlobalSeqno(final long handle, final boolean writeGlobalSeqNo); } diff --git a/java/src/main/java/org/rocksdb/LRUCache.java b/java/src/main/java/org/rocksdb/LRUCache.java index 69fbda8d34ff..342b8201fcb1 100644 --- a/java/src/main/java/org/rocksdb/LRUCache.java +++ b/java/src/main/java/org/rocksdb/LRUCache.java @@ -102,7 +102,8 @@ public LRUCache(final long capacity, final int numShardBits, final boolean stric private static native long newLRUCache(final long capacity, final int numShardBits, final boolean strictCapacityLimit, final double highPriPoolRatio, final double lowPriPoolRatio); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/OptimisticTransactionDB.java b/java/src/main/java/org/rocksdb/OptimisticTransactionDB.java index 5f716f345bc7..41a5e2648f41 100644 --- a/java/src/main/java/org/rocksdb/OptimisticTransactionDB.java +++ b/java/src/main/java/org/rocksdb/OptimisticTransactionDB.java @@ -202,7 +202,8 @@ public RocksDB getBaseDB() { return db; } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -212,16 +213,13 @@ protected static native long open(final long optionsHandle, protected static native long[] open(final long handle, final String path, final byte[][] columnFamilyNames, final long[] columnFamilyOptions); private static native void closeDatabase(final long handle) throws RocksDBException; - private static native long beginTransaction(final long handle, - final long writeOptionsHandle); - private static native long beginTransaction(final long handle, - final long writeOptionsHandle, + private static native long beginTransaction(final long handle, final long writeOptionsHandle); + private static native long beginTransaction(final long handle, final long writeOptionsHandle, final long optimisticTransactionOptionsHandle); + private static native long beginTransaction_withOld( + final long handle, final long writeOptionsHandle, final long oldTransactionHandle); private static native long beginTransaction_withOld(final long handle, - final long writeOptionsHandle, final long oldTransactionHandle); - private static native long beginTransaction_withOld(final long handle, - final long writeOptionsHandle, - final long optimisticTransactionOptionsHandle, + final long writeOptionsHandle, final long optimisticTransactionOptionsHandle, final long oldTransactionHandle); private static native long getBaseDB(final long handle); } diff --git a/java/src/main/java/org/rocksdb/OptimisticTransactionOptions.java b/java/src/main/java/org/rocksdb/OptimisticTransactionOptions.java index 62d5e9036051..f4111c7b1875 100644 --- a/java/src/main/java/org/rocksdb/OptimisticTransactionOptions.java +++ b/java/src/main/java/org/rocksdb/OptimisticTransactionOptions.java @@ -45,11 +45,10 @@ public OptimisticTransactionOptions setComparator( private static native long newOptimisticTransactionOptions(); private static native boolean isSetSnapshot(final long handle); - private static native void setSetSnapshot(final long handle, - final boolean setSnapshot); - private static native void setComparator(final long handle, - final long comparatorHandle); - @Override protected final void disposeInternal(final long handle) { + private static native void setSetSnapshot(final long handle, final boolean setSnapshot); + private static native void setComparator(final long handle, final long comparatorHandle); + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/Options.java b/java/src/main/java/org/rocksdb/Options.java index 71822f1d546a..9a5acc68d132 100644 --- a/java/src/main/java/org/rocksdb/Options.java +++ b/java/src/main/java/org/rocksdb/Options.java @@ -2132,394 +2132,332 @@ public PrepopulateBlobCache prepopulateBlobCache() { private static native long newOptions(); private static native long newOptions(long dbOptHandle, long cfOptHandle); private static native long copyOptions(long handle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native void setEnv(long optHandle, long envHandle); - private static native void prepareForBulkLoad(long handle); + private static native void setEnv(long optHandle, long envHandle); + private static native void prepareForBulkLoad(long handle); // DB native handles - private static native void setIncreaseParallelism(long handle, int totalThreads); - private static native void setCreateIfMissing(long handle, boolean flag); - private static native boolean createIfMissing(long handle); - private static native void setCreateMissingColumnFamilies( - long handle, boolean flag); - private static native boolean createMissingColumnFamilies(long handle); - private static native void setErrorIfExists(long handle, boolean errorIfExists); - private static native boolean errorIfExists(long handle); - private static native void setParanoidChecks( - long handle, boolean paranoidChecks); - private static native boolean paranoidChecks(long handle); - private static native void setRateLimiter(long handle, - long rateLimiterHandle); - private static native void setSstFileManager(final long handle, - final long sstFileManagerHandle); - private static native void setLogger(long handle, - long loggerHandle); - private static native void setInfoLogLevel(long handle, byte logLevel); - private static native byte infoLogLevel(long handle); - private static native void setMaxOpenFiles(long handle, int maxOpenFiles); - private static native int maxOpenFiles(long handle); - private static native void setMaxTotalWalSize(long handle, - long maxTotalWalSize); - private static native void setMaxFileOpeningThreads(final long handle, - final int maxFileOpeningThreads); - private static native int maxFileOpeningThreads(final long handle); - private static native long maxTotalWalSize(long handle); - private static native void setStatistics(final long handle, final long statisticsHandle); - private static native long statistics(final long handle); - private static native boolean useFsync(long handle); - private static native void setUseFsync(long handle, boolean useFsync); - private static native void setDbPaths(final long handle, final String[] paths, - final long[] targetSizes); - private static native long dbPathsLen(final long handle); - private static native void dbPaths(final long handle, final String[] paths, - final long[] targetSizes); - private static native void setDbLogDir(long handle, String dbLogDir); - private static native String dbLogDir(long handle); - private static native void setWalDir(long handle, String walDir); - private static native String walDir(long handle); - private static native void setDeleteObsoleteFilesPeriodMicros( - long handle, long micros); - private static native long deleteObsoleteFilesPeriodMicros(long handle); - private static native void setMaxBackgroundCompactions( - long handle, int maxBackgroundCompactions); - private static native int maxBackgroundCompactions(long handle); - private static native void setMaxSubcompactions(long handle, int maxSubcompactions); - private static native int maxSubcompactions(long handle); - private static native void setMaxBackgroundFlushes( - long handle, int maxBackgroundFlushes); - private static native int maxBackgroundFlushes(long handle); - private static native void setMaxBackgroundJobs(long handle, int maxMaxBackgroundJobs); - private static native int maxBackgroundJobs(long handle); - private static native void setMaxLogFileSize(long handle, long maxLogFileSize) + private static native void setIncreaseParallelism(long handle, int totalThreads); + private static native void setCreateIfMissing(long handle, boolean flag); + private static native boolean createIfMissing(long handle); + private static native void setCreateMissingColumnFamilies(long handle, boolean flag); + private static native boolean createMissingColumnFamilies(long handle); + private static native void setErrorIfExists(long handle, boolean errorIfExists); + private static native boolean errorIfExists(long handle); + private static native void setParanoidChecks(long handle, boolean paranoidChecks); + private static native boolean paranoidChecks(long handle); + private static native void setRateLimiter(long handle, long rateLimiterHandle); + private static native void setSstFileManager(final long handle, final long sstFileManagerHandle); + private static native void setLogger(long handle, long loggerHandle); + private static native void setInfoLogLevel(long handle, byte logLevel); + private static native byte infoLogLevel(long handle); + private static native void setMaxOpenFiles(long handle, int maxOpenFiles); + private static native int maxOpenFiles(long handle); + private static native void setMaxTotalWalSize(long handle, long maxTotalWalSize); + private static native void setMaxFileOpeningThreads( + final long handle, final int maxFileOpeningThreads); + private static native int maxFileOpeningThreads(final long handle); + private static native long maxTotalWalSize(long handle); + private static native void setStatistics(final long handle, final long statisticsHandle); + private static native long statistics(final long handle); + private static native boolean useFsync(long handle); + private static native void setUseFsync(long handle, boolean useFsync); + private static native void setDbPaths( + final long handle, final String[] paths, final long[] targetSizes); + private static native long dbPathsLen(final long handle); + private static native void dbPaths( + final long handle, final String[] paths, final long[] targetSizes); + private static native void setDbLogDir(long handle, String dbLogDir); + private static native String dbLogDir(long handle); + private static native void setWalDir(long handle, String walDir); + private static native String walDir(long handle); + private static native void setDeleteObsoleteFilesPeriodMicros(long handle, long micros); + private static native long deleteObsoleteFilesPeriodMicros(long handle); + private static native void setMaxBackgroundCompactions(long handle, int maxBackgroundCompactions); + private static native int maxBackgroundCompactions(long handle); + private static native void setMaxSubcompactions(long handle, int maxSubcompactions); + private static native int maxSubcompactions(long handle); + private static native void setMaxBackgroundFlushes(long handle, int maxBackgroundFlushes); + private static native int maxBackgroundFlushes(long handle); + private static native void setMaxBackgroundJobs(long handle, int maxMaxBackgroundJobs); + private static native int maxBackgroundJobs(long handle); + private static native void setMaxLogFileSize(long handle, long maxLogFileSize) + throws IllegalArgumentException; + private static native long maxLogFileSize(long handle); + private static native void setLogFileTimeToRoll(long handle, long logFileTimeToRoll) throws IllegalArgumentException; - private static native long maxLogFileSize(long handle); - private static native void setLogFileTimeToRoll( - long handle, long logFileTimeToRoll) throws IllegalArgumentException; - private static native long logFileTimeToRoll(long handle); - private static native void setKeepLogFileNum(long handle, long keepLogFileNum) + private static native long logFileTimeToRoll(long handle); + private static native void setKeepLogFileNum(long handle, long keepLogFileNum) throws IllegalArgumentException; - private static native long keepLogFileNum(long handle); - private static native void setRecycleLogFileNum(long handle, long recycleLogFileNum); - private static native long recycleLogFileNum(long handle); - private static native void setMaxManifestFileSize( - long handle, long maxManifestFileSize); - private static native long maxManifestFileSize(long handle); - private static native void setMaxTableFilesSizeFIFO( - long handle, long maxTableFilesSize); - private static native long maxTableFilesSizeFIFO(long handle); - private static native void setTableCacheNumshardbits( - long handle, int tableCacheNumshardbits); - private static native int tableCacheNumshardbits(long handle); - private static native void setWalTtlSeconds(long handle, long walTtlSeconds); - private static native long walTtlSeconds(long handle); - private static native void setWalSizeLimitMB(long handle, long sizeLimitMB); - private static native long walSizeLimitMB(long handle); + private static native long keepLogFileNum(long handle); + private static native void setRecycleLogFileNum(long handle, long recycleLogFileNum); + private static native long recycleLogFileNum(long handle); + private static native void setMaxManifestFileSize(long handle, long maxManifestFileSize); + private static native long maxManifestFileSize(long handle); + private static native void setMaxTableFilesSizeFIFO(long handle, long maxTableFilesSize); + private static native long maxTableFilesSizeFIFO(long handle); + private static native void setTableCacheNumshardbits(long handle, int tableCacheNumshardbits); + private static native int tableCacheNumshardbits(long handle); + private static native void setWalTtlSeconds(long handle, long walTtlSeconds); + private static native long walTtlSeconds(long handle); + private static native void setWalSizeLimitMB(long handle, long sizeLimitMB); + private static native long walSizeLimitMB(long handle); private static native void setMaxWriteBatchGroupSizeBytes( final long handle, final long maxWriteBatchGroupSizeBytes); private static native long maxWriteBatchGroupSizeBytes(final long handle); - private static native void setManifestPreallocationSize( - long handle, long size) throws IllegalArgumentException; - private static native long manifestPreallocationSize(long handle); - private static native void setUseDirectReads(long handle, boolean useDirectReads); - private static native boolean useDirectReads(long handle); - private static native void setUseDirectIoForFlushAndCompaction( + private static native void setManifestPreallocationSize(long handle, long size) + throws IllegalArgumentException; + private static native long manifestPreallocationSize(long handle); + private static native void setUseDirectReads(long handle, boolean useDirectReads); + private static native boolean useDirectReads(long handle); + private static native void setUseDirectIoForFlushAndCompaction( long handle, boolean useDirectIoForFlushAndCompaction); - private static native boolean useDirectIoForFlushAndCompaction(long handle); - private static native void setAllowFAllocate(final long handle, - final boolean allowFAllocate); - private static native boolean allowFAllocate(final long handle); - private static native void setAllowMmapReads( - long handle, boolean allowMmapReads); - private static native boolean allowMmapReads(long handle); - private static native void setAllowMmapWrites( - long handle, boolean allowMmapWrites); - private static native boolean allowMmapWrites(long handle); - private static native void setIsFdCloseOnExec( - long handle, boolean isFdCloseOnExec); - private static native boolean isFdCloseOnExec(long handle); - private static native void setStatsDumpPeriodSec( - long handle, int statsDumpPeriodSec); - private static native int statsDumpPeriodSec(long handle); - private static native void setStatsPersistPeriodSec( + private static native boolean useDirectIoForFlushAndCompaction(long handle); + private static native void setAllowFAllocate(final long handle, final boolean allowFAllocate); + private static native boolean allowFAllocate(final long handle); + private static native void setAllowMmapReads(long handle, boolean allowMmapReads); + private static native boolean allowMmapReads(long handle); + private static native void setAllowMmapWrites(long handle, boolean allowMmapWrites); + private static native boolean allowMmapWrites(long handle); + private static native void setIsFdCloseOnExec(long handle, boolean isFdCloseOnExec); + private static native boolean isFdCloseOnExec(long handle); + private static native void setStatsDumpPeriodSec(long handle, int statsDumpPeriodSec); + private static native int statsDumpPeriodSec(long handle); + private static native void setStatsPersistPeriodSec( final long handle, final int statsPersistPeriodSec); - private static native int statsPersistPeriodSec( - final long handle); - private static native void setStatsHistoryBufferSize( + private static native int statsPersistPeriodSec(final long handle); + private static native void setStatsHistoryBufferSize( final long handle, final long statsHistoryBufferSize); - private static native long statsHistoryBufferSize( - final long handle); - private static native void setAdviseRandomOnOpen( - long handle, boolean adviseRandomOnOpen); - private static native boolean adviseRandomOnOpen(long handle); - private static native void setDbWriteBufferSize(final long handle, - final long dbWriteBufferSize); - private static native void setWriteBufferManager(final long handle, - final long writeBufferManagerHandle); - private static native long dbWriteBufferSize(final long handle); - private static native void setAccessHintOnCompactionStart(final long handle, - final byte accessHintOnCompactionStart); - private static native byte accessHintOnCompactionStart(final long handle); - private static native void setCompactionReadaheadSize(final long handle, - final long compactionReadaheadSize); - private static native long compactionReadaheadSize(final long handle); - private static native void setRandomAccessMaxBufferSize(final long handle, - final long randomAccessMaxBufferSize); - private static native long randomAccessMaxBufferSize(final long handle); - private static native void setWritableFileMaxBufferSize(final long handle, - final long writableFileMaxBufferSize); - private static native long writableFileMaxBufferSize(final long handle); - private static native void setUseAdaptiveMutex( - long handle, boolean useAdaptiveMutex); - private static native boolean useAdaptiveMutex(long handle); - private static native void setBytesPerSync( - long handle, long bytesPerSync); - private static native long bytesPerSync(long handle); - private static native void setWalBytesPerSync(long handle, long walBytesPerSync); - private static native long walBytesPerSync(long handle); - private static native void setStrictBytesPerSync( + private static native long statsHistoryBufferSize(final long handle); + private static native void setAdviseRandomOnOpen(long handle, boolean adviseRandomOnOpen); + private static native boolean adviseRandomOnOpen(long handle); + private static native void setDbWriteBufferSize(final long handle, final long dbWriteBufferSize); + private static native void setWriteBufferManager( + final long handle, final long writeBufferManagerHandle); + private static native long dbWriteBufferSize(final long handle); + private static native void setAccessHintOnCompactionStart( + final long handle, final byte accessHintOnCompactionStart); + private static native byte accessHintOnCompactionStart(final long handle); + private static native void setCompactionReadaheadSize( + final long handle, final long compactionReadaheadSize); + private static native long compactionReadaheadSize(final long handle); + private static native void setRandomAccessMaxBufferSize( + final long handle, final long randomAccessMaxBufferSize); + private static native long randomAccessMaxBufferSize(final long handle); + private static native void setWritableFileMaxBufferSize( + final long handle, final long writableFileMaxBufferSize); + private static native long writableFileMaxBufferSize(final long handle); + private static native void setUseAdaptiveMutex(long handle, boolean useAdaptiveMutex); + private static native boolean useAdaptiveMutex(long handle); + private static native void setBytesPerSync(long handle, long bytesPerSync); + private static native long bytesPerSync(long handle); + private static native void setWalBytesPerSync(long handle, long walBytesPerSync); + private static native long walBytesPerSync(long handle); + private static native void setStrictBytesPerSync( final long handle, final boolean strictBytesPerSync); - private static native boolean strictBytesPerSync( - final long handle); + private static native boolean strictBytesPerSync(final long handle); private static native void setEventListeners( final long handle, final long[] eventListenerHandles); private static native AbstractEventListener[] eventListeners(final long handle); - private static native void setEnableThreadTracking(long handle, - boolean enableThreadTracking); - private static native boolean enableThreadTracking(long handle); - private static native void setDelayedWriteRate(long handle, long delayedWriteRate); - private static native long delayedWriteRate(long handle); - private static native void setEnablePipelinedWrite(final long handle, - final boolean pipelinedWrite); - private static native boolean enablePipelinedWrite(final long handle); - private static native void setUnorderedWrite(final long handle, - final boolean unorderedWrite); - private static native boolean unorderedWrite(final long handle); - private static native void setAllowConcurrentMemtableWrite(long handle, - boolean allowConcurrentMemtableWrite); - private static native boolean allowConcurrentMemtableWrite(long handle); - private static native void setEnableWriteThreadAdaptiveYield(long handle, - boolean enableWriteThreadAdaptiveYield); - private static native boolean enableWriteThreadAdaptiveYield(long handle); - private static native void setWriteThreadMaxYieldUsec(long handle, - long writeThreadMaxYieldUsec); - private static native long writeThreadMaxYieldUsec(long handle); - private static native void setWriteThreadSlowYieldUsec(long handle, - long writeThreadSlowYieldUsec); - private static native long writeThreadSlowYieldUsec(long handle); - private static native void setSkipStatsUpdateOnDbOpen(final long handle, - final boolean skipStatsUpdateOnDbOpen); - private static native boolean skipStatsUpdateOnDbOpen(final long handle); + private static native void setEnableThreadTracking(long handle, boolean enableThreadTracking); + private static native boolean enableThreadTracking(long handle); + private static native void setDelayedWriteRate(long handle, long delayedWriteRate); + private static native long delayedWriteRate(long handle); + private static native void setEnablePipelinedWrite( + final long handle, final boolean pipelinedWrite); + private static native boolean enablePipelinedWrite(final long handle); + private static native void setUnorderedWrite(final long handle, final boolean unorderedWrite); + private static native boolean unorderedWrite(final long handle); + private static native void setAllowConcurrentMemtableWrite( + long handle, boolean allowConcurrentMemtableWrite); + private static native boolean allowConcurrentMemtableWrite(long handle); + private static native void setEnableWriteThreadAdaptiveYield( + long handle, boolean enableWriteThreadAdaptiveYield); + private static native boolean enableWriteThreadAdaptiveYield(long handle); + private static native void setWriteThreadMaxYieldUsec(long handle, long writeThreadMaxYieldUsec); + private static native long writeThreadMaxYieldUsec(long handle); + private static native void setWriteThreadSlowYieldUsec( + long handle, long writeThreadSlowYieldUsec); + private static native long writeThreadSlowYieldUsec(long handle); + private static native void setSkipStatsUpdateOnDbOpen( + final long handle, final boolean skipStatsUpdateOnDbOpen); + private static native boolean skipStatsUpdateOnDbOpen(final long handle); private static native void setSkipCheckingSstFileSizesOnDbOpen( final long handle, final boolean skipChecking); private static native boolean skipCheckingSstFileSizesOnDbOpen(final long handle); - private static native void setWalRecoveryMode(final long handle, - final byte walRecoveryMode); - private static native byte walRecoveryMode(final long handle); - private static native void setAllow2pc(final long handle, - final boolean allow2pc); - private static native boolean allow2pc(final long handle); - private static native void setRowCache(final long handle, - final long rowCacheHandle); - private static native void setWalFilter(final long handle, - final long walFilterHandle); - private static native void setFailIfOptionsFileError(final long handle, - final boolean failIfOptionsFileError); - private static native boolean failIfOptionsFileError(final long handle); - private static native void setDumpMallocStats(final long handle, - final boolean dumpMallocStats); - private static native boolean dumpMallocStats(final long handle); - private static native void setAvoidFlushDuringRecovery(final long handle, - final boolean avoidFlushDuringRecovery); - private static native boolean avoidFlushDuringRecovery(final long handle); - private static native void setAvoidFlushDuringShutdown(final long handle, - final boolean avoidFlushDuringShutdown); - private static native boolean avoidFlushDuringShutdown(final long handle); - private static native void setAllowIngestBehind(final long handle, - final boolean allowIngestBehind); - private static native boolean allowIngestBehind(final long handle); - private static native void setTwoWriteQueues(final long handle, - final boolean twoWriteQueues); - private static native boolean twoWriteQueues(final long handle); - private static native void setManualWalFlush(final long handle, - final boolean manualWalFlush); - private static native boolean manualWalFlush(final long handle); - + private static native void setWalRecoveryMode(final long handle, final byte walRecoveryMode); + private static native byte walRecoveryMode(final long handle); + private static native void setAllow2pc(final long handle, final boolean allow2pc); + private static native boolean allow2pc(final long handle); + private static native void setRowCache(final long handle, final long rowCacheHandle); + private static native void setWalFilter(final long handle, final long walFilterHandle); + private static native void setFailIfOptionsFileError( + final long handle, final boolean failIfOptionsFileError); + private static native boolean failIfOptionsFileError(final long handle); + private static native void setDumpMallocStats(final long handle, final boolean dumpMallocStats); + private static native boolean dumpMallocStats(final long handle); + private static native void setAvoidFlushDuringRecovery( + final long handle, final boolean avoidFlushDuringRecovery); + private static native boolean avoidFlushDuringRecovery(final long handle); + private static native void setAvoidFlushDuringShutdown( + final long handle, final boolean avoidFlushDuringShutdown); + private static native boolean avoidFlushDuringShutdown(final long handle); + private static native void setAllowIngestBehind( + final long handle, final boolean allowIngestBehind); + private static native boolean allowIngestBehind(final long handle); + private static native void setTwoWriteQueues(final long handle, final boolean twoWriteQueues); + private static native boolean twoWriteQueues(final long handle); + private static native void setManualWalFlush(final long handle, final boolean manualWalFlush); + private static native boolean manualWalFlush(final long handle); // CF native handles private static native void oldDefaults( final long handle, final int majorVersion, final int minorVersion); - private static native void optimizeForSmallDb(final long handle); + private static native void optimizeForSmallDb(final long handle); private static native void optimizeForSmallDb(final long handle, final long cacheHandle); - private static native void optimizeForPointLookup(long handle, - long blockCacheSizeMb); - private static native void optimizeLevelStyleCompaction(long handle, - long memtableMemoryBudget); - private static native void optimizeUniversalStyleCompaction(long handle, - long memtableMemoryBudget); - private static native void setComparatorHandle(long handle, int builtinComparator); - private static native void setComparatorHandle(long optHandle, - long comparatorHandle, byte comparatorType); - private static native void setMergeOperatorName( - long handle, String name); - private static native void setMergeOperator( - long handle, long mergeOperatorHandle); - private static native void setCompactionFilterHandle( - long handle, long compactionFilterHandle); - private static native void setCompactionFilterFactoryHandle( - long handle, long compactionFilterFactoryHandle); - private static native void setWriteBufferSize(long handle, long writeBufferSize) + private static native void optimizeForPointLookup(long handle, long blockCacheSizeMb); + private static native void optimizeLevelStyleCompaction(long handle, long memtableMemoryBudget); + private static native void optimizeUniversalStyleCompaction( + long handle, long memtableMemoryBudget); + private static native void setComparatorHandle(long handle, int builtinComparator); + private static native void setComparatorHandle( + long optHandle, long comparatorHandle, byte comparatorType); + private static native void setMergeOperatorName(long handle, String name); + private static native void setMergeOperator(long handle, long mergeOperatorHandle); + private static native void setCompactionFilterHandle(long handle, long compactionFilterHandle); + private static native void setCompactionFilterFactoryHandle( + long handle, long compactionFilterFactoryHandle); + private static native void setWriteBufferSize(long handle, long writeBufferSize) throws IllegalArgumentException; - private static native long writeBufferSize(long handle); - private static native void setMaxWriteBufferNumber( - long handle, int maxWriteBufferNumber); - private static native int maxWriteBufferNumber(long handle); - private static native void setMinWriteBufferNumberToMerge( + private static native long writeBufferSize(long handle); + private static native void setMaxWriteBufferNumber(long handle, int maxWriteBufferNumber); + private static native int maxWriteBufferNumber(long handle); + private static native void setMinWriteBufferNumberToMerge( long handle, int minWriteBufferNumberToMerge); - private static native int minWriteBufferNumberToMerge(long handle); - private static native void setCompressionType(long handle, byte compressionType); - private static native byte compressionType(long handle); - private static native void setCompressionPerLevel(long handle, - byte[] compressionLevels); - private static native byte[] compressionPerLevel(long handle); - private static native void setBottommostCompressionType(long handle, - byte bottommostCompressionType); - private static native byte bottommostCompressionType(long handle); - private static native void setBottommostCompressionOptions(final long handle, - final long bottommostCompressionOptionsHandle); - private static native void setCompressionOptions(long handle, - long compressionOptionsHandle); - private static native void useFixedLengthPrefixExtractor( - long handle, int prefixLength); - private static native void useCappedPrefixExtractor( - long handle, int prefixLength); - private static native void setNumLevels( - long handle, int numLevels); - private static native int numLevels(long handle); - private static native void setLevelZeroFileNumCompactionTrigger( - long handle, int numFiles); - private static native int levelZeroFileNumCompactionTrigger(long handle); - private static native void setLevelZeroSlowdownWritesTrigger( - long handle, int numFiles); - private static native int levelZeroSlowdownWritesTrigger(long handle); - private static native void setLevelZeroStopWritesTrigger( - long handle, int numFiles); - private static native int levelZeroStopWritesTrigger(long handle); - private static native void setTargetFileSizeBase( - long handle, long targetFileSizeBase); - private static native long targetFileSizeBase(long handle); - private static native void setTargetFileSizeMultiplier( - long handle, int multiplier); - private static native int targetFileSizeMultiplier(long handle); - private static native void setMaxBytesForLevelBase( - long handle, long maxBytesForLevelBase); - private static native long maxBytesForLevelBase(long handle); - private static native void setLevelCompactionDynamicLevelBytes( + private static native int minWriteBufferNumberToMerge(long handle); + private static native void setCompressionType(long handle, byte compressionType); + private static native byte compressionType(long handle); + private static native void setCompressionPerLevel(long handle, byte[] compressionLevels); + private static native byte[] compressionPerLevel(long handle); + private static native void setBottommostCompressionType( + long handle, byte bottommostCompressionType); + private static native byte bottommostCompressionType(long handle); + private static native void setBottommostCompressionOptions( + final long handle, final long bottommostCompressionOptionsHandle); + private static native void setCompressionOptions(long handle, long compressionOptionsHandle); + private static native void useFixedLengthPrefixExtractor(long handle, int prefixLength); + private static native void useCappedPrefixExtractor(long handle, int prefixLength); + private static native void setNumLevels(long handle, int numLevels); + private static native int numLevels(long handle); + private static native void setLevelZeroFileNumCompactionTrigger(long handle, int numFiles); + private static native int levelZeroFileNumCompactionTrigger(long handle); + private static native void setLevelZeroSlowdownWritesTrigger(long handle, int numFiles); + private static native int levelZeroSlowdownWritesTrigger(long handle); + private static native void setLevelZeroStopWritesTrigger(long handle, int numFiles); + private static native int levelZeroStopWritesTrigger(long handle); + private static native void setTargetFileSizeBase(long handle, long targetFileSizeBase); + private static native long targetFileSizeBase(long handle); + private static native void setTargetFileSizeMultiplier(long handle, int multiplier); + private static native int targetFileSizeMultiplier(long handle); + private static native void setMaxBytesForLevelBase(long handle, long maxBytesForLevelBase); + private static native long maxBytesForLevelBase(long handle); + private static native void setLevelCompactionDynamicLevelBytes( long handle, boolean enableLevelCompactionDynamicLevelBytes); - private static native boolean levelCompactionDynamicLevelBytes( - long handle); - private static native void setMaxBytesForLevelMultiplier(long handle, double multiplier); - private static native double maxBytesForLevelMultiplier(long handle); - private static native void setMaxCompactionBytes(long handle, long maxCompactionBytes); - private static native long maxCompactionBytes(long handle); - private static native void setArenaBlockSize( - long handle, long arenaBlockSize) throws IllegalArgumentException; - private static native long arenaBlockSize(long handle); - private static native void setDisableAutoCompactions( - long handle, boolean disableAutoCompactions); - private static native boolean disableAutoCompactions(long handle); - private static native void setCompactionStyle(long handle, byte compactionStyle); - private static native byte compactionStyle(long handle); - private static native void setMaxSequentialSkipInIterations( + private static native boolean levelCompactionDynamicLevelBytes(long handle); + private static native void setMaxBytesForLevelMultiplier(long handle, double multiplier); + private static native double maxBytesForLevelMultiplier(long handle); + private static native void setMaxCompactionBytes(long handle, long maxCompactionBytes); + private static native long maxCompactionBytes(long handle); + private static native void setArenaBlockSize(long handle, long arenaBlockSize) + throws IllegalArgumentException; + private static native long arenaBlockSize(long handle); + private static native void setDisableAutoCompactions(long handle, boolean disableAutoCompactions); + private static native boolean disableAutoCompactions(long handle); + private static native void setCompactionStyle(long handle, byte compactionStyle); + private static native byte compactionStyle(long handle); + private static native void setMaxSequentialSkipInIterations( long handle, long maxSequentialSkipInIterations); - private static native long maxSequentialSkipInIterations(long handle); - private static native void setMemTableFactory(long handle, long factoryHandle); - private static native String memTableFactoryName(long handle); - private static native void setTableFactory(long handle, long factoryHandle); - private static native String tableFactoryName(long handle); + private static native long maxSequentialSkipInIterations(long handle); + private static native void setMemTableFactory(long handle, long factoryHandle); + private static native String memTableFactoryName(long handle); + private static native void setTableFactory(long handle, long factoryHandle); + private static native String tableFactoryName(long handle); private static native void setCfPaths( final long handle, final String[] paths, final long[] targetSizes); private static native long cfPathsLen(final long handle); private static native void cfPaths( final long handle, final String[] paths, final long[] targetSizes); - private static native void setInplaceUpdateSupport( - long handle, boolean inplaceUpdateSupport); - private static native boolean inplaceUpdateSupport(long handle); - private static native void setInplaceUpdateNumLocks( - long handle, long inplaceUpdateNumLocks) + private static native void setInplaceUpdateSupport(long handle, boolean inplaceUpdateSupport); + private static native boolean inplaceUpdateSupport(long handle); + private static native void setInplaceUpdateNumLocks(long handle, long inplaceUpdateNumLocks) throws IllegalArgumentException; - private static native long inplaceUpdateNumLocks(long handle); - private static native void setMemtablePrefixBloomSizeRatio( + private static native long inplaceUpdateNumLocks(long handle); + private static native void setMemtablePrefixBloomSizeRatio( long handle, double memtablePrefixBloomSizeRatio); - private static native double memtablePrefixBloomSizeRatio(long handle); - private static native void setExperimentalMempurgeThreshold( + private static native double memtablePrefixBloomSizeRatio(long handle); + private static native void setExperimentalMempurgeThreshold( long handle, double experimentalMempurgeThreshold); - private static native double experimentalMempurgeThreshold(long handle); - private static native void setMemtableWholeKeyFiltering(long handle, boolean memtableWholeKeyFiltering); - private static native boolean memtableWholeKeyFiltering(long handle); - private static native void setBloomLocality( - long handle, int bloomLocality); - private static native int bloomLocality(long handle); - private static native void setMaxSuccessiveMerges( - long handle, long maxSuccessiveMerges) + private static native double experimentalMempurgeThreshold(long handle); + private static native void setMemtableWholeKeyFiltering( + long handle, boolean memtableWholeKeyFiltering); + private static native boolean memtableWholeKeyFiltering(long handle); + private static native void setBloomLocality(long handle, int bloomLocality); + private static native int bloomLocality(long handle); + private static native void setMaxSuccessiveMerges(long handle, long maxSuccessiveMerges) throws IllegalArgumentException; - private static native long maxSuccessiveMerges(long handle); - private static native void setOptimizeFiltersForHits(long handle, - boolean optimizeFiltersForHits); - private static native boolean optimizeFiltersForHits(long handle); - private static native void setMemtableHugePageSize(long handle, - long memtableHugePageSize); - private static native long memtableHugePageSize(long handle); - private static native void setSoftPendingCompactionBytesLimit(long handle, - long softPendingCompactionBytesLimit); - private static native long softPendingCompactionBytesLimit(long handle); - private static native void setHardPendingCompactionBytesLimit(long handle, - long hardPendingCompactionBytesLimit); - private static native long hardPendingCompactionBytesLimit(long handle); - private static native void setLevel0FileNumCompactionTrigger(long handle, - int level0FileNumCompactionTrigger); - private static native int level0FileNumCompactionTrigger(long handle); - private static native void setLevel0SlowdownWritesTrigger(long handle, - int level0SlowdownWritesTrigger); - private static native int level0SlowdownWritesTrigger(long handle); - private static native void setLevel0StopWritesTrigger(long handle, - int level0StopWritesTrigger); - private static native int level0StopWritesTrigger(long handle); - private static native void setMaxBytesForLevelMultiplierAdditional(long handle, - int[] maxBytesForLevelMultiplierAdditional); - private static native int[] maxBytesForLevelMultiplierAdditional(long handle); - private static native void setParanoidFileChecks(long handle, - boolean paranoidFileChecks); - private static native boolean paranoidFileChecks(long handle); - private static native void setMaxWriteBufferNumberToMaintain(final long handle, - final int maxWriteBufferNumberToMaintain); - private static native int maxWriteBufferNumberToMaintain(final long handle); - private static native void setCompactionPriority(final long handle, - final byte compactionPriority); - private static native byte compactionPriority(final long handle); - private static native void setReportBgIoStats(final long handle, - final boolean reportBgIoStats); - private static native boolean reportBgIoStats(final long handle); - private static native void setTtl(final long handle, final long ttl); - private static native long ttl(final long handle); - private static native void setPeriodicCompactionSeconds( + private static native long maxSuccessiveMerges(long handle); + private static native void setOptimizeFiltersForHits(long handle, boolean optimizeFiltersForHits); + private static native boolean optimizeFiltersForHits(long handle); + private static native void setMemtableHugePageSize(long handle, long memtableHugePageSize); + private static native long memtableHugePageSize(long handle); + private static native void setSoftPendingCompactionBytesLimit( + long handle, long softPendingCompactionBytesLimit); + private static native long softPendingCompactionBytesLimit(long handle); + private static native void setHardPendingCompactionBytesLimit( + long handle, long hardPendingCompactionBytesLimit); + private static native long hardPendingCompactionBytesLimit(long handle); + private static native void setLevel0FileNumCompactionTrigger( + long handle, int level0FileNumCompactionTrigger); + private static native int level0FileNumCompactionTrigger(long handle); + private static native void setLevel0SlowdownWritesTrigger( + long handle, int level0SlowdownWritesTrigger); + private static native int level0SlowdownWritesTrigger(long handle); + private static native void setLevel0StopWritesTrigger(long handle, int level0StopWritesTrigger); + private static native int level0StopWritesTrigger(long handle); + private static native void setMaxBytesForLevelMultiplierAdditional( + long handle, int[] maxBytesForLevelMultiplierAdditional); + private static native int[] maxBytesForLevelMultiplierAdditional(long handle); + private static native void setParanoidFileChecks(long handle, boolean paranoidFileChecks); + private static native boolean paranoidFileChecks(long handle); + private static native void setMaxWriteBufferNumberToMaintain( + final long handle, final int maxWriteBufferNumberToMaintain); + private static native int maxWriteBufferNumberToMaintain(final long handle); + private static native void setCompactionPriority( + final long handle, final byte compactionPriority); + private static native byte compactionPriority(final long handle); + private static native void setReportBgIoStats(final long handle, final boolean reportBgIoStats); + private static native boolean reportBgIoStats(final long handle); + private static native void setTtl(final long handle, final long ttl); + private static native long ttl(final long handle); + private static native void setPeriodicCompactionSeconds( final long handle, final long periodicCompactionSeconds); - private static native long periodicCompactionSeconds(final long handle); - private static native void setCompactionOptionsUniversal(final long handle, - final long compactionOptionsUniversalHandle); - private static native void setCompactionOptionsFIFO(final long handle, - final long compactionOptionsFIFOHandle); - private static native void setForceConsistencyChecks(final long handle, - final boolean forceConsistencyChecks); - private static native boolean forceConsistencyChecks(final long handle); - private static native void setAtomicFlush(final long handle, - final boolean atomicFlush); - private static native boolean atomicFlush(final long handle); - private static native void setSstPartitionerFactory(long nativeHandle_, long newFactoryHandle); - private static native void setMemtableMaxRangeDeletions(final long handle, final int count); - private static native int memtableMaxRangeDeletions(final long handle); + private static native long periodicCompactionSeconds(final long handle); + private static native void setCompactionOptionsUniversal( + final long handle, final long compactionOptionsUniversalHandle); + private static native void setCompactionOptionsFIFO( + final long handle, final long compactionOptionsFIFOHandle); + private static native void setForceConsistencyChecks( + final long handle, final boolean forceConsistencyChecks); + private static native boolean forceConsistencyChecks(final long handle); + private static native void setAtomicFlush(final long handle, final boolean atomicFlush); + private static native boolean atomicFlush(final long handle); + private static native void setSstPartitionerFactory(long nativeHandle_, long newFactoryHandle); + private static native void setMemtableMaxRangeDeletions(final long handle, final int count); + private static native int memtableMaxRangeDeletions(final long handle); private static native void setCompactionThreadLimiter( final long nativeHandle_, final long newLimiterHandle); private static native void setAvoidUnnecessaryBlockingIO( @@ -2543,32 +2481,34 @@ private static native void setBgerrorResumeRetryInterval( final long handle, final long bgerrorResumeRetryInterval); private static native long bgerrorResumeRetryInterval(final long handle); - private static native void setEnableBlobFiles(final long nativeHandle_, final boolean enableBlobFiles); - private static native boolean enableBlobFiles(final long nativeHandle_); - private static native void setMinBlobSize(final long nativeHandle_, final long minBlobSize); - private static native long minBlobSize(final long nativeHandle_); - private static native void setBlobFileSize(final long nativeHandle_, final long blobFileSize); - private static native long blobFileSize(final long nativeHandle_); - private static native void setBlobCompressionType(final long nativeHandle_, final byte compressionType); - private static native byte blobCompressionType(final long nativeHandle_); - private static native void setEnableBlobGarbageCollection( + private static native void setEnableBlobFiles( + final long nativeHandle_, final boolean enableBlobFiles); + private static native boolean enableBlobFiles(final long nativeHandle_); + private static native void setMinBlobSize(final long nativeHandle_, final long minBlobSize); + private static native long minBlobSize(final long nativeHandle_); + private static native void setBlobFileSize(final long nativeHandle_, final long blobFileSize); + private static native long blobFileSize(final long nativeHandle_); + private static native void setBlobCompressionType( + final long nativeHandle_, final byte compressionType); + private static native byte blobCompressionType(final long nativeHandle_); + private static native void setEnableBlobGarbageCollection( final long nativeHandle_, final boolean enableBlobGarbageCollection); - private static native boolean enableBlobGarbageCollection(final long nativeHandle_); - private static native void setBlobGarbageCollectionAgeCutoff( + private static native boolean enableBlobGarbageCollection(final long nativeHandle_); + private static native void setBlobGarbageCollectionAgeCutoff( final long nativeHandle_, final double blobGarbageCollectionAgeCutoff); - private static native double blobGarbageCollectionAgeCutoff(final long nativeHandle_); - private static native void setBlobGarbageCollectionForceThreshold( + private static native double blobGarbageCollectionAgeCutoff(final long nativeHandle_); + private static native void setBlobGarbageCollectionForceThreshold( final long nativeHandle_, final double blobGarbageCollectionForceThreshold); - private static native double blobGarbageCollectionForceThreshold(final long nativeHandle_); - private static native void setBlobCompactionReadaheadSize( + private static native double blobGarbageCollectionForceThreshold(final long nativeHandle_); + private static native void setBlobCompactionReadaheadSize( final long nativeHandle_, final long blobCompactionReadaheadSize); - private static native long blobCompactionReadaheadSize(final long nativeHandle_); - private static native void setBlobFileStartingLevel( + private static native long blobCompactionReadaheadSize(final long nativeHandle_); + private static native void setBlobFileStartingLevel( final long nativeHandle_, final int blobFileStartingLevel); - private static native int blobFileStartingLevel(final long nativeHandle_); - private static native void setPrepopulateBlobCache( + private static native int blobFileStartingLevel(final long nativeHandle_); + private static native void setPrepopulateBlobCache( final long nativeHandle_, final byte prepopulateBlobCache); - private static native byte prepopulateBlobCache(final long nativeHandle_); + private static native byte prepopulateBlobCache(final long nativeHandle_); // instance variables // NOTE: If you add new member variables, please update the copy constructor above! diff --git a/java/src/main/java/org/rocksdb/PersistentCache.java b/java/src/main/java/org/rocksdb/PersistentCache.java index f275a1ac8519..900e7d1393bc 100644 --- a/java/src/main/java/org/rocksdb/PersistentCache.java +++ b/java/src/main/java/org/rocksdb/PersistentCache.java @@ -22,7 +22,8 @@ private static native long newPersistentCache(final long envHandle, final String final long size, final long loggerHandle, final boolean optimizedForNvm) throws RocksDBException; - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/PlainTableConfig.java b/java/src/main/java/org/rocksdb/PlainTableConfig.java index 769dc5b32efd..1331f5b0a2ac 100644 --- a/java/src/main/java/org/rocksdb/PlainTableConfig.java +++ b/java/src/main/java/org/rocksdb/PlainTableConfig.java @@ -234,10 +234,8 @@ public boolean storeIndexInFile() { storeIndexInFile_); } - private static native long newTableFactoryHandle( - int keySize, int bloomBitsPerKey, - double hashTableRatio, int indexSparseness, - int hugePageTlbSize, byte encodingType, + private static native long newTableFactoryHandle(int keySize, int bloomBitsPerKey, + double hashTableRatio, int indexSparseness, int hugePageTlbSize, byte encodingType, boolean fullScanMode, boolean storeIndexInFile); private int keySize_; diff --git a/java/src/main/java/org/rocksdb/RateLimiter.java b/java/src/main/java/org/rocksdb/RateLimiter.java index ba3414b85be0..003bc61211d6 100644 --- a/java/src/main/java/org/rocksdb/RateLimiter.java +++ b/java/src/main/java/org/rocksdb/RateLimiter.java @@ -215,13 +215,13 @@ public long getTotalRequests() { private static native long newRateLimiterHandle(final long rateBytesPerSecond, final long refillPeriodMicros, final int fairness, final byte rateLimiterMode, final boolean autoTune); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native void setBytesPerSecond(final long handle, - final long bytesPerSecond); + private static native void setBytesPerSecond(final long handle, final long bytesPerSecond); private static native long getBytesPerSecond(final long handle); private static native void request(final long handle, final long bytes); private static native long getSingleBurstBytes(final long handle); diff --git a/java/src/main/java/org/rocksdb/ReadOptions.java b/java/src/main/java/org/rocksdb/ReadOptions.java index 64ef2e7f3ef2..11b34ee2cf2a 100644 --- a/java/src/main/java/org/rocksdb/ReadOptions.java +++ b/java/src/main/java/org/rocksdb/ReadOptions.java @@ -768,7 +768,8 @@ public ReadOptions setValueSizeSoftLimit(final long valueSizeSoftLimit) { private static native long newReadOptions(); private static native long newReadOptions(final boolean verifyChecksums, final boolean fillCache); private static native long copyReadOptions(long handle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -792,22 +793,21 @@ public ReadOptions setValueSizeSoftLimit(final long valueSizeSoftLimit) { private static native boolean pinData(long handle); private static native void setPinData(long handle, boolean pinData); private static native boolean backgroundPurgeOnIteratorCleanup(final long handle); - private static native void setBackgroundPurgeOnIteratorCleanup(final long handle, - final boolean backgroundPurgeOnIteratorCleanup); + private static native void setBackgroundPurgeOnIteratorCleanup( + final long handle, final boolean backgroundPurgeOnIteratorCleanup); private static native long readaheadSize(final long handle); - private static native void setReadaheadSize(final long handle, - final long readaheadSize); + private static native void setReadaheadSize(final long handle, final long readaheadSize); private static native long maxSkippableInternalKeys(final long handle); - private static native void setMaxSkippableInternalKeys(final long handle, - final long maxSkippableInternalKeys); + private static native void setMaxSkippableInternalKeys( + final long handle, final long maxSkippableInternalKeys); private static native boolean ignoreRangeDeletions(final long handle); - private static native void setIgnoreRangeDeletions(final long handle, - final boolean ignoreRangeDeletions); - private static native void setIterateUpperBound(final long handle, - final long upperBoundSliceHandle); + private static native void setIgnoreRangeDeletions( + final long handle, final boolean ignoreRangeDeletions); + private static native void setIterateUpperBound( + final long handle, final long upperBoundSliceHandle); private static native long iterateUpperBound(final long handle); - private static native void setIterateLowerBound(final long handle, - final long lowerBoundSliceHandle); + private static native void setIterateLowerBound( + final long handle, final long lowerBoundSliceHandle); private static native long iterateLowerBound(final long handle); private static native void setTableFilter(final long handle, final long tableFilterHandle); private static native boolean autoPrefixMode(final long handle); diff --git a/java/src/main/java/org/rocksdb/RestoreOptions.java b/java/src/main/java/org/rocksdb/RestoreOptions.java index f8efa108d67a..2ea0e3729908 100644 --- a/java/src/main/java/org/rocksdb/RestoreOptions.java +++ b/java/src/main/java/org/rocksdb/RestoreOptions.java @@ -28,7 +28,8 @@ public RestoreOptions(final boolean keepLogFiles) { } private static native long newRestoreOptions(boolean keepLogFiles); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/RocksDB.java b/java/src/main/java/org/rocksdb/RocksDB.java index a3102a108425..673f75328e73 100644 --- a/java/src/main/java/org/rocksdb/RocksDB.java +++ b/java/src/main/java/org/rocksdb/RocksDB.java @@ -4380,7 +4380,8 @@ private static native long[] openAsSecondary(final long optionsHandle, final Str final String secondaryPath, final byte[][] columnFamilyNames, final long[] columnFamilyOptions) throws RocksDBException; - @Override protected void disposeInternal(final long handle) { + @Override + protected void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -4388,123 +4389,99 @@ private static native long[] openAsSecondary(final long optionsHandle, final Str private static native void closeDatabase(final long handle) throws RocksDBException; private static native byte[][] listColumnFamilies(final long optionsHandle, final String path) throws RocksDBException; - private static native long createColumnFamily(final long handle, - final byte[] columnFamilyName, final int columnFamilyNamelen, - final long columnFamilyOptions) throws RocksDBException; - private static native long[] createColumnFamilies(final long handle, - final long columnFamilyOptionsHandle, final byte[][] columnFamilyNames) + private static native long createColumnFamily(final long handle, final byte[] columnFamilyName, + final int columnFamilyNamelen, final long columnFamilyOptions) throws RocksDBException; + private static native long[] createColumnFamilies( + final long handle, final long columnFamilyOptionsHandle, final byte[][] columnFamilyNames) throws RocksDBException; private static native long[] createColumnFamilies( final long handle, final long[] columnFamilyOptionsHandles, final byte[][] columnFamilyNames) throws RocksDBException; - private static native void dropColumnFamily( - final long handle, final long cfHandle) throws RocksDBException; - private static native void dropColumnFamilies(final long handle, - final long[] cfHandles) throws RocksDBException; - private static native void put(final long handle, final byte[] key, - final int keyOffset, final int keyLength, final byte[] value, - final int valueOffset, int valueLength) throws RocksDBException; - private static native void put(final long handle, final byte[] key, final int keyOffset, - final int keyLength, final byte[] value, final int valueOffset, - final int valueLength, final long cfHandle) throws RocksDBException; - private static native void put(final long handle, final long writeOptHandle, - final byte[] key, final int keyOffset, final int keyLength, - final byte[] value, final int valueOffset, final int valueLength) + private static native void dropColumnFamily(final long handle, final long cfHandle) throws RocksDBException; - private static native void put(final long handle, final long writeOptHandle, - final byte[] key, final int keyOffset, final int keyLength, - final byte[] value, final int valueOffset, final int valueLength, - final long cfHandle) throws RocksDBException; - private static native void delete(final long handle, final byte[] key, - final int keyOffset, final int keyLength) throws RocksDBException; - private static native void delete(final long handle, final byte[] key, - final int keyOffset, final int keyLength, final long cfHandle) + private static native void dropColumnFamilies(final long handle, final long[] cfHandles) throws RocksDBException; - private static native void delete(final long handle, final long writeOptHandle, - final byte[] key, final int keyOffset, final int keyLength) + private static native void put(final long handle, final byte[] key, final int keyOffset, + final int keyLength, final byte[] value, final int valueOffset, int valueLength) throws RocksDBException; - private static native void delete(final long handle, final long writeOptHandle, - final byte[] key, final int keyOffset, final int keyLength, + private static native void put(final long handle, final byte[] key, final int keyOffset, + final int keyLength, final byte[] value, final int valueOffset, final int valueLength, final long cfHandle) throws RocksDBException; - private static native void singleDelete( - final long handle, final byte[] key, final int keyLen) + private static native void put(final long handle, final long writeOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final byte[] value, final int valueOffset, + final int valueLength) throws RocksDBException; + private static native void put(final long handle, final long writeOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final byte[] value, final int valueOffset, + final int valueLength, final long cfHandle) throws RocksDBException; + private static native void delete(final long handle, final byte[] key, final int keyOffset, + final int keyLength) throws RocksDBException; + private static native void delete(final long handle, final byte[] key, final int keyOffset, + final int keyLength, final long cfHandle) throws RocksDBException; + private static native void delete(final long handle, final long writeOptHandle, final byte[] key, + final int keyOffset, final int keyLength) throws RocksDBException; + private static native void delete(final long handle, final long writeOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final long cfHandle) throws RocksDBException; + private static native void singleDelete(final long handle, final byte[] key, final int keyLen) throws RocksDBException; - private static native void singleDelete( - final long handle, final byte[] key, final int keyLen, + private static native void singleDelete(final long handle, final byte[] key, final int keyLen, final long cfHandle) throws RocksDBException; - private static native void singleDelete( - final long handle, final long writeOptHandle, final byte[] key, - final int keyLen) throws RocksDBException; - private static native void singleDelete( - final long handle, final long writeOptHandle, - final byte[] key, final int keyLen, final long cfHandle) - throws RocksDBException; + private static native void singleDelete(final long handle, final long writeOptHandle, + final byte[] key, final int keyLen) throws RocksDBException; + private static native void singleDelete(final long handle, final long writeOptHandle, + final byte[] key, final int keyLen, final long cfHandle) throws RocksDBException; private static native void deleteRange(final long handle, final byte[] beginKey, final int beginKeyOffset, final int beginKeyLength, final byte[] endKey, final int endKeyOffset, final int endKeyLength) throws RocksDBException; private static native void deleteRange(final long handle, final byte[] beginKey, final int beginKeyOffset, final int beginKeyLength, final byte[] endKey, - final int endKeyOffset, final int endKeyLength, final long cfHandle) - throws RocksDBException; + final int endKeyOffset, final int endKeyLength, final long cfHandle) throws RocksDBException; private static native void deleteRange(final long handle, final long writeOptHandle, final byte[] beginKey, final int beginKeyOffset, final int beginKeyLength, - final byte[] endKey, final int endKeyOffset, final int endKeyLength) - throws RocksDBException; - private static native void deleteRange( - final long handle, final long writeOptHandle, final byte[] beginKey, - final int beginKeyOffset, final int beginKeyLength, final byte[] endKey, - final int endKeyOffset, final int endKeyLength, final long cfHandle) - throws RocksDBException; - private static native void merge(final long handle, final byte[] key, - final int keyOffset, final int keyLength, final byte[] value, - final int valueOffset, final int valueLength) throws RocksDBException; - private static native void merge(final long handle, final byte[] key, - final int keyOffset, final int keyLength, final byte[] value, - final int valueOffset, final int valueLength, final long cfHandle) + final byte[] endKey, final int endKeyOffset, final int endKeyLength) throws RocksDBException; + private static native void deleteRange(final long handle, final long writeOptHandle, + final byte[] beginKey, final int beginKeyOffset, final int beginKeyLength, + final byte[] endKey, final int endKeyOffset, final int endKeyLength, final long cfHandle) throws RocksDBException; - private static native void merge(final long handle, final long writeOptHandle, - final byte[] key, final int keyOffset, final int keyLength, - final byte[] value, final int valueOffset, final int valueLength) + private static native void merge(final long handle, final byte[] key, final int keyOffset, + final int keyLength, final byte[] value, final int valueOffset, final int valueLength) throws RocksDBException; - private static native void merge(final long handle, final long writeOptHandle, - final byte[] key, final int keyOffset, final int keyLength, - final byte[] value, final int valueOffset, final int valueLength, + private static native void merge(final long handle, final byte[] key, final int keyOffset, + final int keyLength, final byte[] value, final int valueOffset, final int valueLength, final long cfHandle) throws RocksDBException; - private static native void write0(final long handle, final long writeOptHandle, - final long wbHandle) throws RocksDBException; - private static native void write1(final long handle, final long writeOptHandle, - final long wbwiHandle) throws RocksDBException; - private static native int get(final long handle, final byte[] key, - final int keyOffset, final int keyLength, final byte[] value, - final int valueOffset, final int valueLength) throws RocksDBException; - private static native int get(final long handle, final byte[] key, - final int keyOffset, final int keyLength, byte[] value, - final int valueOffset, final int valueLength, final long cfHandle) - throws RocksDBException; - private static native int get(final long handle, final long readOptHandle, - final byte[] key, final int keyOffset, final int keyLength, - final byte[] value, final int valueOffset, final int valueLength) + private static native void merge(final long handle, final long writeOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final byte[] value, final int valueOffset, + final int valueLength) throws RocksDBException; + private static native void merge(final long handle, final long writeOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final byte[] value, final int valueOffset, + final int valueLength, final long cfHandle) throws RocksDBException; + private static native void write0( + final long handle, final long writeOptHandle, final long wbHandle) throws RocksDBException; + private static native void write1( + final long handle, final long writeOptHandle, final long wbwiHandle) throws RocksDBException; + private static native int get(final long handle, final byte[] key, final int keyOffset, + final int keyLength, final byte[] value, final int valueOffset, final int valueLength) throws RocksDBException; - private static native int get(final long handle, final long readOptHandle, - final byte[] key, final int keyOffset, final int keyLength, - final byte[] value, final int valueOffset, final int valueLength, + private static native int get(final long handle, final byte[] key, final int keyOffset, + final int keyLength, byte[] value, final int valueOffset, final int valueLength, final long cfHandle) throws RocksDBException; + private static native int get(final long handle, final long readOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final byte[] value, final int valueOffset, + final int valueLength) throws RocksDBException; + private static native int get(final long handle, final long readOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final byte[] value, final int valueOffset, + final int valueLength, final long cfHandle) throws RocksDBException; private static native byte[] get(final long handle, byte[] key, final int keyOffset, final int keyLength) throws RocksDBException; - private static native byte[] get(final long handle, final byte[] key, - final int keyOffset, final int keyLength, final long cfHandle) - throws RocksDBException; - private static native byte[] get(final long handle, final long readOptHandle, - final byte[] key, final int keyOffset, final int keyLength) - throws RocksDBException; - private static native byte[] get(final long handle, - final long readOptHandle, final byte[] key, final int keyOffset, + private static native byte[] get(final long handle, final byte[] key, final int keyOffset, final int keyLength, final long cfHandle) throws RocksDBException; + private static native byte[] get(final long handle, final long readOptHandle, final byte[] key, + final int keyOffset, final int keyLength) throws RocksDBException; + private static native byte[] get(final long handle, final long readOptHandle, final byte[] key, + final int keyOffset, final int keyLength, final long cfHandle) throws RocksDBException; + private static native byte[][] multiGet( + final long dbHandle, final byte[][] keys, final int[] keyOffsets, final int[] keyLengths); private static native byte[][] multiGet(final long dbHandle, final byte[][] keys, - final int[] keyOffsets, final int[] keyLengths); - private static native byte[][] multiGet(final long dbHandle, final byte[][] keys, - final int[] keyOffsets, final int[] keyLengths, - final long[] columnFamilyHandles); + final int[] keyOffsets, final int[] keyLengths, final long[] columnFamilyHandles); private static native byte[][] multiGet(final long dbHandle, final long rOptHandle, final byte[][] keys, final int[] keyOffsets, final int[] keyLengths); private static native byte[][] multiGet(final long dbHandle, final long rOptHandle, @@ -4516,87 +4493,68 @@ private static native void multiGet(final long dbHandle, final long rOptHandle, final int[] keyLengths, final ByteBuffer[] valuesArray, final int[] valuesSizeArray, final Status[] statusArray); - private static native boolean keyMayExist( - final long handle, final long cfHandle, final long readOptHandle, - final byte[] key, final int keyOffset, final int keyLength); - private static native byte[][] keyMayExistFoundValue( - final long handle, final long cfHandle, final long readOptHandle, - final byte[] key, final int keyOffset, final int keyLength); - private static native void putDirect(long handle, long writeOptHandle, ByteBuffer key, int keyOffset, - int keyLength, ByteBuffer value, int valueOffset, int valueLength, long cfHandle) - throws RocksDBException; + private static native boolean keyMayExist(final long handle, final long cfHandle, + final long readOptHandle, final byte[] key, final int keyOffset, final int keyLength); + private static native byte[][] keyMayExistFoundValue(final long handle, final long cfHandle, + final long readOptHandle, final byte[] key, final int keyOffset, final int keyLength); + private static native void putDirect(long handle, long writeOptHandle, ByteBuffer key, + int keyOffset, int keyLength, ByteBuffer value, int valueOffset, int valueLength, + long cfHandle) throws RocksDBException; private static native long iterator(final long handle); private static native long iterator(final long handle, final long readOptHandle); private static native long iteratorCF(final long handle, final long cfHandle); - private static native long iteratorCF(final long handle, final long cfHandle, - final long readOptHandle); - private static native long[] iterators(final long handle, - final long[] columnFamilyHandles, final long readOptHandle) - throws RocksDBException; + private static native long iteratorCF( + final long handle, final long cfHandle, final long readOptHandle); + private static native long[] iterators(final long handle, final long[] columnFamilyHandles, + final long readOptHandle) throws RocksDBException; private static native long getSnapshot(final long nativeHandle); - private static native void releaseSnapshot( - final long nativeHandle, final long snapshotHandle); - private static native String getProperty(final long nativeHandle, - final long cfHandle, final String property, final int propertyLength) - throws RocksDBException; + private static native void releaseSnapshot(final long nativeHandle, final long snapshotHandle); + private static native String getProperty(final long nativeHandle, final long cfHandle, + final String property, final int propertyLength) throws RocksDBException; private static native Map getMapProperty(final long nativeHandle, - final long cfHandle, final String property, final int propertyLength) - throws RocksDBException; - private static native int getDirect(long handle, long readOptHandle, ByteBuffer key, int keyOffset, - int keyLength, ByteBuffer value, int valueOffset, int valueLength, long cfHandle) - throws RocksDBException; + final long cfHandle, final String property, final int propertyLength) throws RocksDBException; + private static native int getDirect(long handle, long readOptHandle, ByteBuffer key, + int keyOffset, int keyLength, ByteBuffer value, int valueOffset, int valueLength, + long cfHandle) throws RocksDBException; private static native boolean keyMayExistDirect(final long handle, final long cfHhandle, final long readOptHandle, final ByteBuffer key, final int keyOffset, final int keyLength); private static native int[] keyMayExistDirectFoundValue(final long handle, final long cfHhandle, final long readOptHandle, final ByteBuffer key, final int keyOffset, final int keyLength, final ByteBuffer value, final int valueOffset, final int valueLength); - private static native void deleteDirect(long handle, long optHandle, ByteBuffer key, int keyOffset, - int keyLength, long cfHandle) throws RocksDBException; - private static native long getLongProperty(final long nativeHandle, - final long cfHandle, final String property, final int propertyLength) - throws RocksDBException; - private static native void resetStats(final long nativeHandle) - throws RocksDBException; - private static native long getAggregatedLongProperty(final long nativeHandle, - final String property, int propertyLength) throws RocksDBException; + private static native void deleteDirect(long handle, long optHandle, ByteBuffer key, + int keyOffset, int keyLength, long cfHandle) throws RocksDBException; + private static native long getLongProperty(final long nativeHandle, final long cfHandle, + final String property, final int propertyLength) throws RocksDBException; + private static native void resetStats(final long nativeHandle) throws RocksDBException; + private static native long getAggregatedLongProperty( + final long nativeHandle, final String property, int propertyLength) throws RocksDBException; private static native long[] getApproximateSizes(final long nativeHandle, - final long columnFamilyHandle, final long[] rangeSliceHandles, - final byte includeFlags); + final long columnFamilyHandle, final long[] rangeSliceHandles, final byte includeFlags); private static native long[] getApproximateMemTableStats(final long nativeHandle, final long columnFamilyHandle, final long rangeStartSliceHandle, final long rangeLimitSliceHandle); private static native void compactRange(final long handle, /* @Nullable */ final byte[] begin, final int beginLen, - /* @Nullable */ final byte[] end, final int endLen, - final long compactRangeOptHandle, final long cfHandle) - throws RocksDBException; - private static native void setOptions(final long handle, final long cfHandle, - final String[] keys, final String[] values) throws RocksDBException; + /* @Nullable */ final byte[] end, final int endLen, final long compactRangeOptHandle, + final long cfHandle) throws RocksDBException; + private static native void setOptions(final long handle, final long cfHandle, final String[] keys, + final String[] values) throws RocksDBException; private static native String getOptions(final long handle, final long cfHandle); - private static native void setDBOptions(final long handle, - final String[] keys, final String[] values) throws RocksDBException; + private static native void setDBOptions( + final long handle, final String[] keys, final String[] values) throws RocksDBException; private static native String getDBOptions(final long handle); - private static native String[] compactFiles(final long handle, - final long compactionOptionsHandle, - final long columnFamilyHandle, - final String[] inputFileNames, - final int outputLevel, - final int outputPathId, - final long compactionJobInfoHandle) throws RocksDBException; - private static native void cancelAllBackgroundWork(final long handle, - final boolean wait); - private static native void pauseBackgroundWork(final long handle) - throws RocksDBException; - private static native void continueBackgroundWork(final long handle) - throws RocksDBException; - private static native void enableAutoCompaction(final long handle, - final long[] columnFamilyHandles) throws RocksDBException; - private static native int numberLevels(final long handle, - final long columnFamilyHandle); - private static native int maxMemCompactionLevel(final long handle, - final long columnFamilyHandle); - private static native int level0StopWriteTrigger(final long handle, - final long columnFamilyHandle); + private static native String[] compactFiles(final long handle, final long compactionOptionsHandle, + final long columnFamilyHandle, final String[] inputFileNames, final int outputLevel, + final int outputPathId, final long compactionJobInfoHandle) throws RocksDBException; + private static native void cancelAllBackgroundWork(final long handle, final boolean wait); + private static native void pauseBackgroundWork(final long handle) throws RocksDBException; + private static native void continueBackgroundWork(final long handle) throws RocksDBException; + private static native void enableAutoCompaction( + final long handle, final long[] columnFamilyHandles) throws RocksDBException; + private static native int numberLevels(final long handle, final long columnFamilyHandle); + private static native int maxMemCompactionLevel(final long handle, final long columnFamilyHandle); + private static native int level0StopWriteTrigger( + final long handle, final long columnFamilyHandle); private static native String getName(final long handle); private static native long getEnv(final long handle); private static native void flush(final long handle, final long flushOptHandle, @@ -4608,33 +4566,29 @@ private static native void flushWal(final long handle, final boolean sync) private static native void disableFileDeletions(long handle) throws RocksDBException; private static native void enableFileDeletions(long handle, boolean force) throws RocksDBException; - private static native String[] getLiveFiles(final long handle, - final boolean flushMemtable) throws RocksDBException; - private static native LogFile[] getSortedWalFiles(final long handle) + private static native String[] getLiveFiles(final long handle, final boolean flushMemtable) + throws RocksDBException; + private static native LogFile[] getSortedWalFiles(final long handle) throws RocksDBException; + private static native long getUpdatesSince(final long handle, final long sequenceNumber) throws RocksDBException; - private static native long getUpdatesSince(final long handle, - final long sequenceNumber) throws RocksDBException; private static native void deleteFile(final long handle, final String name) throws RocksDBException; private static native LiveFileMetaData[] getLiveFilesMetaData(final long handle); private static native ColumnFamilyMetaData getColumnFamilyMetaData( final long handle, final long columnFamilyHandle); - private static native void ingestExternalFile(final long handle, - final long columnFamilyHandle, final String[] filePathList, - final int filePathListLen, final long ingestExternalFileOptionsHandle) - throws RocksDBException; + private static native void ingestExternalFile(final long handle, final long columnFamilyHandle, + final String[] filePathList, final int filePathListLen, + final long ingestExternalFileOptionsHandle) throws RocksDBException; private static native void verifyChecksum(final long handle) throws RocksDBException; private static native long getDefaultColumnFamily(final long handle); private static native Map getPropertiesOfAllTables( final long handle, final long columnFamilyHandle) throws RocksDBException; private static native Map getPropertiesOfTablesInRange( - final long handle, final long columnFamilyHandle, - final long[] rangeSliceHandles); - private static native long[] suggestCompactRange(final long handle, - final long columnFamilyHandle) throws RocksDBException; - private static native void promoteL0(final long handle, - final long columnFamilyHandle, final int tragetLevel) + final long handle, final long columnFamilyHandle, final long[] rangeSliceHandles); + private static native long[] suggestCompactRange(final long handle, final long columnFamilyHandle) throws RocksDBException; + private static native void promoteL0(final long handle, final long columnFamilyHandle, + final int tragetLevel) throws RocksDBException; private static native void startTrace(final long handle, final long maxTraceFileSize, final long traceWriterHandle) throws RocksDBException; private static native void endTrace(final long handle) throws RocksDBException; diff --git a/java/src/main/java/org/rocksdb/RocksEnv.java b/java/src/main/java/org/rocksdb/RocksEnv.java index 87111cd86162..eba5b25532a7 100644 --- a/java/src/main/java/org/rocksdb/RocksEnv.java +++ b/java/src/main/java/org/rocksdb/RocksEnv.java @@ -27,7 +27,8 @@ public class RocksEnv extends Env { super(handle); } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/RocksIterator.java b/java/src/main/java/org/rocksdb/RocksIterator.java index 23c57eeb4f87..d0500f25fcbd 100644 --- a/java/src/main/java/org/rocksdb/RocksIterator.java +++ b/java/src/main/java/org/rocksdb/RocksIterator.java @@ -110,43 +110,52 @@ public int value(final ByteBuffer value) { return result; } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - @Override final boolean isValid0(long handle) { + @Override + final boolean isValid0(long handle) { return isValid0Jni(handle); } private static native boolean isValid0Jni(long handle); - @Override final void seekToFirst0(long handle) { + @Override + final void seekToFirst0(long handle) { seekToFirst0Jni(handle); } private static native void seekToFirst0Jni(long handle); - @Override final void seekToLast0(long handle) { + @Override + final void seekToLast0(long handle) { seekToLast0Jni(handle); } private static native void seekToLast0Jni(long handle); - @Override final void next0(long handle) { + @Override + final void next0(long handle) { next0Jni(handle); } private static native void next0Jni(long handle); - @Override final void prev0(long handle) { + @Override + final void prev0(long handle) { prev0Jni(handle); } private static native void prev0Jni(long handle); - @Override final void refresh0(long handle) { + @Override + final void refresh0(long handle) { refresh0Jni(handle); } private static native void refresh0Jni(long handle); - @Override final void seek0(long handle, byte[] target, int targetLen){ + @Override + final void seek0(long handle, byte[] target, int targetLen) { seek0Jni(handle, target, targetLen); } private static native void seek0Jni(long handle, byte[] target, int targetLen); - @Override final void seekForPrev0(long handle, byte[] target, int targetLen) { + @Override + final void seekForPrev0(long handle, byte[] target, int targetLen) { seekForPrev0Jni(handle, target, targetLen); } private static native void seekForPrev0Jni(long handle, byte[] target, int targetLen); @@ -154,35 +163,39 @@ public int value(final ByteBuffer value) { final void seekDirect0(long handle, ByteBuffer target, int targetOffset, int targetLen) { seekDirect0Jni(handle, target, targetOffset, targetLen); } - private static native void seekDirect0Jni(long handle, ByteBuffer target, int targetOffset, int targetLen); + private static native void seekDirect0Jni( + long handle, ByteBuffer target, int targetOffset, int targetLen); @Override final void seekByteArray0(long handle, byte[] target, int targetOffset, int targetLen) { seekByteArray0Jni(handle, target, targetOffset, targetLen); } - private static native void seekByteArray0Jni(long handle, byte[] target, int targetOffset, int targetLen); + private static native void seekByteArray0Jni( + long handle, byte[] target, int targetOffset, int targetLen); @Override - final void seekForPrevDirect0( - long handle, ByteBuffer target, int targetOffset, int targetLen) { + final void seekForPrevDirect0(long handle, ByteBuffer target, int targetOffset, int targetLen) { seekForPrevDirect0Jni(handle, target, targetOffset, targetLen); } private static native void seekForPrevDirect0Jni( - long handle, ByteBuffer target, int targetOffset, int targetLen); + long handle, ByteBuffer target, int targetOffset, int targetLen); @Override - final void seekForPrevByteArray0( - long handle, byte[] target, int targetOffset, int targetLen) { + final void seekForPrevByteArray0(long handle, byte[] target, int targetOffset, int targetLen) { seekForPrevByteArray0Jni(handle, target, targetOffset, targetLen); } private static native void seekForPrevByteArray0Jni( - long handle, byte[] target, int targetOffset, int targetLen); - @Override final void status0(long handle) throws RocksDBException { + long handle, byte[] target, int targetOffset, int targetLen); + @Override + final void status0(long handle) throws RocksDBException { status0Jni(handle); } private static native void status0Jni(long handle) throws RocksDBException; private static native byte[] key0(long handle); private static native byte[] value0(long handle); - private static native int keyDirect0(long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); + private static native int keyDirect0( + long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); private static native int keyByteArray0(long handle, byte[] array, int arrayOffset, int arrayLen); - private static native int valueDirect0(long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); - private static native int valueByteArray0(long handle, byte[] array, int arrayOffset, int arrayLen); + private static native int valueDirect0( + long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); + private static native int valueByteArray0( + long handle, byte[] array, int arrayOffset, int arrayLen); } diff --git a/java/src/main/java/org/rocksdb/RocksMemEnv.java b/java/src/main/java/org/rocksdb/RocksMemEnv.java index cd54fff9a550..be04a90031ea 100644 --- a/java/src/main/java/org/rocksdb/RocksMemEnv.java +++ b/java/src/main/java/org/rocksdb/RocksMemEnv.java @@ -27,7 +27,8 @@ public RocksMemEnv(final Env baseEnv) { } private static native long createMemEnv(final long baseEnvHandle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/Slice.java b/java/src/main/java/org/rocksdb/Slice.java index 5d0edb5c7a6b..54d1d1bbf58e 100644 --- a/java/src/main/java/org/rocksdb/Slice.java +++ b/java/src/main/java/org/rocksdb/Slice.java @@ -127,9 +127,7 @@ protected void disposeInternal() { @Override protected final native byte[] data0(long handle); private static native long createNewSlice0(final byte[] data, final int length); private static native long createNewSlice1(final byte[] data); - private static native void clear0(long handle, boolean internalBuffer, - long internalBufferOffset); + private static native void clear0(long handle, boolean internalBuffer, long internalBufferOffset); private static native void removePrefix0(long handle, int length); - private static native void disposeInternalBuf(final long handle, - long internalBufferOffset); + private static native void disposeInternalBuf(final long handle, long internalBufferOffset); } diff --git a/java/src/main/java/org/rocksdb/SstFileManager.java b/java/src/main/java/org/rocksdb/SstFileManager.java index b57bd9f45e57..efce94db24fe 100644 --- a/java/src/main/java/org/rocksdb/SstFileManager.java +++ b/java/src/main/java/org/rocksdb/SstFileManager.java @@ -231,21 +231,19 @@ public void setMaxTrashDBRatio(final double ratio) { private static native long newSstFileManager(final long handle, final long logger_handle, final long rateBytesPerSec, final double maxTrashDbRatio, final long bytesMaxDeleteChunk) throws RocksDBException; - private static native void setMaxAllowedSpaceUsage(final long handle, - final long maxAllowedSpace); - private static native void setCompactionBufferSize(final long handle, - final long compactionBufferSize); - private static native boolean isMaxAllowedSpaceReached(final long handle); - private static native boolean isMaxAllowedSpaceReachedIncludingCompactions( - final long handle); - private static native long getTotalSize(final long handle); - private static native Map getTrackedFiles(final long handle); - private static native long getDeleteRateBytesPerSecond(final long handle); - private static native void setDeleteRateBytesPerSecond(final long handle, - final long deleteRate); - private static native double getMaxTrashDBRatio(final long handle); - private static native void setMaxTrashDBRatio(final long handle, final double ratio); - @Override protected void disposeInternal(final long handle) { + private static native void setMaxAllowedSpaceUsage(final long handle, final long maxAllowedSpace); + private static native void setCompactionBufferSize( + final long handle, final long compactionBufferSize); + private static native boolean isMaxAllowedSpaceReached(final long handle); + private static native boolean isMaxAllowedSpaceReachedIncludingCompactions(final long handle); + private static native long getTotalSize(final long handle); + private static native Map getTrackedFiles(final long handle); + private static native long getDeleteRateBytesPerSecond(final long handle); + private static native void setDeleteRateBytesPerSecond(final long handle, final long deleteRate); + private static native double getMaxTrashDBRatio(final long handle); + private static native void setMaxTrashDBRatio(final long handle, final double ratio); + @Override + protected void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/SstFileReader.java b/java/src/main/java/org/rocksdb/SstFileReader.java index fb6ed5c639af..ab6120f99acc 100644 --- a/java/src/main/java/org/rocksdb/SstFileReader.java +++ b/java/src/main/java/org/rocksdb/SstFileReader.java @@ -69,17 +69,17 @@ public TableProperties getTableProperties() throws RocksDBException { return getTableProperties(nativeHandle_); } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native long newIterator(final long handle, final long readOptionsHandle); + private static native long newIterator(final long handle, final long readOptionsHandle); - private static native void open(final long handle, final String filePath) - throws RocksDBException; + private static native void open(final long handle, final String filePath) throws RocksDBException; private static native long newSstFileReader(final long optionsHandle); - private static native void verifyChecksum(final long handle) throws RocksDBException; - private static native TableProperties getTableProperties(final long handle) + private static native void verifyChecksum(final long handle) throws RocksDBException; + private static native TableProperties getTableProperties(final long handle) throws RocksDBException; } diff --git a/java/src/main/java/org/rocksdb/SstFileReaderIterator.java b/java/src/main/java/org/rocksdb/SstFileReaderIterator.java index 93c630d62329..89026090e74f 100644 --- a/java/src/main/java/org/rocksdb/SstFileReaderIterator.java +++ b/java/src/main/java/org/rocksdb/SstFileReaderIterator.java @@ -108,45 +108,55 @@ public int value(final ByteBuffer value) { return result; } - @Override protected final void disposeInternal(final long handle) { - disposeInternalJni(handle); + @Override + protected final void disposeInternal(final long handle) { + disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - @Override final boolean isValid0(long handle) { + @Override + final boolean isValid0(long handle) { return isValid0Jni(handle); } private static native boolean isValid0Jni(long handle); - @Override final void seekToFirst0(long handle) { + @Override + final void seekToFirst0(long handle) { seekToFirst0Jni(handle); } private static native void seekToFirst0Jni(long handle); - @Override final void seekToLast0(long handle) { + @Override + final void seekToLast0(long handle) { seekToLast0Jni(handle); } private static native void seekToLast0Jni(long handle); - @Override final void next0(long handle) { + @Override + final void next0(long handle) { next0Jni(handle); } private static native void next0Jni(long handle); - @Override final void prev0(long handle) { + @Override + final void prev0(long handle) { prev0Jni(handle); } private static native void prev0Jni(long handle); - @Override final void refresh0(long handle) throws RocksDBException { + @Override + final void refresh0(long handle) throws RocksDBException { refresh0Jni(handle); } private static native void refresh0Jni(long handle) throws RocksDBException; - @Override final void seek0(long handle, byte[] target, int targetLen){ + @Override + final void seek0(long handle, byte[] target, int targetLen) { seek0Jni(handle, target, targetLen); } private static native void seek0Jni(long handle, byte[] target, int targetLen); - @Override final void seekForPrev0(long handle, byte[] target, int targetLen) { + @Override + final void seekForPrev0(long handle, byte[] target, int targetLen) { seekForPrev0Jni(handle, target, targetLen); } private static native void seekForPrev0Jni(long handle, byte[] target, int targetLen); - @Override final void status0(long handle) throws RocksDBException { + @Override + final void status0(long handle) throws RocksDBException { status0Jni(handle); } private static native void status0Jni(long handle) throws RocksDBException; @@ -154,34 +164,38 @@ public int value(final ByteBuffer value) { final void seekDirect0(long handle, ByteBuffer target, int targetOffset, int targetLen) { seekDirect0Jni(handle, target, targetOffset, targetLen); } - private static native void seekDirect0Jni(long handle, ByteBuffer target, int targetOffset, int targetLen); + private static native void seekDirect0Jni( + long handle, ByteBuffer target, int targetOffset, int targetLen); @Override - final void seekForPrevDirect0( - long handle, ByteBuffer target, int targetOffset, int targetLen) { + final void seekForPrevDirect0(long handle, ByteBuffer target, int targetOffset, int targetLen) { seekForPrevDirect0Jni(handle, target, targetOffset, targetLen); } private static native void seekForPrevDirect0Jni( - long handle, ByteBuffer target, int targetOffset, int targetLen); + long handle, ByteBuffer target, int targetOffset, int targetLen); @Override final void seekByteArray0( final long handle, final byte[] target, final int targetOffset, final int targetLen) { seekByteArray0Jni(handle, target, targetOffset, targetLen); } private static native void seekByteArray0Jni( - final long handle, final byte[] target, final int targetOffset, final int targetLen); + final long handle, final byte[] target, final int targetOffset, final int targetLen); @Override final void seekForPrevByteArray0( final long handle, final byte[] target, final int targetOffset, final int targetLen) { seekForPrevByteArray0Jni(handle, target, targetOffset, targetLen); } private static native void seekForPrevByteArray0Jni( - final long handle, final byte[] target, final int targetOffset, final int targetLen); + final long handle, final byte[] target, final int targetOffset, final int targetLen); - private static native byte[] key0(long handle); - private static native byte[] value0(long handle); + private static native byte[] key0(long handle); + private static native byte[] value0(long handle); - private static native int keyDirect0(long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); - private static native int keyByteArray0(long handle, byte[] buffer, int bufferOffset, int bufferLen); - private static native int valueDirect0(long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); - private static native int valueByteArray0(long handle, byte[] buffer, int bufferOffset, int bufferLen); + private static native int keyDirect0( + long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); + private static native int keyByteArray0( + long handle, byte[] buffer, int bufferOffset, int bufferLen); + private static native int valueDirect0( + long handle, ByteBuffer buffer, int bufferOffset, int bufferLen); + private static native int valueByteArray0( + long handle, byte[] buffer, int bufferOffset, int bufferLen); } diff --git a/java/src/main/java/org/rocksdb/SstFileWriter.java b/java/src/main/java/org/rocksdb/SstFileWriter.java index 8130f1cf3689..2796af6e1c4e 100644 --- a/java/src/main/java/org/rocksdb/SstFileWriter.java +++ b/java/src/main/java/org/rocksdb/SstFileWriter.java @@ -205,36 +205,35 @@ private static native long newSstFileWriter(final long envOptionsHandle, final l private static native long newSstFileWriter( final long envOptionsHandle, final long optionsHandle); - private static native void open(final long handle, final String filePath) + private static native void open(final long handle, final String filePath) throws RocksDBException; + + private static native void put(final long handle, final long keyHandle, final long valueHandle) throws RocksDBException; - private static native void put(final long handle, final long keyHandle, - final long valueHandle) throws RocksDBException; - - private static native void put(final long handle, final byte[] key, - final byte[] value) throws RocksDBException; + private static native void put(final long handle, final byte[] key, final byte[] value) + throws RocksDBException; private static native void putDirect(long handle, ByteBuffer key, int keyOffset, int keyLength, ByteBuffer value, int valueOffset, int valueLength) throws RocksDBException; private static native long fileSize(long handle) throws RocksDBException; - private static native void merge(final long handle, final long keyHandle, - final long valueHandle) throws RocksDBException; + private static native void merge(final long handle, final long keyHandle, final long valueHandle) + throws RocksDBException; - private static native void merge(final long handle, final byte[] key, - final byte[] value) throws RocksDBException; + private static native void merge(final long handle, final byte[] key, final byte[] value) + throws RocksDBException; private static native void delete(final long handle, final long keyHandle) throws RocksDBException; - private static native void delete(final long handle, final byte[] key) - throws RocksDBException; + private static native void delete(final long handle, final byte[] key) throws RocksDBException; private static native void finish(final long handle) throws RocksDBException; - @Override protected final void disposeInternal(final long handle) { - disposeInternalJni(handle); + @Override + protected final void disposeInternal(final long handle) { + disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); } diff --git a/java/src/main/java/org/rocksdb/SstPartitionerFixedPrefixFactory.java b/java/src/main/java/org/rocksdb/SstPartitionerFixedPrefixFactory.java index f007367ef2fb..d9b7184aa012 100644 --- a/java/src/main/java/org/rocksdb/SstPartitionerFixedPrefixFactory.java +++ b/java/src/main/java/org/rocksdb/SstPartitionerFixedPrefixFactory.java @@ -15,7 +15,8 @@ public SstPartitionerFixedPrefixFactory(final long prefixLength) { private static native long newSstPartitionerFixedPrefixFactory0(long prefixLength); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/Statistics.java b/java/src/main/java/org/rocksdb/Statistics.java index a5ac1b83cdc4..4a9c19d42f6a 100644 --- a/java/src/main/java/org/rocksdb/Statistics.java +++ b/java/src/main/java/org/rocksdb/Statistics.java @@ -140,17 +140,18 @@ public String toString() { private static native long newStatistics( final byte[] ignoreHistograms, final long otherStatisticsHandle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - private static native byte statsLevel(final long handle); - private static native void setStatsLevel(final long handle, final byte statsLevel); - private static native long getTickerCount(final long handle, final byte tickerType); - private static native long getAndResetTickerCount(final long handle, final byte tickerType); - private static native HistogramData getHistogramData(final long handle, final byte histogramType); - private static native String getHistogramString(final long handle, final byte histogramType); - private static native void reset(final long nativeHandle) throws RocksDBException; + private static native byte statsLevel(final long handle); + private static native void setStatsLevel(final long handle, final byte statsLevel); + private static native long getTickerCount(final long handle, final byte tickerType); + private static native long getAndResetTickerCount(final long handle, final byte tickerType); + private static native HistogramData getHistogramData(final long handle, final byte histogramType); + private static native String getHistogramString(final long handle, final byte histogramType); + private static native void reset(final long nativeHandle) throws RocksDBException; private static native String toString(final long nativeHandle); } diff --git a/java/src/main/java/org/rocksdb/StringAppendOperator.java b/java/src/main/java/org/rocksdb/StringAppendOperator.java index a77be7b292f0..25b134c44af8 100644 --- a/java/src/main/java/org/rocksdb/StringAppendOperator.java +++ b/java/src/main/java/org/rocksdb/StringAppendOperator.java @@ -25,7 +25,8 @@ public StringAppendOperator(final String delim) { private static native long newSharedStringAppendOperator(final char delim); private static native long newSharedStringAppendOperator(final String delim); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/TimedEnv.java b/java/src/main/java/org/rocksdb/TimedEnv.java index 37f0752e8785..55cd37251310 100644 --- a/java/src/main/java/org/rocksdb/TimedEnv.java +++ b/java/src/main/java/org/rocksdb/TimedEnv.java @@ -26,7 +26,8 @@ public TimedEnv(final Env baseEnv) { } private static native long createTimedEnv(final long baseEnvHandle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/Transaction.java b/java/src/main/java/org/rocksdb/Transaction.java index a8867b9577c7..096791382beb 100644 --- a/java/src/main/java/org/rocksdb/Transaction.java +++ b/java/src/main/java/org/rocksdb/Transaction.java @@ -2028,106 +2028,92 @@ public long[] getTransactionIds() { private static native void setSnapshot(final long handle); private static native void setSnapshotOnNextOperation(final long handle); - private static native void setSnapshotOnNextOperation(final long handle, - final long transactionNotifierHandle); + private static native void setSnapshotOnNextOperation( + final long handle, final long transactionNotifierHandle); private static native long getSnapshot(final long handle); private static native void clearSnapshot(final long handle); private static native void prepare(final long handle) throws RocksDBException; private static native void commit(final long handle) throws RocksDBException; private static native void rollback(final long handle) throws RocksDBException; private static native void setSavePoint(final long handle) throws RocksDBException; - private static native void rollbackToSavePoint(final long handle) - throws RocksDBException; - private static native byte[] get(final long handle, final long readOptionsHandle, final byte[] key, - final int keyLength, final long columnFamilyHandle) throws RocksDBException; - private static native byte[] get(final long handle, final long readOptionsHandle, final byte[] key, - final int keyLen) throws RocksDBException; - private static native byte[][] multiGet(final long handle, - final long readOptionsHandle, final byte[][] keys, - final long[] columnFamilyHandles) throws RocksDBException; - private static native byte[][] multiGet(final long handle, - final long readOptionsHandle, final byte[][] keys) - throws RocksDBException; + private static native void rollbackToSavePoint(final long handle) throws RocksDBException; + private static native byte[] get(final long handle, final long readOptionsHandle, + final byte[] key, final int keyLength, final long columnFamilyHandle) throws RocksDBException; + private static native byte[] get(final long handle, final long readOptionsHandle, + final byte[] key, final int keyLen) throws RocksDBException; + private static native byte[][] multiGet(final long handle, final long readOptionsHandle, + final byte[][] keys, final long[] columnFamilyHandles) throws RocksDBException; + private static native byte[][] multiGet( + final long handle, final long readOptionsHandle, final byte[][] keys) throws RocksDBException; private static native byte[] getForUpdate(final long handle, final long readOptionsHandle, final byte[] key, final int keyLength, final long columnFamilyHandle, final boolean exclusive, final boolean doValidate) throws RocksDBException; private static native byte[] getForUpdate(final long handle, final long readOptionsHandle, final byte[] key, final int keyLen, final boolean exclusive, final boolean doValidate) throws RocksDBException; - private static native byte[][] multiGetForUpdate(final long handle, - final long readOptionsHandle, final byte[][] keys, - final long[] columnFamilyHandles) throws RocksDBException; - private static native byte[][] multiGetForUpdate(final long handle, - final long readOptionsHandle, final byte[][] keys) - throws RocksDBException; - private static native long getIterator(final long handle, - final long readOptionsHandle); - private static native long getIterator(final long handle, - final long readOptionsHandle, final long columnFamilyHandle); + private static native byte[][] multiGetForUpdate(final long handle, final long readOptionsHandle, + final byte[][] keys, final long[] columnFamilyHandles) throws RocksDBException; + private static native byte[][] multiGetForUpdate( + final long handle, final long readOptionsHandle, final byte[][] keys) throws RocksDBException; + private static native long getIterator(final long handle, final long readOptionsHandle); + private static native long getIterator( + final long handle, final long readOptionsHandle, final long columnFamilyHandle); private static native void put(final long handle, final byte[] key, final int keyLength, final byte[] value, final int valueLength, final long columnFamilyHandle, final boolean assumeTracked) throws RocksDBException; - private static native void put(final long handle, final byte[] key, - final int keyLength, final byte[] value, final int valueLength) - throws RocksDBException; + private static native void put(final long handle, final byte[] key, final int keyLength, + final byte[] value, final int valueLength) throws RocksDBException; private static native void put(final long handle, final byte[][] keys, final int keysLength, final byte[][] values, final int valuesLength, final long columnFamilyHandle, final boolean assumeTracked) throws RocksDBException; - private static native void put(final long handle, final byte[][] keys, - final int keysLength, final byte[][] values, final int valuesLength) - throws RocksDBException; + private static native void put(final long handle, final byte[][] keys, final int keysLength, + final byte[][] values, final int valuesLength) throws RocksDBException; private static native void merge(final long handle, final byte[] key, final int keyLength, final byte[] value, final int valueLength, final long columnFamilyHandle, final boolean assumeTracked) throws RocksDBException; - private static native void merge(final long handle, final byte[] key, - final int keyLength, final byte[] value, final int valueLength) - throws RocksDBException; + private static native void merge(final long handle, final byte[] key, final int keyLength, + final byte[] value, final int valueLength) throws RocksDBException; private static native void delete(final long handle, final byte[] key, final int keyLength, final long columnFamilyHandle, final boolean assumeTracked) throws RocksDBException; - private static native void delete(final long handle, final byte[] key, - final int keyLength) throws RocksDBException; + private static native void delete(final long handle, final byte[] key, final int keyLength) + throws RocksDBException; private static native void delete(final long handle, final byte[][] keys, final int keysLength, final long columnFamilyHandle, final boolean assumeTracked) throws RocksDBException; - private static native void delete(final long handle, final byte[][] keys, - final int keysLength) throws RocksDBException; + private static native void delete(final long handle, final byte[][] keys, final int keysLength) + throws RocksDBException; private static native void singleDelete(final long handle, final byte[] key, final int keyLength, final long columnFamilyHandle, final boolean assumeTracked) throws RocksDBException; - private static native void singleDelete(final long handle, final byte[] key, - final int keyLength) throws RocksDBException; - private static native void singleDelete(final long handle, final byte[][] keys, final int keysLength, - final long columnFamilyHandle, final boolean assumeTracked) throws RocksDBException; + private static native void singleDelete(final long handle, final byte[] key, final int keyLength) + throws RocksDBException; private static native void singleDelete(final long handle, final byte[][] keys, - final int keysLength) throws RocksDBException; - private static native void putUntracked(final long handle, final byte[] key, - final int keyLength, final byte[] value, final int valueLength, - final long columnFamilyHandle) throws RocksDBException; - private static native void putUntracked(final long handle, final byte[] key, - final int keyLength, final byte[] value, final int valueLength) + final int keysLength, final long columnFamilyHandle, final boolean assumeTracked) + throws RocksDBException; + private static native void singleDelete( + final long handle, final byte[][] keys, final int keysLength) throws RocksDBException; + private static native void putUntracked(final long handle, final byte[] key, final int keyLength, + final byte[] value, final int valueLength, final long columnFamilyHandle) throws RocksDBException; + private static native void putUntracked(final long handle, final byte[] key, final int keyLength, + final byte[] value, final int valueLength) throws RocksDBException; private static native void putUntracked(final long handle, final byte[][] keys, final int keysLength, final byte[][] values, final int valuesLength, final long columnFamilyHandle) throws RocksDBException; private static native void putUntracked(final long handle, final byte[][] keys, - final int keysLength, final byte[][] values, final int valuesLength) - throws RocksDBException; + final int keysLength, final byte[][] values, final int valuesLength) throws RocksDBException; private static native void mergeUntracked(final long handle, final byte[] key, - final int keyLength, final byte[] value, final int valueLength, - final long columnFamilyHandle) throws RocksDBException; - private static native void mergeUntracked(final long handle, final byte[] key, - final int keyLength, final byte[] value, final int valueLength) - throws RocksDBException; - private static native void deleteUntracked(final long handle, final byte[] key, - final int keyLength, final long columnFamilyHandle) + final int keyLength, final byte[] value, final int valueLength, final long columnFamilyHandle) throws RocksDBException; + private static native void mergeUntracked(final long handle, final byte[] key, + final int keyLength, final byte[] value, final int valueLength) throws RocksDBException; private static native void deleteUntracked(final long handle, final byte[] key, - final int keyLength) throws RocksDBException; - private static native void deleteUntracked(final long handle, final byte[][] keys, - final int keysLength, final long columnFamilyHandle) - throws RocksDBException; + final int keyLength, final long columnFamilyHandle) throws RocksDBException; + private static native void deleteUntracked( + final long handle, final byte[] key, final int keyLength) throws RocksDBException; private static native void deleteUntracked(final long handle, final byte[][] keys, - final int keysLength) throws RocksDBException; - private static native void putLogData(final long handle, final byte[] blob, - final int blobLength); + final int keysLength, final long columnFamilyHandle) throws RocksDBException; + private static native void deleteUntracked( + final long handle, final byte[][] keys, final int keysLength) throws RocksDBException; + private static native void putLogData(final long handle, final byte[] blob, final int blobLength); private static native void disableIndexing(final long handle); private static native void enableIndexing(final long handle); private static native long getNumKeys(final long handle); @@ -2138,19 +2124,17 @@ private static native void putLogData(final long handle, final byte[] blob, private static native long getWriteBatch(final long handle); private static native void setLockTimeout(final long handle, final long lockTimeout); private static native long getWriteOptions(final long handle); - private static native void setWriteOptions(final long handle, - final long writeOptionsHandle); - private static native void undoGetForUpdate(final long handle, final byte[] key, - final int keyLength, final long columnFamilyHandle); - private static native void undoGetForUpdate(final long handle, final byte[] key, - final int keyLength); - private static native void rebuildFromWriteBatch(final long handle, - final long writeBatchHandle) throws RocksDBException; + private static native void setWriteOptions(final long handle, final long writeOptionsHandle); + private static native void undoGetForUpdate( + final long handle, final byte[] key, final int keyLength, final long columnFamilyHandle); + private static native void undoGetForUpdate( + final long handle, final byte[] key, final int keyLength); + private static native void rebuildFromWriteBatch(final long handle, final long writeBatchHandle) + throws RocksDBException; private static native long getCommitTimeWriteBatch(final long handle); private static native void setLogNumber(final long handle, final long logNumber); private static native long getLogNumber(final long handle); - private static native void setName(final long handle, final String name) - throws RocksDBException; + private static native void setName(final long handle, final String name) throws RocksDBException; private static native String getName(final long handle); private static native long getID(final long handle); private static native boolean isDeadlockDetect(final long handle); diff --git a/java/src/main/java/org/rocksdb/TransactionDB.java b/java/src/main/java/org/rocksdb/TransactionDB.java index 5377d6324980..727e6243bb10 100644 --- a/java/src/main/java/org/rocksdb/TransactionDB.java +++ b/java/src/main/java/org/rocksdb/TransactionDB.java @@ -372,7 +372,8 @@ private void storeTransactionDbOptions( this.transactionDbOptions_ = transactionDbOptions; } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -384,21 +385,17 @@ private static native long[] open(final long dbOptionsHandle, final long transactionDbOptionsHandle, final String path, final byte[][] columnFamilyNames, final long[] columnFamilyOptions); private static native void closeDatabase(final long handle) throws RocksDBException; - private static native long beginTransaction(final long handle, - final long writeOptionsHandle); - private static native long beginTransaction(final long handle, - final long writeOptionsHandle, final long transactionOptionsHandle); - private static native long beginTransaction_withOld(final long handle, - final long writeOptionsHandle, final long oldTransactionHandle); + private static native long beginTransaction(final long handle, final long writeOptionsHandle); + private static native long beginTransaction( + final long handle, final long writeOptionsHandle, final long transactionOptionsHandle); + private static native long beginTransaction_withOld( + final long handle, final long writeOptionsHandle, final long oldTransactionHandle); private static native long beginTransaction_withOld(final long handle, final long writeOptionsHandle, final long transactionOptionsHandle, final long oldTransactionHandle); - private static native long getTransactionByName(final long handle, - final String name); + private static native long getTransactionByName(final long handle, final String name); private static native long[] getAllPreparedTransactions(final long handle); - private static native Map getLockStatusData( - final long handle); + private static native Map getLockStatusData(final long handle); private static native DeadlockPath[] getDeadlockInfoBuffer(final long handle); - private static native void setDeadlockInfoBufferSize(final long handle, - final int targetSize); + private static native void setDeadlockInfoBufferSize(final long handle, final int targetSize); } diff --git a/java/src/main/java/org/rocksdb/TransactionDBOptions.java b/java/src/main/java/org/rocksdb/TransactionDBOptions.java index 6fd7ad41cc45..8257d50f7a60 100644 --- a/java/src/main/java/org/rocksdb/TransactionDBOptions.java +++ b/java/src/main/java/org/rocksdb/TransactionDBOptions.java @@ -200,19 +200,19 @@ public TransactionDBOptions setWritePolicy( private static native long newTransactionDBOptions(); private static native long getMaxNumLocks(final long handle); - private static native void setMaxNumLocks(final long handle, - final long maxNumLocks); + private static native void setMaxNumLocks(final long handle, final long maxNumLocks); private static native long getNumStripes(final long handle); private static native void setNumStripes(final long handle, final long numStripes); private static native long getTransactionLockTimeout(final long handle); - private static native void setTransactionLockTimeout(final long handle, - final long transactionLockTimeout); + private static native void setTransactionLockTimeout( + final long handle, final long transactionLockTimeout); private static native long getDefaultLockTimeout(final long handle); - private static native void setDefaultLockTimeout(final long handle, - final long transactionLockTimeout); + private static native void setDefaultLockTimeout( + final long handle, final long transactionLockTimeout); private static native byte getWritePolicy(final long handle); private static native void setWritePolicy(final long handle, final byte writePolicy); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/TransactionLogIterator.java b/java/src/main/java/org/rocksdb/TransactionLogIterator.java index 1992241976b8..c32241bcd66d 100644 --- a/java/src/main/java/org/rocksdb/TransactionLogIterator.java +++ b/java/src/main/java/org/rocksdb/TransactionLogIterator.java @@ -103,13 +103,13 @@ public WriteBatch writeBatch() { private final WriteBatch writeBatch_; } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); private static native boolean isValid(long handle); private static native void next(long handle); - private static native void status(long handle) - throws RocksDBException; + private static native void status(long handle) throws RocksDBException; private static native BatchResult getBatch(long handle); } diff --git a/java/src/main/java/org/rocksdb/TransactionOptions.java b/java/src/main/java/org/rocksdb/TransactionOptions.java index 3ece7826cec6..d2efeb87ce4a 100644 --- a/java/src/main/java/org/rocksdb/TransactionOptions.java +++ b/java/src/main/java/org/rocksdb/TransactionOptions.java @@ -170,22 +170,20 @@ public TransactionOptions setMaxWriteBatchSize(final long maxWriteBatchSize) { private static native long newTransactionOptions(); private static native boolean isSetSnapshot(final long handle); - private static native void setSetSnapshot(final long handle, - final boolean setSnapshot); + private static native void setSetSnapshot(final long handle, final boolean setSnapshot); private static native boolean isDeadlockDetect(final long handle); - private static native void setDeadlockDetect(final long handle, - final boolean deadlockDetect); + private static native void setDeadlockDetect(final long handle, final boolean deadlockDetect); private static native long getLockTimeout(final long handle); private static native void setLockTimeout(final long handle, final long lockTimeout); private static native long getExpiration(final long handle); private static native void setExpiration(final long handle, final long expiration); private static native long getDeadlockDetectDepth(final long handle); - private static native void setDeadlockDetectDepth(final long handle, - final long deadlockDetectDepth); + private static native void setDeadlockDetectDepth( + final long handle, final long deadlockDetectDepth); private static native long getMaxWriteBatchSize(final long handle); - private static native void setMaxWriteBatchSize(final long handle, - final long maxWriteBatchSize); - @Override protected final void disposeInternal(final long handle) { + private static native void setMaxWriteBatchSize(final long handle, final long maxWriteBatchSize); + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); diff --git a/java/src/main/java/org/rocksdb/TtlDB.java b/java/src/main/java/org/rocksdb/TtlDB.java index 876034a96e3a..4e395d1a473f 100644 --- a/java/src/main/java/org/rocksdb/TtlDB.java +++ b/java/src/main/java/org/rocksdb/TtlDB.java @@ -228,7 +228,8 @@ protected TtlDB(final long nativeHandle) { super(nativeHandle); } - @Override protected void disposeInternal(final long handle) { + @Override + protected void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -238,8 +239,8 @@ private static native long open(final long optionsHandle, final String db_path, private static native long[] openCF(final long optionsHandle, final String db_path, final byte[][] columnFamilyNames, final long[] columnFamilyOptions, final int[] ttlValues, final boolean readOnly) throws RocksDBException; - private static native long createColumnFamilyWithTtl(final long handle, - final byte[] columnFamilyName, final long columnFamilyOptions, int ttl) + private static native long createColumnFamilyWithTtl( + final long handle, final byte[] columnFamilyName, final long columnFamilyOptions, int ttl) throws RocksDBException; private static native void closeDatabase(final long handle) throws RocksDBException; } diff --git a/java/src/main/java/org/rocksdb/UInt64AddOperator.java b/java/src/main/java/org/rocksdb/UInt64AddOperator.java index e81fbe1977fe..536ba58d8352 100644 --- a/java/src/main/java/org/rocksdb/UInt64AddOperator.java +++ b/java/src/main/java/org/rocksdb/UInt64AddOperator.java @@ -15,8 +15,9 @@ public UInt64AddOperator() { } private static native long newSharedUInt64AddOperator(); - @Override protected final void disposeInternal(final long handle) { - disposeInternalJni(handle); + @Override + protected final void disposeInternal(final long handle) { + disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); } diff --git a/java/src/main/java/org/rocksdb/WBWIRocksIterator.java b/java/src/main/java/org/rocksdb/WBWIRocksIterator.java index 66945ae98087..2ac9d5262b3f 100644 --- a/java/src/main/java/org/rocksdb/WBWIRocksIterator.java +++ b/java/src/main/java/org/rocksdb/WBWIRocksIterator.java @@ -40,74 +40,84 @@ public WriteEntry entry() { return entry; } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - @Override final boolean isValid0(long handle) { + @Override + final boolean isValid0(long handle) { return isValid0Jni(handle); } private static native boolean isValid0Jni(long handle); - @Override final void seekToFirst0(long handle){ + @Override + final void seekToFirst0(long handle) { seekToFirst0Jni(handle); } private static native void seekToFirst0Jni(long handle); - @Override final void seekToLast0(long handle) { + @Override + final void seekToLast0(long handle) { seekToLast0Jni(handle); } private static native void seekToLast0Jni(long handle); - @Override final void next0(long handle) { + @Override + final void next0(long handle) { next0Jni(handle); } private static native void next0Jni(long handle); - @Override final void prev0(long handle) { + @Override + final void prev0(long handle) { prev0Jni(handle); } private static native void prev0Jni(long handle); - @Override final void refresh0(final long handle) throws RocksDBException { + @Override + final void refresh0(final long handle) throws RocksDBException { refresh0Jni(handle); } private static native void refresh0Jni(final long handle) throws RocksDBException; - @Override final void seek0(long handle, byte[] target, int targetLen) { + @Override + final void seek0(long handle, byte[] target, int targetLen) { seek0Jni(handle, target, targetLen); } private static native void seek0Jni(long handle, byte[] target, int targetLen); - @Override final void seekForPrev0(long handle, byte[] target, int targetLen) { + @Override + final void seekForPrev0(long handle, byte[] target, int targetLen) { seekForPrev0Jni(handle, target, targetLen); } private static native void seekForPrev0Jni(long handle, byte[] target, int targetLen); - @Override final void status0(long handle) throws RocksDBException { + @Override + final void status0(long handle) throws RocksDBException { status0Jni(handle); } private static native void status0Jni(long handle) throws RocksDBException; @Override final void seekDirect0( final long handle, final ByteBuffer target, final int targetOffset, final int targetLen) { - seekDirect0Jni(handle,target, targetOffset, targetLen); + seekDirect0Jni(handle, target, targetOffset, targetLen); } private static native void seekDirect0Jni( - final long handle, final ByteBuffer target, final int targetOffset, final int targetLen); + final long handle, final ByteBuffer target, final int targetOffset, final int targetLen); @Override final void seekForPrevDirect0( final long handle, final ByteBuffer target, final int targetOffset, final int targetLen) { seekForPrevDirect0Jni(handle, target, targetOffset, targetLen); } private static native void seekForPrevDirect0Jni( - final long handle, final ByteBuffer target, final int targetOffset, final int targetLen); + final long handle, final ByteBuffer target, final int targetOffset, final int targetLen); @Override final void seekByteArray0( final long handle, final byte[] target, final int targetOffset, final int targetLen) { seekByteArray0Jni(handle, target, targetOffset, targetLen); } private static native void seekByteArray0Jni( - final long handle, final byte[] target, final int targetOffset, final int targetLen); + final long handle, final byte[] target, final int targetOffset, final int targetLen); @Override final void seekForPrevByteArray0( final long handle, final byte[] target, final int targetOffset, final int targetLen) { seekForPrevByteArray0Jni(handle, target, targetOffset, targetLen); } private static native void seekForPrevByteArray0Jni( - final long handle, final byte[] target, final int targetOffset, final int targetLen); + final long handle, final byte[] target, final int targetOffset, final int targetLen); private static native long[] entry1(final long handle); diff --git a/java/src/main/java/org/rocksdb/WriteBatch.java b/java/src/main/java/org/rocksdb/WriteBatch.java index 1fa5de6bbf8d..1802d929c226 100644 --- a/java/src/main/java/org/rocksdb/WriteBatch.java +++ b/java/src/main/java/org/rocksdb/WriteBatch.java @@ -218,34 +218,35 @@ WriteBatch getWriteBatch(final long handle) { disOwnNativeHandle(); } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - @Override final int count0(final long handle) { + @Override + final int count0(final long handle) { return count0Jni(handle); } private static native int count0Jni(final long handle); - @Override final void put(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen) { + @Override + final void put(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen) { putJni(handle, key, keyLen, value, valueLen); } - private static native void putJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen); + private static native void putJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen); - @Override final void put(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle) { + @Override + final void put(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen, final long cfHandle) { putJni(handle, key, keyLen, value, valueLen, cfHandle); } - private static native void putJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle); - + private static native void putJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen, final long cfHandle); @Override final void putDirect(final long handle, final ByteBuffer key, final int keyOffset, @@ -254,55 +255,58 @@ final void putDirect(final long handle, final ByteBuffer key, final int keyOffse putDirectJni(handle, key, keyOffset, keyLength, value, valueOffset, valueLength, cfHandle); } - private static native void putDirectJni(final long handle, final ByteBuffer key, final int keyOffset, - final int keyLength, final ByteBuffer value, final int valueOffset, final int valueLength, - final long cfHandle); + private static native void putDirectJni(final long handle, final ByteBuffer key, + final int keyOffset, final int keyLength, final ByteBuffer value, final int valueOffset, + final int valueLength, final long cfHandle); - @Override final void merge(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen) { + @Override + final void merge(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen) { mergeJni(handle, key, keyLen, value, valueLen); } - private static native void mergeJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen); + private static native void mergeJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen); - @Override final void merge(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle) { + @Override + final void merge(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen, final long cfHandle) { mergeJni(handle, key, keyLen, value, valueLen, cfHandle); } - private static native void mergeJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle); + private static native void mergeJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen, final long cfHandle); - @Override final void delete(final long handle, final byte[] key, - final int keyLen) throws RocksDBException { + @Override + final void delete(final long handle, final byte[] key, final int keyLen) throws RocksDBException { deleteJni(handle, key, keyLen); } - private static native void deleteJni(final long handle, final byte[] key, - final int keyLen) throws RocksDBException; + private static native void deleteJni(final long handle, final byte[] key, final int keyLen) + throws RocksDBException; - @Override final void delete(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException { + @Override + final void delete(final long handle, final byte[] key, final int keyLen, final long cfHandle) + throws RocksDBException { deleteJni(handle, key, keyLen, cfHandle); } - private static native void deleteJni(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException; - @Override final void singleDelete(final long handle, final byte[] key, - final int keyLen) throws RocksDBException { + private static native void deleteJni(final long handle, final byte[] key, final int keyLen, + final long cfHandle) throws RocksDBException; + @Override + final void singleDelete(final long handle, final byte[] key, final int keyLen) + throws RocksDBException { singleDeleteJni(handle, key, keyLen); } - private static native void singleDeleteJni(final long handle, final byte[] key, - final int keyLen) throws RocksDBException; + private static native void singleDeleteJni(final long handle, final byte[] key, final int keyLen) + throws RocksDBException; - @Override final void singleDelete(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException { + @Override + final void singleDelete(final long handle, final byte[] key, final int keyLen, + final long cfHandle) throws RocksDBException { singleDeleteJni(handle, key, keyLen, cfHandle); } - private static native void singleDeleteJni(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException; + private static native void singleDeleteJni(final long handle, final byte[] key, final int keyLen, + final long cfHandle) throws RocksDBException; @Override final void deleteDirect(final long handle, final ByteBuffer key, final int keyOffset, @@ -310,76 +314,79 @@ final void deleteDirect(final long handle, final ByteBuffer key, final int keyOf deleteDirectJni(handle, key, keyOffset, keyLength, cfHandle); } - private static native void deleteDirectJni(final long handle, final ByteBuffer key, final int keyOffset, - final int keyLength, final long cfHandle) throws RocksDBException; + private static native void deleteDirectJni(final long handle, final ByteBuffer key, + final int keyOffset, final int keyLength, final long cfHandle) throws RocksDBException; @Override final void deleteRange(final long handle, final byte[] beginKey, final int beginKeyLen, final byte[] endKey, final int endKeyLen) { deleteRangeJni(handle, beginKey, beginKeyLen, endKey, endKeyLen); } - private static native void deleteRangeJni(final long handle, final byte[] beginKey, final int beginKeyLen, - final byte[] endKey, final int endKeyLen); + private static native void deleteRangeJni(final long handle, final byte[] beginKey, + final int beginKeyLen, final byte[] endKey, final int endKeyLen); @Override final void deleteRange(final long handle, final byte[] beginKey, final int beginKeyLen, final byte[] endKey, final int endKeyLen, final long cfHandle) { deleteRangeJni(handle, beginKey, beginKeyLen, endKey, endKeyLen, cfHandle); } - private static native void deleteRangeJni(final long handle, final byte[] beginKey, final int beginKeyLen, - final byte[] endKey, final int endKeyLen, final long cfHandle); + private static native void deleteRangeJni(final long handle, final byte[] beginKey, + final int beginKeyLen, final byte[] endKey, final int endKeyLen, final long cfHandle); - @Override final void putLogData(final long handle, - final byte[] blob, final int blobLen) throws RocksDBException { + @Override + final void putLogData(final long handle, final byte[] blob, final int blobLen) + throws RocksDBException { putLogDataJni(handle, blob, blobLen); } - private static native void putLogDataJni(final long handle, - final byte[] blob, final int blobLen) throws RocksDBException; - + private static native void putLogDataJni(final long handle, final byte[] blob, final int blobLen) + throws RocksDBException; - @Override final void clear0(final long handle) { + @Override + final void clear0(final long handle) { clear0Jni(handle); } private static native void clear0Jni(final long handle); - @Override final void setSavePoint0(final long handle) { + @Override + final void setSavePoint0(final long handle) { setSavePoint0Jni(handle); } private static native void setSavePoint0Jni(final long handle); - @Override final void rollbackToSavePoint0(final long handle) { + @Override + final void rollbackToSavePoint0(final long handle) { rollbackToSavePoint0Jni(handle); } private static native void rollbackToSavePoint0Jni(final long handle); - @Override final void popSavePoint(final long handle) throws RocksDBException { + @Override + final void popSavePoint(final long handle) throws RocksDBException { popSavePointJni(handle); } private static native void popSavePointJni(final long handle) throws RocksDBException; - @Override final void setMaxBytes(final long nativeHandle, - final long maxBytes) { + @Override + final void setMaxBytes(final long nativeHandle, final long maxBytes) { setMaxBytesJni(nativeHandle, maxBytes); } - private static native void setMaxBytesJni(final long nativeHandle, - final long maxBytes); + private static native void setMaxBytesJni(final long nativeHandle, final long maxBytes); private static native long newWriteBatch(final int reserved_bytes); private static native long newWriteBatch(final byte[] serialized, final int serializedLength); - private static native void iterate(final long handle, final long handlerHandle) + private static native void iterate(final long handle, final long handlerHandle) throws RocksDBException; - private static native byte[] data(final long nativeHandle) throws RocksDBException; - private static native long getDataSize(final long nativeHandle); - private static native boolean hasPut(final long nativeHandle); - private static native boolean hasDelete(final long nativeHandle); - private static native boolean hasSingleDelete(final long nativeHandle); - private static native boolean hasDeleteRange(final long nativeHandle); - private static native boolean hasMerge(final long nativeHandle); - private static native boolean hasBeginPrepare(final long nativeHandle); - private static native boolean hasEndPrepare(final long nativeHandle); - private static native boolean hasCommit(final long nativeHandle); - private static native boolean hasRollback(final long nativeHandle); - private static native void markWalTerminationPoint(final long nativeHandle); - private static native SavePoint getWalTerminationPoint(final long nativeHandle); + private static native byte[] data(final long nativeHandle) throws RocksDBException; + private static native long getDataSize(final long nativeHandle); + private static native boolean hasPut(final long nativeHandle); + private static native boolean hasDelete(final long nativeHandle); + private static native boolean hasSingleDelete(final long nativeHandle); + private static native boolean hasDeleteRange(final long nativeHandle); + private static native boolean hasMerge(final long nativeHandle); + private static native boolean hasBeginPrepare(final long nativeHandle); + private static native boolean hasEndPrepare(final long nativeHandle); + private static native boolean hasCommit(final long nativeHandle); + private static native boolean hasRollback(final long nativeHandle); + private static native void markWalTerminationPoint(final long nativeHandle); + private static native SavePoint getWalTerminationPoint(final long nativeHandle); /** * Handler callback for iterating over the contents of a batch. diff --git a/java/src/main/java/org/rocksdb/WriteBatchWithIndex.java b/java/src/main/java/org/rocksdb/WriteBatchWithIndex.java index 68a775803835..a9267bb40f83 100644 --- a/java/src/main/java/org/rocksdb/WriteBatchWithIndex.java +++ b/java/src/main/java/org/rocksdb/WriteBatchWithIndex.java @@ -292,32 +292,34 @@ public byte[] getFromBatchAndDB(final RocksDB db, final ReadOptions options, options.nativeHandle_, key, key.length); } - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); - @Override final int count0(final long handle) { + @Override + final int count0(final long handle) { return count0Jni(handle); } private static native int count0Jni(final long handle); - @Override final void put(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen) { + @Override + final void put(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen) { putJni(handle, key, keyLen, value, valueLen); } - private static native void putJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen); + private static native void putJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen); - @Override final void put(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle) { + @Override + final void put(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen, final long cfHandle) { putJni(handle, key, keyLen, value, valueLen, cfHandle); } - private static native void putJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle); + private static native void putJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen, final long cfHandle); @Override final void putDirect(final long handle, final ByteBuffer key, final int keyOffset, @@ -326,57 +328,60 @@ final void putDirect(final long handle, final ByteBuffer key, final int keyOffse putDirectJni(handle, key, keyOffset, keyLength, value, valueOffset, valueLength, cfHandle); } - private static native void putDirectJni(final long handle, final ByteBuffer key, final int keyOffset, - final int keyLength, final ByteBuffer value, final int valueOffset, final int valueLength, - final long cfHandle); + private static native void putDirectJni(final long handle, final ByteBuffer key, + final int keyOffset, final int keyLength, final ByteBuffer value, final int valueOffset, + final int valueLength, final long cfHandle); - @Override final void merge(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen) { + @Override + final void merge(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen) { mergeJni(handle, key, keyLen, value, valueLen); } - private static native void mergeJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen); + private static native void mergeJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen); - @Override final void merge(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle) { + @Override + final void merge(final long handle, final byte[] key, final int keyLen, final byte[] value, + final int valueLen, final long cfHandle) { mergeJni(handle, key, keyLen, value, valueLen, cfHandle); } - private static native void mergeJni(final long handle, final byte[] key, - final int keyLen, final byte[] value, final int valueLen, - final long cfHandle); - @Override final void delete(final long handle, final byte[] key, - final int keyLen) throws RocksDBException { + private static native void mergeJni(final long handle, final byte[] key, final int keyLen, + final byte[] value, final int valueLen, final long cfHandle); + @Override + final void delete(final long handle, final byte[] key, final int keyLen) throws RocksDBException { deleteJni(handle, key, keyLen); } - private static native void deleteJni(final long handle, final byte[] key, - final int keyLen) throws RocksDBException; + private static native void deleteJni(final long handle, final byte[] key, final int keyLen) + throws RocksDBException; - @Override final void delete(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException { + @Override + final void delete(final long handle, final byte[] key, final int keyLen, final long cfHandle) + throws RocksDBException { deleteJni(handle, key, keyLen, cfHandle); } - private static native void deleteJni(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException; + private static native void deleteJni(final long handle, final byte[] key, final int keyLen, + final long cfHandle) throws RocksDBException; - @Override final void singleDelete(final long handle, final byte[] key, - final int keyLen) throws RocksDBException { + @Override + final void singleDelete(final long handle, final byte[] key, final int keyLen) + throws RocksDBException { singleDeleteJni(handle, key, keyLen); } - private static native void singleDeleteJni(final long handle, final byte[] key, - final int keyLen) throws RocksDBException; + private static native void singleDeleteJni(final long handle, final byte[] key, final int keyLen) + throws RocksDBException; - @Override final void singleDelete(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException { + @Override + final void singleDelete(final long handle, final byte[] key, final int keyLen, + final long cfHandle) throws RocksDBException { singleDeleteJni(handle, key, keyLen, cfHandle); } - private static native void singleDeleteJni(final long handle, final byte[] key, - final int keyLen, final long cfHandle) throws RocksDBException; + private static native void singleDeleteJni(final long handle, final byte[] key, final int keyLen, + final long cfHandle) throws RocksDBException; @Override final void deleteDirect(final long handle, final ByteBuffer key, final int keyOffset, @@ -384,9 +389,8 @@ final void deleteDirect(final long handle, final ByteBuffer key, final int keyOf deleteDirectJni(handle, key, keyOffset, keyLength, cfHandle); } - private static native void deleteDirectJni(final long handle, final ByteBuffer key, final int keyOffset, - final int keyLength, final long cfHandle) throws RocksDBException; - + private static native void deleteDirectJni(final long handle, final ByteBuffer key, + final int keyOffset, final int keyLength, final long cfHandle) throws RocksDBException; // DO NOT USE - `WriteBatchWithIndex::deleteRange` is not yet supported @Override @@ -395,8 +399,8 @@ final void deleteRange(final long handle, final byte[] beginKey, final int begin deleteRangeJni(handle, beginKey, beginKeyLen, endKey, endKeyLen); } - private static native void deleteRangeJni(final long handle, final byte[] beginKey, final int beginKeyLen, - final byte[] endKey, final int endKeyLen); + private static native void deleteRangeJni(final long handle, final byte[] beginKey, + final int beginKeyLen, final byte[] endKey, final int endKeyLen); // DO NOT USE - `WriteBatchWithIndex::deleteRange` is not yet supported @Override @@ -405,47 +409,52 @@ final void deleteRange(final long handle, final byte[] beginKey, final int begin deleteRangeJni(handle, beginKey, beginKeyLen, endKey, endKeyLen, cfHandle); } - private static native void deleteRangeJni(final long handle, final byte[] beginKey, final int beginKeyLen, - final byte[] endKey, final int endKeyLen, final long cfHandle); + private static native void deleteRangeJni(final long handle, final byte[] beginKey, + final int beginKeyLen, final byte[] endKey, final int endKeyLen, final long cfHandle); - @Override final void putLogData(final long handle, final byte[] blob, - final int blobLen) throws RocksDBException { + @Override + final void putLogData(final long handle, final byte[] blob, final int blobLen) + throws RocksDBException { putLogDataJni(handle, blob, blobLen); } - private static native void putLogDataJni(final long handle, final byte[] blob, - final int blobLen) throws RocksDBException; + private static native void putLogDataJni(final long handle, final byte[] blob, final int blobLen) + throws RocksDBException; - @Override final void clear0(final long handle) { + @Override + final void clear0(final long handle) { clear0Jni(handle); } private static native void clear0Jni(final long handle); - @Override final void setSavePoint0(final long handle) { + @Override + final void setSavePoint0(final long handle) { setSavePoint0Jni(handle); } private static native void setSavePoint0Jni(final long handle); - @Override final void rollbackToSavePoint0(final long handle) { + @Override + final void rollbackToSavePoint0(final long handle) { rollbackToSavePoint0Jni(handle); } private static native void rollbackToSavePoint0Jni(final long handle); - @Override final void popSavePoint(final long handle) throws RocksDBException { + @Override + final void popSavePoint(final long handle) throws RocksDBException { popSavePointJni(handle); } private static native void popSavePointJni(final long handle) throws RocksDBException; - @Override final void setMaxBytes(final long nativeHandle, - final long maxBytes) { + @Override + final void setMaxBytes(final long nativeHandle, final long maxBytes) { setMaxBytesJni(nativeHandle, maxBytes); } - private static native void setMaxBytesJni(final long nativeHandle, - final long maxBytes); + private static native void setMaxBytesJni(final long nativeHandle, final long maxBytes); - @Override final WriteBatch getWriteBatch(final long handle) { + @Override + final WriteBatch getWriteBatch(final long handle) { return getWriteBatchJni(handle); } @@ -459,14 +468,12 @@ private static native long newWriteBatchWithIndex(final long fallbackIndexCompar private static native long iterator1(final long handle, final long cfHandle); private static native long iteratorWithBase(final long handle, final long cfHandle, final long baseIteratorHandle, final long readOptionsHandle); - private static native byte[] getFromBatch(final long handle, final long optHandle, - final byte[] key, final int keyLen); + private static native byte[] getFromBatch( + final long handle, final long optHandle, final byte[] key, final int keyLen); private static native byte[] getFromBatch(final long handle, final long optHandle, final byte[] key, final int keyLen, final long cfHandle); - private static native byte[] getFromBatchAndDB(final long handle, - final long dbHandle, final long readOptHandle, final byte[] key, - final int keyLen); - private static native byte[] getFromBatchAndDB(final long handle, - final long dbHandle, final long readOptHandle, final byte[] key, - final int keyLen, final long cfHandle); + private static native byte[] getFromBatchAndDB(final long handle, final long dbHandle, + final long readOptHandle, final byte[] key, final int keyLen); + private static native byte[] getFromBatchAndDB(final long handle, final long dbHandle, + final long readOptHandle, final byte[] key, final int keyLen, final long cfHandle); } diff --git a/java/src/main/java/org/rocksdb/WriteOptions.java b/java/src/main/java/org/rocksdb/WriteOptions.java index 5b66d095d7e1..571cdb100f5a 100644 --- a/java/src/main/java/org/rocksdb/WriteOptions.java +++ b/java/src/main/java/org/rocksdb/WriteOptions.java @@ -235,7 +235,8 @@ public WriteOptions setMemtableInsertHintPerBatch(final boolean memtableInsertHi private static native long newWriteOptions(); private static native long copyWriteOptions(long handle); - @Override protected final void disposeInternal(final long handle) { + @Override + protected final void disposeInternal(final long handle) { disposeInternalJni(handle); } private static native void disposeInternalJni(final long handle); @@ -244,11 +245,10 @@ public WriteOptions setMemtableInsertHintPerBatch(final boolean memtableInsertHi private static native boolean sync(long handle); private static native void setDisableWAL(long handle, boolean flag); private static native boolean disableWAL(long handle); - private static native void setIgnoreMissingColumnFamilies(final long handle, - final boolean ignoreMissingColumnFamilies); + private static native void setIgnoreMissingColumnFamilies( + final long handle, final boolean ignoreMissingColumnFamilies); private static native boolean ignoreMissingColumnFamilies(final long handle); - private static native void setNoSlowdown(final long handle, - final boolean noSlowdown); + private static native void setNoSlowdown(final long handle, final boolean noSlowdown); private static native boolean noSlowdown(final long handle); private static native void setLowPri(final long handle, final boolean lowPri); private static native boolean lowPri(final long handle);