public final class TransactionManager
extends java.lang.Object
TransactionId
s to
TransactionSession
s. We can access and manipulate this map in order to get us to the eventual
map of mangled transaction names and RocksDb TransactionDb Transaction instances in TransactionSession.Modifier and Type | Method and Description |
---|---|
static void |
checkpoint(TransactionId uid)
Checkpoint all transactions with given transaction Id
|
static void |
commit(TransactionId uid)
Commit all transactions with given transaction Id
|
static TransactionManager |
getInstance() |
static java.util.concurrent.ConcurrentHashMap<java.lang.String,com.neocoretechs.rocksack.session.TransactionManager.SessionAndTransaction> |
getTransactions(TransactionId transactionId)
Get the Transaction objects formed from id.
|
static java.util.List<org.rocksdb.Transaction> |
getTransactions(TransactionId transactionId,
java.lang.String clazz)
Get the Transaction objects formed from id and class name.
|
static void |
rollback(TransactionId uid)
Rollback all transactions with given transaction Id
|
static void |
rollbackToCheckpoint(TransactionId uid)
Rollback to checkpoint all transactions with given transaction Id
|
public static TransactionManager getInstance()
public static java.util.concurrent.ConcurrentHashMap<java.lang.String,com.neocoretechs.rocksack.session.TransactionManager.SessionAndTransaction> getTransactions(TransactionId transactionId)
transactionId
- public static java.util.List<org.rocksdb.Transaction> getTransactions(TransactionId transactionId, java.lang.String clazz)
transactionId
- clazz
- public static void commit(TransactionId uid) throws org.rocksdb.RocksDBException
uid
- the transaction Idorg.rocksdb.RocksDBException
public static void rollback(TransactionId uid) throws org.rocksdb.RocksDBException
uid
- the transaction Idorg.rocksdb.RocksDBException
public static void checkpoint(TransactionId uid) throws org.rocksdb.RocksDBException
uid
- the transaction Idorg.rocksdb.RocksDBException
public static void rollbackToCheckpoint(TransactionId uid) throws org.rocksdb.RocksDBException
uid
- the transaction Idorg.rocksdb.RocksDBException