org.rocksdb.Transaction Java Examples

The following examples show how to use org.rocksdb.Transaction. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TransactionDBTest.java    From nuls-v2 with MIT License 6 votes vote down vote up
@Test
public void testTransactionDB() {
    initTest();
    Transaction tx = null;
    try {
        tx = TransactionDBManager.openSession(tableName);
        String value1 = "value2";
        put(key.getBytes(), value1.getBytes());

        Integer.parseInt("s");
    } catch (Exception e) {
        if(tx != null) {
            try {
                TransactionDBManager.rollBack(tx);
            } catch (RocksDBException ex) {
                ex.printStackTrace();
            }
        }
        e.printStackTrace();
    }
}
 
Example #2
Source File: RocksDBTransaction.java    From besu with Apache License 2.0 4 votes vote down vote up
RocksDBTransaction(
    final Transaction innerTx, final WriteOptions options, final RocksDBMetrics metrics) {
  this.innerTx = innerTx;
  this.options = options;
  this.metrics = metrics;
}
 
Example #3
Source File: TransactionEntity.java    From KitDB with Apache License 2.0 4 votes vote down vote up
public Transaction getTransaction() {
    return transaction;
}
 
Example #4
Source File: TransactionEntity.java    From KitDB with Apache License 2.0 4 votes vote down vote up
public void setTransaction(Transaction transaction) {
    this.transaction = transaction;
}