18004d2f20
This commit includes the support for the following functionalities: - Single Get/Put operations - WriteBatch operations - Single iterator functionality - Open database with column families - Open database with column families Read/Only - Create column family - Drop column family - Properties of column families - Listing of column families - Fully backwards comptabile implementation - Multi Iterator support - MultiGet - KeyMayExist - Option to create missing column families on open In addition there is are two new Tests: - Test of ColumnFamily functionality - Test of Read only feature to open subsets of column families - Basic test to test the KeyMayExist feature What is not supported currently using RocksJava: - Custom ColumnFamilyOptions The following targets work as expected: - make rocksdbjava - make jtest Test environment: Ubuntu 14.04(LTS, x64), Java 1.7.0_65(OpenJDK IcedTea 2.5.2), g++ 4.8.2, kernel 3.13.0-35-generix
33 lines
960 B
Java
33 lines
960 B
Java
// Copyright (c) 2014, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
package org.rocksdb;
|
|
|
|
/**
|
|
* ColumnFamilyHandle class to hold handles to underlying rocksdb
|
|
* ColumnFamily Pointers.
|
|
*/
|
|
public class ColumnFamilyHandle extends RocksObject {
|
|
ColumnFamilyHandle(long nativeHandle) {
|
|
super();
|
|
nativeHandle_ = nativeHandle;
|
|
}
|
|
|
|
/**
|
|
* Deletes underlying C++ filter pointer.
|
|
*
|
|
* Note that this function should be called only after all
|
|
* RocksDB instances referencing the filter are closed.
|
|
* Otherwise an undefined behavior will occur.
|
|
*/
|
|
@Override protected void disposeInternal() {
|
|
assert(isInitialized());
|
|
disposeInternal(nativeHandle_);
|
|
}
|
|
|
|
private native void disposeInternal(long handle);
|
|
|
|
}
|