public class TransactionDB extends RocksDB
| Modifier and Type | Class and Description |
|---|---|
static class |
TransactionDB.DeadlockInfo |
static class |
TransactionDB.DeadlockPath |
static class |
TransactionDB.KeyLockInfo |
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,
Transaction oldTransaction)
Starts a new Transaction.
|
Transaction |
beginTransaction(WriteOptions writeOptions,
TransactionOptions transactionOptions)
Starts a new Transaction.
|
Transaction |
beginTransaction(WriteOptions writeOptions,
TransactionOptions transactionOptions,
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) |
List<Transaction> |
getAllPreparedTransactions() |
TransactionDB.DeadlockPath[] |
getDeadlockInfoBuffer() |
Map<Long,TransactionDB.KeyLockInfo> |
getLockStatusData()
Returns map of all locks held.
|
Transaction |
getTransactionByName(String transactionName) |
static TransactionDB |
open(DBOptions dbOptions,
TransactionDBOptions transactionDbOptions,
String path,
List<ColumnFamilyDescriptor> columnFamilyDescriptors,
List<ColumnFamilyHandle> columnFamilyHandles)
Open a TransactionDB, similar to
RocksDB.open(DBOptions, String, List, List). |
static TransactionDB |
open(Options options,
TransactionDBOptions transactionDbOptions,
String path)
Open a TransactionDB, similar to
RocksDB.open(Options, String). |
void |
setDeadlockInfoBufferSize(int targetSize) |
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, 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 TransactionDB open(Options options, TransactionDBOptions transactionDbOptions, String path) throws RocksDBException
RocksDB.open(Options, String).options - Options instance.transactionDbOptions - TransactionDBOptions
instance.path - the path to the rocksdb.TransactionDB instance on success, null if the specified
TransactionDB can not be opened.RocksDBException - if an error occurs whilst opening the database.public static TransactionDB open(DBOptions dbOptions, TransactionDBOptions transactionDbOptions, String path, List<ColumnFamilyDescriptor> columnFamilyDescriptors, List<ColumnFamilyHandle> columnFamilyHandles) throws RocksDBException
RocksDB.open(DBOptions, String, List, List).dbOptions - DBOptions instance.transactionDbOptions - TransactionDBOptions
instance.path - the path to the rocksdb.columnFamilyDescriptors - list of column family descriptorscolumnFamilyHandles - will be filled with ColumnFamilyHandle instancesTransactionDB instance on success, null if the specified
TransactionDB 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, TransactionOptions transactionOptions)
AutoCloseable.close() on the returned
transaction when it is no longer needed.writeOptions - Any write options for the transactiontransactionOptions - 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, TransactionOptions transactionOptions, Transaction oldTransaction)
AutoCloseable.close() on the returned
transaction when it is no longer needed.writeOptions - Any write options for the transactiontransactionOptions - 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 Transaction getTransactionByName(String transactionName)
public List<Transaction> getAllPreparedTransactions()
public Map<Long,TransactionDB.KeyLockInfo> getLockStatusData()
public TransactionDB.DeadlockPath[] getDeadlockInfoBuffer()
public void setDeadlockInfoBufferSize(int targetSize)
protected final void disposeInternal(long handle)
disposeInternal in class RocksDBCopyright © 2022. All rights reserved.