diff --git a/java/rocksjni/options.cc b/java/rocksjni/options.cc index 77be507741..596c8ad96b 100644 --- a/java/rocksjni/options.cc +++ b/java/rocksjni/options.cc @@ -8624,20 +8624,20 @@ void Java_org_rocksdb_ReadOptions_setValueSizeSoftLimit( /* * Class: org_rocksdb_ReadOptions - * Method: asyncIO + * Method: asyncIo * Signature: (J)Z */ -jboolean Java_org_rocksdb_ReadOptions_asyncIO(JNIEnv*, jobject, jlong jhandle) { +jboolean Java_org_rocksdb_ReadOptions_asyncIo(JNIEnv*, jobject, jlong jhandle) { auto* opt = reinterpret_cast(jhandle); return static_cast(opt->async_io); } /* * Class: org_rocksdb_ReadOptions - * Method: setAsyncIO + * Method: setAsyncIo * Signature: (JZ)V */ -void Java_org_rocksdb_ReadOptions_setAsyncIO(JNIEnv*, jobject, jlong jhandle, +void Java_org_rocksdb_ReadOptions_setAsyncIo(JNIEnv*, jobject, jlong jhandle, jboolean jasync_io) { auto* opt = reinterpret_cast(jhandle); opt->async_io = static_cast(jasync_io); diff --git a/java/src/main/java/org/rocksdb/ReadOptions.java b/java/src/main/java/org/rocksdb/ReadOptions.java index 274f32d3c3..9d39454acb 100644 --- a/java/src/main/java/org/rocksdb/ReadOptions.java +++ b/java/src/main/java/org/rocksdb/ReadOptions.java @@ -751,8 +751,6 @@ public class ReadOptions extends RocksObject { } /** - * Experimental - *

* If async_io is enabled, RocksDB will prefetch some of data asynchronously. * RocksDB apply it if reads are sequential and its internal automatic * prefetching. @@ -760,24 +758,24 @@ public class ReadOptions extends RocksObject { * Default: false * @return true if async_io is enabled. */ - public boolean asyncIO() { + @Experimental("Caution: this option is experimental") + public boolean asyncIo() { assert (isOwningHandle()); - return asyncIO(nativeHandle_); + return asyncIo(nativeHandle_); } /** - * Experimental - *

* If async_io is enabled, RocksDB will prefetch some of data asynchronously. * RocksDB apply it if reads are sequential and its internal automatic * prefetching. *

- * @param asyncIO async_io enabled or not. + * @param asyncIo async_io enabled or not. * @return the reference to the current ReadOptions. */ - public ReadOptions setAsyncIO(final boolean asyncIO) { + @Experimental("Caution: this option is experimental") + public ReadOptions setAsyncIo(final boolean asyncIo) { assert (isOwningHandle()); - setAsyncIO(nativeHandle_, asyncIO); + setAsyncIo(nativeHandle_, asyncIo); return this; } @@ -848,6 +846,6 @@ public class ReadOptions extends RocksObject { private native void setIoTimeout(final long handle, final long ioTimeout); private native long valueSizeSoftLimit(final long handle); private native void setValueSizeSoftLimit(final long handle, final long softLimit); - private native boolean asyncIO(final long handle); - private native void setAsyncIO(final long handle, final boolean asyncIO); + private native boolean asyncIo(final long handle); + private native void setAsyncIo(final long handle, final boolean asyncIO); } diff --git a/java/src/test/java/org/rocksdb/ReadOptionsTest.java b/java/src/test/java/org/rocksdb/ReadOptionsTest.java index 966ccb65f7..baf51bf9b4 100644 --- a/java/src/test/java/org/rocksdb/ReadOptionsTest.java +++ b/java/src/test/java/org/rocksdb/ReadOptionsTest.java @@ -256,10 +256,10 @@ public class ReadOptionsTest { } @Test - public void asyncIO() { + public void asyncIo() { try (final ReadOptions opt = new ReadOptions()) { - opt.setAsyncIO(true); - assertThat(opt.asyncIO()).isTrue(); + opt.setAsyncIo(true); + assertThat(opt.asyncIo()).isTrue(); } }