Class TotalOrderManager


  • public class TotalOrderManager
    extends Object
    This class behaves as a synchronization point between incoming transactions (totally ordered) and between incoming transactions and state transfer.

    Main functions:

    • ensure an order between prepares before sending them to the thread pool, i.e. non-conflicting prepares can be processed concurrently;
    • ensure that the state transfer waits for the previous delivered prepares;
    • ensure that the prepare waits for state transfer in progress.
    Since:
    5.3
    Author:
    Pedro Ruivo
    • Constructor Detail

      • TotalOrderManager

        public TotalOrderManager()
    • Method Detail

      • release

        public final void release​(TotalOrderRemoteTransactionState state)
        Release the locked key possibly unblock waiting prepares.
        Parameters:
        state - the state
      • notifyStateTransferStart

        public final Collection<TotalOrderLatch> notifyStateTransferStart​(int topologyId,
                                                                          boolean isRebalance)
        It notifies that a state transfer is about to start.
        Parameters:
        topologyId - the new topology ID
        Returns:
        the current pending prepares
      • notifyStateTransferEnd

        public final void notifyStateTransferEnd()
        It notifies the end of the state transfer possibly unblock waiting prepares.
      • hasAnyLockAcquired

        public final boolean hasAnyLockAcquired()