private boolean txnInsert(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.insert(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.insert(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnReplace(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.replace(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.replace(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnInsert(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.insert(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.insert(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private byte[] txnExchange(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.exchange(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.exchange(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnInsert(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.insert(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.insert(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private byte[] txnExchange(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.exchange(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.exchange(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnUpdate(Transaction txn, byte[] key, byte[] oldValue, byte[] newValue) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.update(txn, key, oldValue, newValue); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.update(txn, key, oldValue, newValue); } finally { txn.durabilityMode(dmode); } } }
private void txnStore(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { super.store(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { super.store(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnReplace(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.replace(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.replace(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private void txnStore(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { super.store(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { super.store(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private byte[] txnExchange(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.exchange(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.exchange(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnReplace(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.replace(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.replace(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private void txnStore(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { super.store(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { super.store(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private byte[] txnExchange(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.exchange(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.exchange(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnInsert(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.insert(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.insert(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private void txnStore(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { super.store(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { super.store(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
private boolean txnReplace(Transaction txn, byte[] key, byte[] value) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.replace(txn, key, value); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.replace(txn, key, value); } finally { txn.durabilityMode(dmode); } } }
public boolean txnUpdate(Transaction txn, byte[] key, byte[] oldValue, byte[] newValue) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.update(txn, key, oldValue, newValue); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.update(txn, key, oldValue, newValue); } finally { txn.durabilityMode(dmode); } } }
public boolean txnUpdate(Transaction txn, byte[] key, byte[] oldValue, byte[] newValue) throws IOException { final DurabilityMode dmode = txn.durabilityMode(); if (dmode == DurabilityMode.NO_REDO) { return super.update(txn, key, oldValue, newValue); } else { txn.durabilityMode(DurabilityMode.NO_REDO); try { return super.update(txn, key, oldValue, newValue); } finally { txn.durabilityMode(dmode); } } }
@Override public void commit() throws BackendException { log.trace("commit txn={}, id={}", txn, id); try { txn.commit(); txn.exit(); if(DurabilityMode.NO_REDO == txn.durabilityMode()) { //TODO should I always call checkpoint? database.checkpoint(); } } catch (IOException e) { throw new PermanentBackendException("unable to commit tx " + id, e); } }