Package org.rocksdb
Class ColumnFamilyHandle
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksObject
org.rocksdb.ColumnFamilyHandle
- All Implemented Interfaces:
AutoCloseable
ColumnFamilyHandle class to hold handles to underlying rocksdb
ColumnFamily Pointers.
-
Field Summary
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeletes underlying C++ iterator pointer.protected final voiddisposeInternal(long handle) booleanGets the up-to-date descriptor of the column family associated with this handle.intgetID()Gets the ID of the Column Family.byte[]getName()Gets the name of the Column Family.inthashCode()protected booleanMethods inherited from class org.rocksdb.RocksObject
getNativeHandleMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Method Details
-
getName
Gets the name of the Column Family.- Returns:
- The name of the Column Family.
- Throws:
RocksDBException- if an error occurs whilst retrieving the name.
-
getID
public int getID()Gets the ID of the Column Family.- Returns:
- the ID of the Column Family.
-
getDescriptor
Gets the up-to-date descriptor of the column family associated with this handle. Since it fills "*desc" with the up-to-date information, this call might internally lock and release DB mutex to access the up-to-date CF options. In addition, all the pointer-typed options cannot be referenced any longer than the original options exist.Note that this function is not supported in RocksDBLite.
- Returns:
- the up-to-date descriptor.
- Throws:
RocksDBException- if an error occurs whilst retrieving the descriptor.
-
equals
-
hashCode
public int hashCode() -
isDefaultColumnFamily
protected boolean isDefaultColumnFamily() -
disposeInternal
protected void disposeInternal()Deletes underlying C++ iterator pointer.
Note: the underlying handle can only be safely deleted if the RocksDB instance related to a certain ColumnFamilyHandle is still valid and initialized. Therefore
disposeInternal()checks if the RocksDB is initialized before freeing the native handle.- Overrides:
disposeInternalin classRocksObject
-
disposeInternal
protected final void disposeInternal(long handle) - Specified by:
disposeInternalin classRocksObject
-