Class DefaultLifecycleService

    • Method Detail

      • validateStatus

        public void validateStatus​(ConnectorStatus... statuses)
        Description copied from interface: LifecycleService
        Validates if the current connector status contains provided ones.
        Specified by:
        validateStatus in interface LifecycleService
        Parameters:
        statuses - expected connector statuses
      • validateRequiredPrivileges

        public void validateRequiredPrivileges()
        Description copied from interface: LifecycleService
        Validates whether the application instance has been granted all privileges necessary to run the lifecycle processes.
        Specified by:
        validateRequiredPrivileges in interface LifecycleService
      • withRollbackHandling

        public ConnectorResponse withRollbackHandling​(Supplier<ConnectorResponse> action)
        Description copied from interface: LifecycleService
        Executes the specified action with handling of rollback and unexpected errors.

        If a ROLLBACK code was returned by the action - the connector status is updated accordingly and the action response is returned by this method.

        If an unexpected exception has been thrown during the action execution - a response with an UNKNOWN_ERROR code is returned by this method.

        Specified by:
        withRollbackHandling in interface LifecycleService
        Parameters:
        action - an action to execute
        Returns:
        a response with the code OK if the execution was successful, a response with the code ROLLBACK if the action performed a rollback operation, or a response with an UNKNOWN_ERROR code and an error message