Fix formatting errors

main
Ankit Gupta 11 years ago
parent c990a7645a
commit 22d45de2ed
  1. 29
      java/org/rocksdb/Options.java
  2. 18
      java/rocksjni/options.cc

@ -34,7 +34,7 @@ public class Options {
* @see RocksDB::Open()
*/
public void setCreateIfMissing(boolean flag) {
checkInitialization();
assert(isInitialized());
setCreateIfMissing(nativeHandle_, flag);
}
@ -46,7 +46,7 @@ public class Options {
* @see setCreateIfMissing()
*/
public boolean createIfMissing() {
checkInitialization();
assert(isInitialized());
return createIfMissing(nativeHandle_);
}
@ -67,7 +67,7 @@ public class Options {
* @see RocksDB::Open()
*/
public void setWriteBufferSize(int writeBufferSize) {
checkInitialization();
assert(isInitialized());
setWriteBufferSize(nativeHandle_, writeBufferSize);
}
@ -78,7 +78,7 @@ public class Options {
* @see setWriteBufferSize()
*/
public int writeBufferSize() {
checkInitialization();
assert(isInitialized());
return writeBufferSize(nativeHandle_);
}
@ -92,7 +92,7 @@ public class Options {
* @see RocksDB::Open()
*/
public void setMaxWriteBufferNumber(int maxWriteBufferNumber) {
checkInitialization();
assert(isInitialized());
setMaxWriteBufferNumber(nativeHandle_, maxWriteBufferNumber);
}
@ -103,7 +103,7 @@ public class Options {
* @see setMaxWriteBufferNumber()
*/
public int maxWriteBufferNumber() {
checkInitialization();
assert(isInitialized());
return maxWriteBufferNumber(nativeHandle_);
}
@ -119,7 +119,7 @@ public class Options {
* @see RocksDB::Open()
*/
public void setBlockSize(int blockSize) {
checkInitialization();
assert(isInitialized());
setBlockSize(nativeHandle_, blockSize);
}
@ -130,7 +130,7 @@ public class Options {
* @see setBlockSize()
*/
public int blockSize() {
checkInitialization();
assert(isInitialized());
return blockSize(nativeHandle_);
}
@ -139,12 +139,13 @@ public class Options {
* With bloomfilter and fast storage, a miss on one level
* is very cheap if the file handle is cached in table cache
* (which is true if max_open_files is large).
* Default: true
*
* @param disable seek compaction
* @see RocksDB::Open()
*/
public void setDisableSeekCompaction(boolean disableSeekCompaction) {
checkInitialization();
assert(isInitialized());
setDisableSeekCompaction(nativeHandle_, disableSeekCompaction);
}
@ -155,7 +156,7 @@ public class Options {
* @see setDisableSeekCompaction()
*/
public boolean disableSeekCompaction() {
checkInitialization();
assert(isInitialized());
return disableSeekCompaction(nativeHandle_);
}
@ -168,7 +169,7 @@ public class Options {
* @see RocksDB::Open()
*/
public void setMaxBackgroundCompactions(int maxBackgroundCompactions) {
checkInitialization();
assert(isInitialized());
setMaxBackgroundCompactions(nativeHandle_, maxBackgroundCompactions);
}
@ -179,7 +180,7 @@ public class Options {
* @see setMaxBackgroundCompactions
*/
public int maxBackgroundCompactions() {
checkInitialization();
assert(isInitialized());
return maxBackgroundCompactions(nativeHandle_);
}
@ -193,8 +194,8 @@ public class Options {
}
}
private void checkInitialization() {
assert(nativeHandle_ != 0);
private boolean isInitialized() {
return (nativeHandle_ != 0);
}
private native void newOptions();

@ -87,7 +87,8 @@ jint Java_org_rocksdb_Options_writeBufferSize(
*/
void Java_org_rocksdb_Options_setMaxWriteBufferNumber(
JNIEnv* env, jobject jobj, jlong jhandle, jint jmax_write_buffer_number) {
reinterpret_cast<rocksdb::Options*>(jhandle)->max_write_buffer_number = jmax_write_buffer_number;
reinterpret_cast<rocksdb::Options*>(jhandle)->max_write_buffer_number =
jmax_write_buffer_number;
}
@ -128,8 +129,10 @@ jint Java_org_rocksdb_Options_blockSize(
* Signature: (JZ)V
*/
void Java_org_rocksdb_Options_setDisableSeekCompaction(
JNIEnv* env, jobject jobj, jlong jhandle, jboolean jdisable_seek_compaction) {
reinterpret_cast<rocksdb::Options*>(jhandle)->disable_seek_compaction = jdisable_seek_compaction;
JNIEnv* env, jobject jobj, jlong jhandle,
jboolean jdisable_seek_compaction) {
reinterpret_cast<rocksdb::Options*>(jhandle)->disable_seek_compaction =
jdisable_seek_compaction;
}
/*
@ -148,8 +151,10 @@ jboolean Java_org_rocksdb_Options_disableSeekCompaction(
* Signature: (JI)V
*/
void Java_org_rocksdb_Options_setMaxBackgroundCompactions(
JNIEnv* env, jobject jobj, jlong jhandle, jint jmax_background_compactions) {
reinterpret_cast<rocksdb::Options*>(jhandle)->max_background_compactions = jmax_background_compactions;
JNIEnv* env, jobject jobj, jlong jhandle,
jint jmax_background_compactions) {
reinterpret_cast<rocksdb::Options*>(jhandle)->max_background_compactions =
jmax_background_compactions;
}
/*
@ -159,7 +164,8 @@ void Java_org_rocksdb_Options_setMaxBackgroundCompactions(
*/
jint Java_org_rocksdb_Options_maxBackgroundCompactions(
JNIEnv* env, jobject jobj, jlong jhandle) {
return reinterpret_cast<rocksdb::Options*>(jhandle)->max_background_compactions;
return
reinterpret_cast<rocksdb::Options*>(jhandle)->max_background_compactions;
}

Loading…
Cancel
Save