Package org.ikasan.spec.recovery
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 voidcancel(ID identifier)Cancel a recovery given the current identifier for a flow (flow event id)voidcancelAll()Cancel any recovery currently running in the recovery manager.RESOLVERgetResolver()Get the resolver for this recovery manager.voidinitialise()Initialize the state of the recovery manager clearing down any previously held states resulting from previous executions.booleanisRecovering()Is the recovery manager currently running a recovery.booleanisUnrecoverable()Is the recovery manager in an unrecoverable state.<EVENT> voidrecover(CONTEXT context, java.lang.Throwable throwable, EVENT event, ID identifier)Start or continue a recovery based on the passed CONTEXTvoidrecover(java.lang.String component, java.lang.Throwable throwable)Start or continue a recovery based on the passed CRITERIA.<MANAGED_RESOURCES>
voidsetManagedResources(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.voidsetResolver(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.
-
-