Interface RecoveryManager<RESOLVER,​CONTEXT,​ID>


  • public interface RecoveryManager<RESOLVER,​CONTEXT,​ID>
    Recovery Manager contract.
    Author:
    Ikasan Development Teams
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void cancel​(ID identifier)
      Cancel a recovery given the current identifier for a flow (flow event id)
      void cancelAll()
      Cancel any recovery currently running in the recovery manager.
      RESOLVER getResolver()
      Get the resolver for this recovery manager.
      void initialise()
      Initialize the state of the recovery manager clearing down any previously held states resulting from previous executions.
      boolean isRecovering()
      Is the recovery manager currently running a recovery.
      boolean isUnrecoverable()
      Is the recovery manager in an unrecoverable state.
      <EVENT> void recover​(CONTEXT context, java.lang.Throwable throwable, EVENT event, ID identifier)
      Start or continue a recovery based on the passed CONTEXT
      void recover​(java.lang.String component, java.lang.Throwable throwable)
      Start or continue a recovery based on the passed CRITERIA.
      <MANAGED_RESOURCES>
      void
      setManagedResources​(MANAGED_RESOURCES managedResources)
      Set a resolver which translates the incoming exception and component name in to an action to be taken by the recovery manager.
      void setResolver​(RESOLVER resolver)
      Set a resolver which translates the incoming exception and component name in to an action to be taken by the recovery manager.
    • Method Detail

      • setResolver

        void setResolver​(RESOLVER resolver)
        Set a resolver which translates the incoming exception and component name in to an action to be taken by the recovery manager.
        Parameters:
        resolver -
      • setManagedResources

        <MANAGED_RESOURCES> void setManagedResources​(MANAGED_RESOURCES managedResources)
        Set a resolver which translates the incoming exception and component name in to an action to be taken by the recovery manager.
        Type Parameters:
        MANAGED_RESOURCES -
        Parameters:
        managedResources -
      • getResolver

        RESOLVER getResolver()
        Get the resolver for this recovery manager.
        Returns:
        resolver
      • recover

        <EVENT> void recover​(CONTEXT context,
                             java.lang.Throwable throwable,
                             EVENT event,
                             ID identifier)
        Start or continue a recovery based on the passed CONTEXT
        Type Parameters:
        EVENT -
        ID -
        Parameters:
        context -
        throwable -
        event -
        identifier -
      • recover

        void recover​(java.lang.String component,
                     java.lang.Throwable throwable)
        Start or continue a recovery based on the passed CRITERIA.
        Parameters:
        component -
        throwable -
      • isRecovering

        boolean isRecovering()
        Is the recovery manager currently running a recovery.
        Returns:
      • isUnrecoverable

        boolean isUnrecoverable()
        Is the recovery manager in an unrecoverable state.
        Returns:
      • cancelAll

        void cancelAll()
        Cancel any recovery currently running in the recovery manager.
      • cancel

        void cancel​(ID identifier)
        Cancel a recovery given the current identifier for a flow (flow event id)
        Parameters:
        identifier - the identifier
      • initialise

        void initialise()
        Initialize the state of the recovery manager clearing down any previously held states resulting from previous executions.