@Deprecated public class NavuCdbTwoPhaseSubscriber extends NavuCdbConfigSubscriber implements NavuCdbSubscriber, Runnable
A subscriber that alows users that register implemementations of both the prepare and iterate methods.
In the prepare methods which is invoked in the
prepare phase of a transation ,
( retrieved from NavuCdbSubscriptionContext.getNotifType()
)
user code may which to abort the current transaction.
When a transaction is aborted, delivery of any
remaining CdbNotificationType.SUB_PREPARE
notifications is
cancelled. A subscribers that had already been notified with
SUB_PREPARE will be notified with
CdbNotificationType.SUB_ABORT
.
(This notification will be done in reverse order of the
SUB_PREPARE. The transaction could be aborted because one of
the subscribers that received SUB_PREPARE called
NavuCdbSubscriptionTwoPhaseContext.abort(CdbExtendedException)
,
but it could also be caused for other reasons, for example another data
provider (than CDB) can abort the transaction.
To create a NavuCdbTwoPhaseSubscriber
it is preferable to
use the method NavuCdbSubscribers.twoPhaseSubscriber(String,int)
.
The registration of a configuration path is done through one of its
register
methods.
There can be multiple registrations on a instance of a
NavuCdbTwoPhaseSubscriber
. Further the same instance
could be register to handle multiple subscription paths.
A registration of a user provided callback will always have priority set to 1.
This class implements the runnable interface which means that
it will be submitted to the underlying ExecutorService
upon successfully call to NavuCdbConfigSubscriber.subscriberStart()
.
register, register, register, register, registerSyncTypeOnException, run, shutDownOnException, subscriberStart
awaitRunning, awaitStopped, configSubscriber, configSubscriber, configSubscriber, configSubscriber, executor, getIterationQueue, isRunning, isStopped, operSubscriber, operSubscriber, operSubscriber, operSubscriber, operSubscriber, registerStoppedHandler, subscriberStop, twoPhaseSubscriber, twoPhaseSubscriber
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
awaitRunning, awaitStopped, executor, getIterationQueue, isRunning, isStopped, register, register, register, register, registerStoppedHandler, shutDownOnException, subscriberStart, subscriberStop