@ -961,9 +961,26 @@ public class RocksDB extends RocksObject {
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
*
* @deprecated Use { @link # delete ( byte [ ] ) }
* /
@Deprecated
public void remove ( final byte [ ] key ) throws RocksDBException {
remove ( nativeHandle_ , key , key . length ) ;
delete ( key ) ;
}
/ * *
* Delete the database entry ( if any ) for "key" . Returns OK on
* success , and a non - OK status on error . It is not an error if "key"
* did not exist in the database .
*
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
public void delete ( final byte [ ] key ) throws RocksDBException {
delete ( nativeHandle_ , key , key . length ) ;
}
/ * *
@ -977,10 +994,30 @@ public class RocksDB extends RocksObject {
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
*
* @deprecated Use { @link # delete ( ColumnFamilyHandle , byte [ ] ) }
* /
@Deprecated
public void remove ( final ColumnFamilyHandle columnFamilyHandle ,
final byte [ ] key ) throws RocksDBException {
remove ( nativeHandle_ , key , key . length , columnFamilyHandle . nativeHandle_ ) ;
delete ( columnFamilyHandle , key ) ;
}
/ * *
* Delete the database entry ( if any ) for "key" . Returns OK on
* success , and a non - OK status on error . It is not an error if "key"
* did not exist in the database .
*
* @param columnFamilyHandle { @link org . rocksdb . ColumnFamilyHandle }
* instance
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
public void delete ( final ColumnFamilyHandle columnFamilyHandle ,
final byte [ ] key ) throws RocksDBException {
delete ( nativeHandle_ , key , key . length , columnFamilyHandle . nativeHandle_ ) ;
}
/ * *
@ -993,10 +1030,29 @@ public class RocksDB extends RocksObject {
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
*
* @deprecated Use { @link # delete ( WriteOptions , byte [ ] ) }
* /
@Deprecated
public void remove ( final WriteOptions writeOpt , final byte [ ] key )
throws RocksDBException {
remove ( nativeHandle_ , writeOpt . nativeHandle_ , key , key . length ) ;
delete ( writeOpt , key ) ;
}
/ * *
* Delete the database entry ( if any ) for "key" . Returns OK on
* success , and a non - OK status on error . It is not an error if "key"
* did not exist in the database .
*
* @param writeOpt WriteOptions to be used with delete operation
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
public void delete ( final WriteOptions writeOpt , final byte [ ] key )
throws RocksDBException {
delete ( nativeHandle_ , writeOpt . nativeHandle_ , key , key . length ) ;
}
/ * *
@ -1011,11 +1067,150 @@ public class RocksDB extends RocksObject {
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
*
* @deprecated Use { @link # delete ( ColumnFamilyHandle , WriteOptions , byte [ ] ) }
* /
@Deprecated
public void remove ( final ColumnFamilyHandle columnFamilyHandle ,
final WriteOptions writeOpt , final byte [ ] key )
throws RocksDBException {
remove ( nativeHandle_ , writeOpt . nativeHandle_ , key , key . length ,
delete ( columnFamilyHandle , writeOpt , key ) ;
}
/ * *
* Delete the database entry ( if any ) for "key" . Returns OK on
* success , and a non - OK status on error . It is not an error if "key"
* did not exist in the database .
*
* @param columnFamilyHandle { @link org . rocksdb . ColumnFamilyHandle }
* instance
* @param writeOpt WriteOptions to be used with delete operation
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
public void delete ( final ColumnFamilyHandle columnFamilyHandle ,
final WriteOptions writeOpt , final byte [ ] key )
throws RocksDBException {
delete ( nativeHandle_ , writeOpt . nativeHandle_ , key , key . length ,
columnFamilyHandle . nativeHandle_ ) ;
}
/ * *
* Remove the database entry for { @code key } . Requires that the key exists
* and was not overwritten . It is not an error if the key did not exist
* in the database .
*
* If a key is overwritten ( by calling { @link # put ( byte [ ] , byte [ ] ) } multiple
* times ) , then the result of calling SingleDelete ( ) on this key is undefined .
* SingleDelete ( ) only behaves correctly if there has been only one Put ( )
* for this key since the previous call to SingleDelete ( ) for this key .
*
* This feature is currently an experimental performance optimization
* for a very specific workload . It is up to the caller to ensure that
* SingleDelete is only used for a key that is not deleted using Delete ( ) or
* written using Merge ( ) . Mixing SingleDelete operations with Deletes and
* Merges can result in undefined behavior .
*
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
@Experimental ( "Performance optimization for a very specific workload" )
public void singleDelete ( final byte [ ] key ) throws RocksDBException {
singleDelete ( nativeHandle_ , key , key . length ) ;
}
/ * *
* Remove the database entry for { @code key } . Requires that the key exists
* and was not overwritten . It is not an error if the key did not exist
* in the database .
*
* If a key is overwritten ( by calling { @link # put ( byte [ ] , byte [ ] ) } multiple
* times ) , then the result of calling SingleDelete ( ) on this key is undefined .
* SingleDelete ( ) only behaves correctly if there has been only one Put ( )
* for this key since the previous call to SingleDelete ( ) for this key .
*
* This feature is currently an experimental performance optimization
* for a very specific workload . It is up to the caller to ensure that
* SingleDelete is only used for a key that is not deleted using Delete ( ) or
* written using Merge ( ) . Mixing SingleDelete operations with Deletes and
* Merges can result in undefined behavior .
*
* @param columnFamilyHandle The column family to delete the key from
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
@Experimental ( "Performance optimization for a very specific workload" )
public void singleDelete ( final ColumnFamilyHandle columnFamilyHandle ,
final byte [ ] key ) throws RocksDBException {
singleDelete ( nativeHandle_ , key , key . length ,
columnFamilyHandle . nativeHandle_ ) ;
}
/ * *
* Remove the database entry for { @code key } . Requires that the key exists
* and was not overwritten . It is not an error if the key did not exist
* in the database .
*
* If a key is overwritten ( by calling { @link # put ( byte [ ] , byte [ ] ) } multiple
* times ) , then the result of calling SingleDelete ( ) on this key is undefined .
* SingleDelete ( ) only behaves correctly if there has been only one Put ( )
* for this key since the previous call to SingleDelete ( ) for this key .
*
* This feature is currently an experimental performance optimization
* for a very specific workload . It is up to the caller to ensure that
* SingleDelete is only used for a key that is not deleted using Delete ( ) or
* written using Merge ( ) . Mixing SingleDelete operations with Deletes and
* Merges can result in undefined behavior .
*
* Note : consider setting { @link WriteOptions # setSync ( boolean ) } true .
*
* @param writeOpt Write options for the delete
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
@Experimental ( "Performance optimization for a very specific workload" )
public void singleDelete ( final WriteOptions writeOpt , final byte [ ] key )
throws RocksDBException {
singleDelete ( nativeHandle_ , writeOpt . nativeHandle_ , key , key . length ) ;
}
/ * *
* Remove the database entry for { @code key } . Requires that the key exists
* and was not overwritten . It is not an error if the key did not exist
* in the database .
*
* If a key is overwritten ( by calling { @link # put ( byte [ ] , byte [ ] ) } multiple
* times ) , then the result of calling SingleDelete ( ) on this key is undefined .
* SingleDelete ( ) only behaves correctly if there has been only one Put ( )
* for this key since the previous call to SingleDelete ( ) for this key .
*
* This feature is currently an experimental performance optimization
* for a very specific workload . It is up to the caller to ensure that
* SingleDelete is only used for a key that is not deleted using Delete ( ) or
* written using Merge ( ) . Mixing SingleDelete operations with Deletes and
* Merges can result in undefined behavior .
*
* Note : consider setting { @link WriteOptions # setSync ( boolean ) } true .
*
* @param columnFamilyHandle The column family to delete the key from
* @param writeOpt Write options for the delete
* @param key Key to delete within database
*
* @throws RocksDBException thrown if error happens in underlying
* native library .
* /
@Experimental ( "Performance optimization for a very specific workload" )
public void singleDelete ( final ColumnFamilyHandle columnFamilyHandle ,
final WriteOptions writeOpt , final byte [ ] key ) throws RocksDBException {
singleDelete ( nativeHandle_ , writeOpt . nativeHandle_ , key , key . length ,
columnFamilyHandle . nativeHandle_ ) ;
}
@ -1849,15 +2044,26 @@ public class RocksDB extends RocksObject {
protected native byte [ ] get (
long handle , long readOptHandle ,
byte [ ] key , int keyLen , long cfHandle ) throws RocksDBException ;
protected native void remove (
protected native void delete (
long handle , byte [ ] key , int keyLen ) throws RocksDBException ;
protected native void delete (
long handle , byte [ ] key , int keyLen , long cfHandle )
throws RocksDBException ;
protected native void delete (
long handle , long writeOptHandle ,
byte [ ] key , int keyLen ) throws RocksDBException ;
protected native void delete (
long handle , long writeOptHandle ,
byte [ ] key , int keyLen , long cfHandle ) throws RocksDBException ;
protected native void singleDelete (
long handle , byte [ ] key , int keyLen ) throws RocksDBException ;
protected native void remove (
protected native void singleDelet e(
long handle , byte [ ] key , int keyLen , long cfHandle )
throws RocksDBException ;
protected native void remove (
protected native void singleDelet e(
long handle , long writeOptHandle ,
byte [ ] key , int keyLen ) throws RocksDBException ;
protected native void remove (
protected native void singleDelet e(
long handle , long writeOptHandle ,
byte [ ] key , int keyLen , long cfHandle ) throws RocksDBException ;
protected native String getProperty0 ( long nativeHandle ,