Skip to content

Commit

Permalink
Fix formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhubner committed Oct 3, 2023
1 parent d2216de commit 24801d2
Show file tree
Hide file tree
Showing 104 changed files with 1,448 additions and 1,654 deletions.
7 changes: 3 additions & 4 deletions java/rocksjni/backup_engine_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::BackupEngineOptions*>(jhandle);
bopt->backup_rate_limit = jbackup_rate_limit;
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::BackupEngineOptions*>(jhandle);
assert(bopt != nullptr);
Expand Down
4 changes: 2 additions & 2 deletions java/rocksjni/backupenginejni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::BackupEngine*>(jbe_handle);
assert(be != nullptr);
delete be;
Expand Down
4 changes: 2 additions & 2 deletions java/rocksjni/checkpoint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::Checkpoint*>(jhandle);
assert(checkpoint != nullptr);
delete checkpoint;
Expand Down
4 changes: 2 additions & 2 deletions java/rocksjni/clock_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::shared_ptr<ROCKSDB_NAMESPACE::Cache>*>(jhandle);
delete sptr_clock_cache; // delete std::shared_ptr
Expand Down
7 changes: 3 additions & 4 deletions java/rocksjni/columnfamilyhandle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::ColumnFamilyHandle*>(jhandle);
const int32_t id = cfh->GetID();
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::ColumnFamilyHandle*>(jhandle);
assert(cfh != nullptr);
delete cfh;
Expand Down
4 changes: 2 additions & 2 deletions java/rocksjni/compact_range_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<Java_org_rocksdb_CompactRangeOptions*>(jhandle);
delete options;
Expand Down
2 changes: 1 addition & 1 deletion java/rocksjni/compaction_job_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::CompactionJobInfo*>(jhandle);
delete compact_job_info;
Expand Down
2 changes: 1 addition & 1 deletion java/rocksjni/compaction_job_stats.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::CompactionJobStats*>(jhandle);
delete compact_job_stats;
Expand Down
2 changes: 1 addition & 1 deletion java/rocksjni/compaction_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::CompactionOptions*>(jhandle);
delete compact_opts;
Expand Down
5 changes: 2 additions & 3 deletions java/rocksjni/compaction_options_fifo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::CompactionOptionsFIFO*>(jhandle);
Expand All @@ -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<ROCKSDB_NAMESPACE::CompactionOptionsFIFO*>(jhandle);
}
3 changes: 1 addition & 2 deletions java/rocksjni/comparator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::ComparatorJniCallback*>(jhandle);
Expand Down
8 changes: 3 additions & 5 deletions java/rocksjni/compression_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::CompressionOptions*>(jhandle);
return static_cast<jint>(opt->level);
}
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::CompressionOptions*>(jhandle);
return static_cast<bool>(opt->use_zstd_dict_trainer);
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::CompressionOptions*>(jhandle);
}
5 changes: 2 additions & 3 deletions java/rocksjni/concurrent_task_limiter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::ConcurrentTaskLimiter>*>(jhandle);
delete ptr; // delete std::shared_ptr
Expand Down
2 changes: 1 addition & 1 deletion java/rocksjni/config_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Signature: (J)V
*/
void Java_org_rocksdb_ConfigOptions_disposeInternalJni(JNIEnv *, jclass,
jlong jhandle) {
jlong jhandle) {
auto *co = reinterpret_cast<ROCKSDB_NAMESPACE::ConfigOptions *>(jhandle);
assert(co != nullptr);
delete co;
Expand Down
7 changes: 3 additions & 4 deletions java/rocksjni/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::Env*>(jhandle);
assert(e != nullptr);
delete e;
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::Env*>(jhandle);
assert(e != nullptr);
delete e;
Expand All @@ -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<ROCKSDB_NAMESPACE::Env*>(jhandle);
assert(e != nullptr);
delete e;
Expand Down
5 changes: 2 additions & 3 deletions java/rocksjni/env_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::EnvOptions *>(jhandle);
assert(eo != nullptr);
delete eo;
Expand Down Expand Up @@ -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<std::shared_ptr<ROCKSDB_NAMESPACE::RateLimiter> *>(
Expand Down
5 changes: 3 additions & 2 deletions java/rocksjni/filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::shared_ptr<const ROCKSDB_NAMESPACE::FilterPolicy>*>(
jhandle);
Expand Down
5 changes: 2 additions & 3 deletions java/rocksjni/ingest_external_file_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::IngestExternalFileOptions*>(jhandle);
delete options;
Expand Down
44 changes: 23 additions & 21 deletions java/rocksjni/iterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle);
assert(it != nullptr);
delete it;
Expand All @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle)->Valid();
}

Expand All @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle)->SeekToFirst();
}

Expand All @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle)->SeekToLast();
}

Expand All @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle)->Next();
}

Expand All @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle)->Prev();
}

Expand All @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle);
ROCKSDB_NAMESPACE::Status s = it->Refresh();

Expand All @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle);
auto seek = [&it](ROCKSDB_NAMESPACE::Slice& target_slice) {
it->Seek(target_slice);
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle);
auto seek = [&it](ROCKSDB_NAMESPACE::Slice& target_slice) {
it->Seek(target_slice);
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle);
auto seek = [&it](ROCKSDB_NAMESPACE::Slice& target_slice) {
it->SeekForPrev(target_slice);
Expand Down Expand Up @@ -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<ROCKSDB_NAMESPACE::Iterator*>(handle);
ROCKSDB_NAMESPACE::Status s = it->status();

Expand Down
4 changes: 2 additions & 2 deletions java/rocksjni/lru_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::shared_ptr<ROCKSDB_NAMESPACE::Cache>*>(jhandle);
delete sptr_lru_cache; // delete std::shared_ptr
Expand Down
Loading

0 comments on commit 24801d2

Please sign in to comment.