Interface CommitHandler

    • Method Detail

      • startListening

        void startListening()
        Called to initiate listening for transaction events.
      • waitForEvents

        void waitForEvents​(long timeout,
                           java.util.concurrent.TimeUnit timeUnit)
                    throws ContractException,
                           java.util.concurrent.TimeoutException,
                           java.lang.InterruptedException
        Block until enough transaction commit events have been received to satisfy the event handling strategy.
        Parameters:
        timeout - the maximum time to wait.
        timeUnit - the time unit of the timeout argument.
        Throws:
        ContractException - if the commit fails, either by being rejected by a peer of failing to meet the requirements of the strategy.
        java.util.concurrent.TimeoutException - if the strategy was not satisfied in time.
        java.lang.InterruptedException - if the current thread is interrupted while waiting.