/** * Caller must hold commit lock. */ final void pushUnalloc(long indexId, byte[] key, long pos, long length) throws IOException { check(); try { undoLog().pushUnalloc(indexId, key, pos, length); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. */ final void pushUnextend(long indexId, byte[] key, long length) throws IOException { check(); try { undoLog().pushUnextend(mSavepoint, indexId, key, length); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. */ final void pushUninsert(long indexId, byte[] key) throws IOException { check(); try { undoLog().pushUninsert(indexId, key); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. */ final void pushUninsert(long indexId, byte[] key) throws IOException { check(); try { undoLog().push(indexId, UndoLog.OP_UNINSERT, key, 0, key.length); } catch (Throwable e) { borked(e, false, true); } }
/** * Caller must hold commit lock. */ final void pushUninsert(long indexId, byte[] key) throws IOException { check(); try { undoLog().pushUninsert(indexId, key); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. */ final void pushUncreate(long indexId, byte[] key) throws IOException { check(); try { undoLog().pushUncreate(indexId, key); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. */ final void pushUnwrite(long indexId, byte[] key, long pos, /*P*/ byte[] b, int off, int len) throws IOException { check(); try { undoLog().pushUnwrite(indexId, key, pos, b, off, len); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. * * @param op OP_UNUPDATE or OP_UNDELETE * @param payload page with Node-encoded key/value entry */ final void pushUndoStore(long indexId, byte op, /*P*/ byte[] payload, int off, int len) throws IOException { check(); try { undoLog().pushNodeEncoded(indexId, op, payload, off, len); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. * * @param payload Node-encoded key followed by trash id */ final void pushUndeleteFragmented(long indexId, byte[] payload, int off, int len) throws IOException { check(); try { undoLog().pushNodeEncoded(indexId, UndoLog.OP_UNDELETE_FRAGMENTED, payload, off, len); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. * * @param payload Node-encoded key followed by trash id */ final void pushUndeleteFragmented(long indexId, byte[] payload, int off, int len) throws IOException { check(); try { undoLog().push(indexId, UndoLog.OP_UNDELETE_FRAGMENTED, payload, off, len); } catch (Throwable e) { borked(e, false, true); } }
/** * Caller must hold commit lock. * * @param op OP_UNUPDATE or OP_UNDELETE * @param payload page with Node-encoded key/value entry */ final void pushUndoStore(long indexId, byte op, /*P*/ byte[] payload, int off, int len) throws IOException { check(); try { undoLog().pushNodeEncoded(indexId, op, payload, off, len); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. * * @param payload Node-encoded key followed by trash id */ final void pushUndeleteFragmented(long indexId, byte[] payload, int off, int len) throws IOException { check(); try { undoLog().pushNodeEncoded(indexId, UndoLog.OP_UNDELETE_FRAGMENTED, payload, off, len); } catch (Throwable e) { borked(e, false, true); // rollback = false, rethrow = true } }
/** * Caller must hold commit lock. * * @param op OP_UNUPDATE or OP_UNDELETE * @param payload page with Node-encoded key/value entry */ final void pushUndoStore(long indexId, byte op, /*P*/ byte[] payload, int off, int len) throws IOException { check(); try { undoLog().push(indexId, op, payload, off, len); } catch (Throwable e) { borked(e, false, true); } }
@Override public final void customUndo(byte[] message) throws IOException { if (mDatabase.mCustomTxnHandler == null) { throw new IllegalStateException("Custom transaction handler is not installed"); } check(); final CommitLock.Shared shared = mDatabase.commitLock().acquireShared(); try { undoLog().pushCustom(message); } finally { shared.release(); } }
private void pushUndoPrepare() throws IOException { final CommitLock.Shared shared = mDatabase.commitLock().acquireShared(); try { undoLog().pushPrepare(); } finally { shared.release(); } }
@Override public final void customUndo(byte[] message) throws IOException { if (mDatabase.mCustomTxnHandler == null) { throw new IllegalStateException("Custom transaction handler is not installed"); } check(); final CommitLock.Shared shared = mDatabase.commitLock().acquireShared(); try { undoLog().pushCustom(message); } catch (Throwable e) { borked(e, true, true); // rollback = true, rethrow = true } finally { shared.release(); } }
@Override public final void customUndo(byte[] message) throws IOException { if (mDatabase.mCustomTxnHandler == null) { throw new IllegalStateException("Custom transaction handler is not installed"); } check(); final CommitLock.Shared shared = mDatabase.commitLock().acquireShared(); try { undoLog().pushCustom(message); } catch (Throwable e) { borked(e, true, true); // rollback = true, rethrow = true } finally { shared.release(); } }