Interface EventAccumulator

    • Method Detail

      • recordEventForOperation

        void recordEventForOperation​(Transaction transaction,
                                     FedoraId fedoraId,
                                     ResourceOperation operation)
        Registers a new event to a transaction.
        Parameters:
        transaction - the transaction
        fedoraId - the id of the affected resource
        operation - the operation affecting the resource
      • emitEvents

        void emitEvents​(Transaction transaction,
                        String baseUrl,
                        String userAgent)
        Emits all of the events that were accumulated within the transaction. Multiple events affecting the same resource are combined into a single event.

        This method SHOULD NOT throw an exception if an event fails to be emitted. It should always attempt to emit all events accumulated within a transaction.

        Parameters:
        transaction - the transaction
        baseUrl - the baseUrl of the requests
        userAgent - the user-agent of the user making the requests
      • clearEvents

        void clearEvents​(Transaction transaction)
        Removes all of a transaction's accumulated events without emitting them. This must be called when a transaction is rolled back.
        Parameters:
        transaction - the id of the transaction