public class OptimisticTransactionDB extends RocksDB
RocksDB.CountAndSize, RocksDB.LiveFiles, RocksDB.VersionDEFAULT_COLUMN_FAMILY, NOT_FOUND, options_nativeHandle_owningHandle_| Modifier and Type | Method and Description |
|---|---|
Transaction |
beginTransaction(WriteOptions writeOptions)
Starts a new Transaction.
|
Transaction |
beginTransaction(WriteOptions writeOptions,
OptimisticTransactionOptions optimisticTransactionOptions)
Starts a new Transaction.
|
Transaction |
beginTransaction(WriteOptions writeOptions,
OptimisticTransactionOptions optimisticTransactionOptions,
Transaction oldTransaction)
Starts a new Transaction.
|
Transaction |
beginTransaction(WriteOptions writeOptions,
Transaction oldTransaction)
Starts a new Transaction.
|
void |
close()
This is similar to
closeE() except that it
silently ignores any errors. |
void |
closeE()
This is similar to
close() except that it
throws an exception if any error occurs. |
protected void |
disposeInternal(long handle) |
RocksDB |
getBaseDB()
Get the underlying database that was opened.
|
static OptimisticTransactionDB |
open(DBOptions dbOptions,
String path,
List<ColumnFamilyDescriptor> columnFamilyDescriptors,
List<ColumnFamilyHandle> columnFamilyHandles)
Open an OptimisticTransactionDB similar to
RocksDB.open(DBOptions, String, List, List). |
protected static long |
open(long optionsHandle,
String path) |
protected static long[] |
open(long handle,
String path,
byte[][] columnFamilyNames,
long[] columnFamilyOptions) |
static OptimisticTransactionDB |
open(Options options,
String path)
Open an OptimisticTransactionDB similar to
RocksDB.open(Options, String). |
cancelAllBackgroundWork, compactFiles, compactFiles, compactRange, compactRange, compactRange, compactRange, compactRange, continueBackgroundWork, createColumnFamilies, createColumnFamilies, createColumnFamily, delete, delete, delete, delete, delete, delete, delete, delete, delete, delete, deleteFile, deleteFilesInRanges, deleteRange, deleteRange, deleteRange, deleteRange, destroyColumnFamilyHandle, destroyDB, disableFileDeletions, dropColumnFamilies, dropColumnFamily, enableAutoCompaction, enableFileDeletions, endTrace, flush, flush, flush, flushWal, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getAggregatedLongProperty, getApproximateMemTableStats, getApproximateMemTableStats, getApproximateSizes, getApproximateSizes, getColumnFamilyMetaData, getColumnFamilyMetaData, getDBOptions, getDefaultColumnFamily, getEnv, getLatestSequenceNumber, getLiveFiles, getLiveFiles, getLiveFilesMetaData, getLongProperty, getLongProperty, getMapProperty, getMapProperty, getName, getOptions, getOptions, getPropertiesOfAllTables, getPropertiesOfAllTables, getPropertiesOfTablesInRange, getPropertiesOfTablesInRange, getProperty, getProperty, getSnapshot, getSortedWalFiles, getUpdatesSince, ingestExternalFile, ingestExternalFile, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, keyMayExist, level0StopWriteTrigger, level0StopWriteTrigger, listColumnFamilies, loadLibrary, loadLibrary, maxMemCompactionLevel, maxMemCompactionLevel, merge, merge, merge, merge, merge, merge, merge, merge, multiGetAsList, multiGetAsList, multiGetAsList, multiGetAsList, multiGetByteBuffers, multiGetByteBuffers, multiGetByteBuffers, multiGetByteBuffers, newIterator, newIterator, newIterator, newIterator, newIterators, newIterators, numberLevels, numberLevels, open, open, openAsSecondary, openAsSecondary, openReadOnly, openReadOnly, openReadOnly, openReadOnly, openReadOnly, openReadOnly, pauseBackgroundWork, promoteL0, promoteL0, put, put, put, put, put, put, put, put, put, put, releaseSnapshot, resetStats, rocksdbVersion, setDBOptions, setOptions, setOptions, singleDelete, singleDelete, singleDelete, singleDelete, startTrace, storeOptionsInstance, suggestCompactRange, suggestCompactRange, syncWal, tryCatchUpWithPrimary, verifyChecksum, write, writedisposeInternal, getNativeHandledisOwnNativeHandle, isOwningHandlepublic static OptimisticTransactionDB open(Options options, String path) throws RocksDBException
RocksDB.open(Options, String).options - Options instance.path - the path to the rocksdb.OptimisticTransactionDB instance on success, null if the
specified OptimisticTransactionDB can not be opened.RocksDBException - if an error occurs whilst opening the database.public static OptimisticTransactionDB open(DBOptions dbOptions, String path, List<ColumnFamilyDescriptor> columnFamilyDescriptors, List<ColumnFamilyHandle> columnFamilyHandles) throws RocksDBException
RocksDB.open(DBOptions, String, List, List).dbOptions - DBOptions instance.path - the path to the rocksdb.columnFamilyDescriptors - list of column family descriptorscolumnFamilyHandles - will be filled with ColumnFamilyHandle instancesOptimisticTransactionDB instance on success, null if the
specified OptimisticTransactionDB can not be opened.RocksDBException - if an error occurs whilst opening the database.public void closeE()
throws RocksDBException
close() except that it
throws an exception if any error occurs.
This will not fsync the WAL files.
If syncing is required, the caller must first call RocksDB.syncWal()
or RocksDB.write(WriteOptions, WriteBatch) using an empty write batch
with WriteOptions.setSync(boolean) set to true.
See also close().closeE in class RocksDBRocksDBException - if an error occurs whilst closing.public void close()
closeE() except that it
silently ignores any errors.
This will not fsync the WAL files.
If syncing is required, the caller must first call RocksDB.syncWal()
or RocksDB.write(WriteOptions, WriteBatch) using an empty write batch
with WriteOptions.setSync(boolean) set to true.
See also close().close in interface AutoCloseableclose in class RocksDBpublic Transaction beginTransaction(WriteOptions writeOptions)
AutoCloseable.close() on the returned
transaction when it is no longer needed.writeOptions - Any write options for the transactionpublic Transaction beginTransaction(WriteOptions writeOptions, OptimisticTransactionOptions optimisticTransactionOptions)
AutoCloseable.close() on the returned
transaction when it is no longer needed.writeOptions - Any write options for the transactionoptimisticTransactionOptions - Any options for the transactionpublic Transaction beginTransaction(WriteOptions writeOptions, Transaction oldTransaction)
AutoCloseable.close() on the returned
transaction when it is no longer needed.writeOptions - Any write options for the transactionoldTransaction - this Transaction will be reused instead of allocating
a new one. This is an optimization to avoid extra allocations
when repeatedly creating transactions.public Transaction beginTransaction(WriteOptions writeOptions, OptimisticTransactionOptions optimisticTransactionOptions, Transaction oldTransaction)
AutoCloseable.close() on the returned
transaction when it is no longer needed.writeOptions - Any write options for the transactionoptimisticTransactionOptions - Any options for the transactionoldTransaction - this Transaction will be reused instead of allocating
a new one. This is an optimization to avoid extra allocations
when repeatedly creating transactions.public RocksDB getBaseDB()
protected final void disposeInternal(long handle)
disposeInternal in class RocksDBprotected static long open(long optionsHandle,
String path)
throws RocksDBException
RocksDBExceptionprotected static long[] open(long handle,
String path,
byte[][] columnFamilyNames,
long[] columnFamilyOptions)
Copyright © 2022. All rights reserved.