public abstract static class Transactional.AbstractTransactional extends java.lang.Object implements Transactional
Modifier and Type | Class and Description |
---|---|
static class |
Transactional.AbstractTransactional.State |
Transactional.AbstractTransactional
Constructor and Description |
---|
AbstractTransactional() |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
java.lang.Throwable |
abort(java.lang.Throwable accumulate)
rollback any effects of this transaction object graph; delegates first to doCleanup, then to doAbort
|
void |
close() |
void |
commit() |
java.lang.Throwable |
commit(java.lang.Throwable accumulate)
commit any effects of this transaction object graph, then cleanup; delegates first to doCommit, then to doCleanup
|
protected abstract java.lang.Throwable |
doAbort(java.lang.Throwable accumulate) |
protected abstract java.lang.Throwable |
doCommit(java.lang.Throwable accumulate) |
protected java.lang.Throwable |
doPostCleanup(java.lang.Throwable accumulate)
perform an exception-safe post-abort cleanup
|
protected java.lang.Throwable |
doPreCleanup(java.lang.Throwable accumulate)
perform an exception-safe pre-abort/commit cleanup;
this will be run after prepareToCommit (so before commit), and before abort
|
protected abstract void |
doPrepare()
Do any preparatory work prior to commit.
|
java.lang.Object |
finish()
convenience method to both prepareToCommit() and commit() in one operation;
only of use to outer-most transactional object of an object graph
|
void |
prepareToCommit()
The first phase of commit: delegates to doPrepare(), with valid state transition enforcement.
|
Transactional.AbstractTransactional.State |
state() |
protected abstract java.lang.Throwable doCommit(java.lang.Throwable accumulate)
protected abstract java.lang.Throwable doAbort(java.lang.Throwable accumulate)
protected java.lang.Throwable doPreCleanup(java.lang.Throwable accumulate)
protected java.lang.Throwable doPostCleanup(java.lang.Throwable accumulate)
protected abstract void doPrepare()
public final java.lang.Throwable commit(java.lang.Throwable accumulate)
commit
in interface Transactional
public final java.lang.Throwable abort(java.lang.Throwable accumulate)
abort
in interface Transactional
public final void close()
close
in interface java.lang.AutoCloseable
close
in interface Transactional
public final void prepareToCommit()
prepareToCommit
in interface Transactional
public java.lang.Object finish()
public final void abort()
public final void commit()
public final Transactional.AbstractTransactional.State state()
Copyright © 2021 The Apache Software Foundation