Interface ServerTransactionManager

    • Method Detail

      • runObservations

        void runObservations​(java.lang.String name,
                             BiConsumer<StreamElement,​Pair<java.lang.Long,​java.lang.Object>> updateConsumer,
                             CommitLogObserver requestObserver)
        Observe all transactional families with given observer.
        Parameters:
        name - name of the observer (will be appended with name of the family)
        updateConsumer - consumer of updates to the view of transaction states
        requestObserver - the observer (need not be synchronized)
      • getCurrentState

        State getCurrentState​(java.lang.String transactionId)
        Retrieve current state of the transaction.
        Parameters:
        transactionId - ID of the transaction
        Returns:
        the State associated with the transaction on server
      • ensureTransactionOpen

        void ensureTransactionOpen​(java.lang.String transactionId,
                                   State state)
        Ensure that the given transaction ID is initialized.
        Parameters:
        transactionId - ID of the transaction
        state - the state that the transaction is supposed to have
      • writeResponseAndUpdateState

        void writeResponseAndUpdateState​(java.lang.String transactionId,
                                         State state,
                                         java.lang.String responseId,
                                         Response response,
                                         CommitCallback callback)
        Atomically write response and update state of a transaction
        Parameters:
        transactionId - ID of transaction
        state - the state to update the transaction to
        responseId - ID of response
        response - the response
        callback - callback for commit after write
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • houseKeeping

        void houseKeeping()
        Called by the server to signal that the manager should reclaim any resources that are not needed anymore.