@ -204,20 +204,19 @@ jobjectArray Java_org_rocksdb_RocksDB_listColumnFamilies(
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// rocksdb::DB::Put
// rocksdb::DB::Put
void rocksdb_put_helper (
void rocksdb_put_helper ( JNIEnv * env , rocksdb : : DB * db ,
JNIEnv * env , rocksdb : : DB * db , const rocksdb : : WriteOptions & write_options ,
const rocksdb : : WriteOptions & write_options ,
rocksdb : : ColumnFamilyHandle * cf_handle , jbyteArray jkey , jint jkey_off ,
rocksdb : : ColumnFamilyHandle * cf_handle , jbyteArray jkey ,
jint jkey_len , jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
jint jkey_off , jint jkey_len , jbyteArray jval ,
jint jval_off , jint jval_len ) {
jbyte * key = new jbyte [ jkey_len ] ;
jbyte * key = new jbyte [ jkey_len ] ;
env - > GetByteArrayRegion ( jkey , jkey_off , jkey_len , key ) ;
env - > GetByteArrayRegion ( jkey , jkey_off , jkey_len , key ) ;
jbyte * value = new jbyte [ jvalue _len ] ;
jbyte * value = new jbyte [ jval_len ] ;
env - > GetByteArrayRegion ( jvalue , jvalue _off , jvalue _len , value ) ;
env - > GetByteArrayRegion ( jval , jval_off , jval_len , value ) ;
rocksdb : : Slice key_slice ( reinterpret_cast < char * > ( key ) , jkey_len ) ;
rocksdb : : Slice key_slice ( reinterpret_cast < char * > ( key ) , jkey_len ) ;
rocksdb : : Slice value_slice ( reinterpret_cast < char * > ( value ) ,
rocksdb : : Slice value_slice ( reinterpret_cast < char * > ( value ) , jval_len ) ;
jvalue_len ) ;
rocksdb : : Status s ;
rocksdb : : Status s ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
@ -242,17 +241,17 @@ void rocksdb_put_helper(
* Method : put
* Method : put
* Signature : ( J [ BII [ BII ) V
* Signature : ( J [ BII [ BII ) V
*/
*/
void Java_org_rocksdb_RocksDB_put__J_3BII_3BII (
void Java_org_rocksdb_RocksDB_put__J_3BII_3BII ( JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle ,
jlong jdb_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jkey , jint jkey_off ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
jint jkey_len , jbyteArray jval ,
jint jval_off , jint jval_len ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
static const rocksdb : : WriteOptions default_write_options =
static const rocksdb : : WriteOptions default_write_options =
rocksdb : : WriteOptions ( ) ;
rocksdb : : WriteOptions ( ) ;
rocksdb_put_helper ( env , db , default_write_options , nullptr ,
rocksdb_put_helper ( env , db , default_write_options , nullptr , jkey , jkey_off ,
jkey , jkey_off , jkey_len ,
jkey_len , jval , jval_off , jval_len ) ;
jvalue , jvalue_off , jvalue_len ) ;
}
}
/*
/*
@ -260,17 +259,19 @@ void Java_org_rocksdb_RocksDB_put__J_3BII_3BII(
* Method : put
* Method : put
* Signature : ( J [ BII [ BIIJ ) V
* Signature : ( J [ BII [ BIIJ ) V
*/
*/
void Java_org_rocksdb_RocksDB_put__J_3BII_3BIIJ (
void Java_org_rocksdb_RocksDB_put__J_3BII_3BIIJ ( JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle ,
jlong jdb_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jkey , jint jkey_off ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len , jlong jcf_handle ) {
jint jkey_len , jbyteArray jval ,
jint jval_off , jint jval_len ,
jlong jcf_handle ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
static const rocksdb : : WriteOptions default_write_options =
static const rocksdb : : WriteOptions default_write_options =
rocksdb : : WriteOptions ( ) ;
rocksdb : : WriteOptions ( ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
rocksdb_put_helper ( env , db , default_write_options , cf_handle ,
rocksdb_put_helper ( env , db , default_write_options , cf_handle , jkey ,
jkey , jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_off , jkey_len , jval , jval_off , jval_len ) ;
} else {
} else {
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
@ -282,18 +283,18 @@ void Java_org_rocksdb_RocksDB_put__J_3BII_3BIIJ(
* Method : put
* Method : put
* Signature : ( JJ [ BII [ BII ) V
* Signature : ( JJ [ BII [ BII ) V
*/
*/
void Java_org_rocksdb_RocksDB_put__JJ_3BII_3BII (
void Java_org_rocksdb_RocksDB_put__JJ_3BII_3BII ( JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb ,
jlong jdb_handle ,
jlong jdb_handle , jlong jwrite_options_handle ,
jlong jwrite_options_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jkey , jint jkey_off ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
jint jkey_len , jbyteArray jval ,
jint jval_off , jint jval_len ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
jwrite_options_handle ) ;
jwrite_options_handle ) ;
rocksdb_put_helper ( env , db , * write_options , nullptr ,
rocksdb_put_helper ( env , db , * write_options , nullptr , jkey , jkey_off , jkey_len ,
jkey , jkey_off , jkey_len ,
jval , jval_off , jval_len ) ;
jvalue , jvalue_off , jvalue_len ) ;
}
}
/*
/*
@ -302,17 +303,16 @@ void Java_org_rocksdb_RocksDB_put__JJ_3BII_3BII(
* Signature : ( JJ [ BII [ BIIJ ) V
* Signature : ( JJ [ BII [ BIIJ ) V
*/
*/
void Java_org_rocksdb_RocksDB_put__JJ_3BII_3BIIJ (
void Java_org_rocksdb_RocksDB_put__JJ_3BII_3BIIJ (
JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle , jlong jwrite_options_handle ,
jlong jdb_handle , jlong jwrite_options_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len , jbyteArray jval ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jint jval_off , jint jval_len , jlong jcf_handle ) {
jbyteArray jvalue , jint jvalue_off , jint jvalue_len , jlong jcf_handle ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
jwrite_options_handle ) ;
jwrite_options_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
rocksdb_put_helper ( env , db , * write_options , cf_handle ,
rocksdb_put_helper ( env , db , * write_options , cf_handle , jkey , jkey_off ,
jkey , jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_len , jval , jval_off , jval_len ) ;
} else {
} else {
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
@ -580,11 +580,11 @@ jbyteArray Java_org_rocksdb_RocksDB_get__JJ_3BIIJ(
}
}
}
}
jint rocksdb_get_helper (
jint rocksdb_get_helper ( JNIEnv * env , rocksdb : : DB * db ,
JNIEnv * env , rocksdb : : DB * db , const rocksdb : : ReadOptions & read_options ,
const rocksdb : : ReadOptions & read_options ,
rocksdb : : ColumnFamilyHandle * column_family_handle , jbyteArray jkey ,
rocksdb : : ColumnFamilyHandle * column_family_handle ,
jint jkey_off , jint jkey_len , jbyteArray jvalue , jint jvalue_off ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jint jvalue _len) {
jbyteArray jval , jint jval_off , jint jval _len ) {
static const int kNotFound = - 1 ;
static const int kNotFound = - 1 ;
static const int kStatusError = - 2 ;
static const int kStatusError = - 2 ;
@ -623,10 +623,9 @@ jint rocksdb_get_helper(
}
}
jint cvalue_len = static_cast < jint > ( cvalue . size ( ) ) ;
jint cvalue_len = static_cast < jint > ( cvalue . size ( ) ) ;
jint length = std : : min ( jvalue _len , cvalue_len ) ;
jint length = std : : min ( jval_len , cvalue_len ) ;
env - > SetByteArrayRegion (
env - > SetByteArrayRegion ( jval , jval_off , length ,
jvalue , jvalue_off , length ,
reinterpret_cast < const jbyte * > ( cvalue . c_str ( ) ) ) ;
reinterpret_cast < const jbyte * > ( cvalue . c_str ( ) ) ) ;
return cvalue_len ;
return cvalue_len ;
}
}
@ -772,14 +771,14 @@ jobjectArray Java_org_rocksdb_RocksDB_multiGet__JJ_3_3B_3I_3I_3J(
* Method : get
* Method : get
* Signature : ( J [ BII [ BII ) I
* Signature : ( J [ BII [ BII ) I
*/
*/
jint Java_org_rocksdb_RocksDB_get__J_3BII_3BII (
jint Java_org_rocksdb_RocksDB_get__J_3BII_3BII ( JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle ,
jlong jdb_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jkey , jint jkey_off ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
jint jkey_len , jbyteArray jval ,
return rocksdb_get_helper ( env ,
jint jval_off , jint jval_len ) {
reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ,
return rocksdb_get_helper ( env , reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ,
rocksdb : : ReadOptions ( ) , nullptr ,
rocksdb : : ReadOptions ( ) , nullptr , jkey , jkey_off ,
jkey , jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_len , jval , jval_off , jval_len ) ;
}
}
/*
/*
@ -787,15 +786,18 @@ jint Java_org_rocksdb_RocksDB_get__J_3BII_3BII(
* Method : get
* Method : get
* Signature : ( J [ BII [ BIIJ ) I
* Signature : ( J [ BII [ BIIJ ) I
*/
*/
jint Java_org_rocksdb_RocksDB_get__J_3BII_3BIIJ (
jint Java_org_rocksdb_RocksDB_get__J_3BII_3BIIJ ( JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle ,
jlong jdb_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jkey , jint jkey_off ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len , jlong jcf_handle ) {
jint jkey_len , jbyteArray jval ,
jint jval_off , jint jval_len ,
jlong jcf_handle ) {
auto db_handle = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db_handle = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
return rocksdb_get_helper ( env , db_handle , rocksdb : : ReadOptions ( ) , cf_handle ,
return rocksdb_get_helper ( env , db_handle , rocksdb : : ReadOptions ( ) , cf_handle ,
jkey , jkey_off , jkey_len , jvalue , jvalue_off , jvalue_len ) ;
jkey , jkey_off , jkey_len , jval , jval_off ,
jval_len ) ;
} else {
} else {
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
@ -809,14 +811,16 @@ jint Java_org_rocksdb_RocksDB_get__J_3BII_3BIIJ(
* Method : get
* Method : get
* Signature : ( JJ [ BII [ BII ) I
* Signature : ( JJ [ BII [ BII ) I
*/
*/
jint Java_org_rocksdb_RocksDB_get__JJ_3BII_3BII (
jint Java_org_rocksdb_RocksDB_get__JJ_3BII_3BII ( JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle , jlong jropt_handle ,
jlong jdb_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jlong jropt_handle ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
jbyteArray jkey , jint jkey_off ,
return rocksdb_get_helper ( env ,
jint jkey_len , jbyteArray jval ,
reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ,
jint jval_off , jint jval_len ) {
* reinterpret_cast < rocksdb : : ReadOptions * > ( jropt_handle ) ,
return rocksdb_get_helper (
nullptr , jkey , jkey_off , jkey_len , jvalue , jvalue_off , jvalue_len ) ;
env , reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ,
* reinterpret_cast < rocksdb : : ReadOptions * > ( jropt_handle ) , nullptr , jkey ,
jkey_off , jkey_len , jval , jval_off , jval_len ) ;
}
}
/*
/*
@ -826,14 +830,14 @@ jint Java_org_rocksdb_RocksDB_get__JJ_3BII_3BII(
*/
*/
jint Java_org_rocksdb_RocksDB_get__JJ_3BII_3BIIJ (
jint Java_org_rocksdb_RocksDB_get__JJ_3BII_3BIIJ (
JNIEnv * env , jobject jdb , jlong jdb_handle , jlong jropt_handle ,
JNIEnv * env , jobject jdb , jlong jdb_handle , jlong jropt_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jkey , jint jkey_off , jint jkey_len , jbyteArray jval ,
jbyteArray jvalue , j int jvalue _off , jint jvalue _len , jlong jcf_handle ) {
jint jval_off , jint jval_len , jlong jcf_handle ) {
auto db_handle = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db_handle = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto & ro_opt = * reinterpret_cast < rocksdb : : ReadOptions * > ( jropt_handle ) ;
auto & ro_opt = * reinterpret_cast < rocksdb : : ReadOptions * > ( jropt_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
return rocksdb_get_helper ( env , db_handle , ro_opt , cf_handle , jkey ,
return rocksdb_get_helper ( env , db_handle , ro_opt , cf_handle , jkey , jkey_off ,
jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_len , jval , jval_off , jval_len ) ;
} else {
} else {
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
@ -1038,17 +1042,17 @@ void Java_org_rocksdb_RocksDB_singleDelete__JJ_3BIJ(
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
// rocksdb::DB::Merge
// rocksdb::DB::Merge
void rocksdb_merge_helper (
void rocksdb_merge_helper ( JNIEnv * env , rocksdb : : DB * db ,
JNIEnv * env , rocksdb : : DB * db , const rocksdb : : WriteOptions & write_options ,
const rocksdb : : WriteOptions & write_options ,
rocksdb : : ColumnFamilyHandle * cf_handle , jbyteArray jkey , jint jkey_off ,
rocksdb : : ColumnFamilyHandle * cf_handle ,
jint jkey_len , jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jval , jint jval_off , jint jval_len ) {
jbyte * key = new jbyte [ jkey_len ] ;
jbyte * key = new jbyte [ jkey_len ] ;
env - > GetByteArrayRegion ( jkey , jkey_off , jkey_len , key ) ;
env - > GetByteArrayRegion ( jkey , jkey_off , jkey_len , key ) ;
jbyte * value = new jbyte [ jkey_len ] ;
jbyte * value = new jbyte [ jkey_len ] ;
env - > GetByteArrayRegion ( jvalue , jvalue _off , jvalue _len , value ) ;
env - > GetByteArrayRegion ( jval , jval_off , jval_len , value ) ;
rocksdb : : Slice key_slice ( reinterpret_cast < char * > ( key ) , jkey_len ) ;
rocksdb : : Slice key_slice ( reinterpret_cast < char * > ( key ) , jkey_len ) ;
rocksdb : : Slice value_slice ( reinterpret_cast < char * > ( value ) ,
rocksdb : : Slice value_slice ( reinterpret_cast < char * > ( value ) , jval_len ) ;
jvalue_len ) ;
rocksdb : : Status s ;
rocksdb : : Status s ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
@ -1072,16 +1076,17 @@ void rocksdb_merge_helper(
* Method : merge
* Method : merge
* Signature : ( J [ BII [ BII ) V
* Signature : ( J [ BII [ BII ) V
*/
*/
void Java_org_rocksdb_RocksDB_merge__J_3BII_3BII (
void Java_org_rocksdb_RocksDB_merge__J_3BII_3BII ( JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle ,
jlong jdb_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jbyteArray jkey , jint jkey_off ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
jint jkey_len , jbyteArray jval ,
jint jval_off , jint jval_len ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
static const rocksdb : : WriteOptions default_write_options =
static const rocksdb : : WriteOptions default_write_options =
rocksdb : : WriteOptions ( ) ;
rocksdb : : WriteOptions ( ) ;
rocksdb_merge_helper ( env , db , default_write_options ,
rocksdb_merge_helper ( env , db , default_write_options , nullptr , jkey , jkey_off ,
nullptr , jkey , jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_len , jval , jval_off , jval_len ) ;
}
}
/*
/*
@ -1090,16 +1095,16 @@ void Java_org_rocksdb_RocksDB_merge__J_3BII_3BII(
* Signature : ( J [ BII [ BIIJ ) V
* Signature : ( J [ BII [ BIIJ ) V
*/
*/
void Java_org_rocksdb_RocksDB_merge__J_3BII_3BIIJ (
void Java_org_rocksdb_RocksDB_merge__J_3BII_3BIIJ (
JNIEnv * env , jobject jdb , jlong jdb_handle ,
JNIEnv * env , jobject jdb , jlong jdb_handle , jbyteArray jkey , jint jkey_off ,
jbyteArray jkey , jint jkey_off , jint jkey _len ,
jint jkey_len , jbyteArray jval , jint jval_off , jint jval _len ,
jbyteArray jvalue , jint jvalue_off , jint jvalue_len , j long jcf_handle ) {
jlong jcf_handle ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
static const rocksdb : : WriteOptions default_write_options =
static const rocksdb : : WriteOptions default_write_options =
rocksdb : : WriteOptions ( ) ;
rocksdb : : WriteOptions ( ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
rocksdb_merge_helper ( env , db , default_write_options ,
rocksdb_merge_helper ( env , db , default_write_options , cf_handle , jkey ,
cf_handle , jkey , jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_off , jkey_len , jval , jval_off , jval_len ) ;
} else {
} else {
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
@ -1112,16 +1117,15 @@ void Java_org_rocksdb_RocksDB_merge__J_3BII_3BIIJ(
* Signature : ( JJ [ BII [ BII ) V
* Signature : ( JJ [ BII [ BII ) V
*/
*/
void Java_org_rocksdb_RocksDB_merge__JJ_3BII_3BII (
void Java_org_rocksdb_RocksDB_merge__JJ_3BII_3BII (
JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle , jlong jwrite_options_handle ,
jlong jdb_handle , jlong jwrite_options_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len , jbyteArray jval ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jint jval_off , jint jval_len ) {
jbyteArray jvalue , jint jvalue_off , jint jvalue_len ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
jwrite_options_handle ) ;
jwrite_options_handle ) ;
rocksdb_merge_helper ( env , db , * write_options ,
rocksdb_merge_helper ( env , db , * write_options , nullptr , jkey , jkey_off ,
nullptr , jkey , jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_len , jval , jval_off , jval_len ) ;
}
}
/*
/*
@ -1130,17 +1134,16 @@ void Java_org_rocksdb_RocksDB_merge__JJ_3BII_3BII(
* Signature : ( JJ [ BII [ BIIJ ) V
* Signature : ( JJ [ BII [ BIIJ ) V
*/
*/
void Java_org_rocksdb_RocksDB_merge__JJ_3BII_3BIIJ (
void Java_org_rocksdb_RocksDB_merge__JJ_3BII_3BIIJ (
JNIEnv * env , jobject jdb ,
JNIEnv * env , jobject jdb , jlong jdb_handle , jlong jwrite_options_handle ,
jlong jdb_handle , jlong jwrite_options_handle ,
jbyteArray jkey , jint jkey_off , jint jkey_len , jbyteArray jval ,
jbyteArray jkey , jint jkey_off , jint jkey_len ,
jint jval_off , jint jval_len , jlong jcf_handle ) {
jbyteArray jvalue , jint jvalue_off , jint jvalue_len , jlong jcf_handle ) {
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto db = reinterpret_cast < rocksdb : : DB * > ( jdb_handle ) ;
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
auto write_options = reinterpret_cast < rocksdb : : WriteOptions * > (
jwrite_options_handle ) ;
jwrite_options_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
auto cf_handle = reinterpret_cast < rocksdb : : ColumnFamilyHandle * > ( jcf_handle ) ;
if ( cf_handle ! = nullptr ) {
if ( cf_handle ! = nullptr ) {
rocksdb_merge_helper ( env , db , * write_options ,
rocksdb_merge_helper ( env , db , * write_options , cf_handle , jkey , jkey_off ,
cf_handle , jkey , jkey_off , jkey_len , jvalue , jvalue _off , jvalue _len ) ;
jkey_len , jval , jval_off , jval_len ) ;
} else {
} else {
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : RocksDBExceptionJni : : ThrowNew ( env ,
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;
rocksdb : : Status : : InvalidArgument ( " Invalid ColumnFamilyHandle. " ) ) ;