Class AdvancedFailoverHandler<T>
java.lang.Object
com.societegenerale.failover.core.AdvancedFailoverHandler<T>
- Type Parameters:
T- the type of the payload managed by this handler
- All Implemented Interfaces:
FailoverHandler<T>
FailoverHandler decorator that publishes metrics on every store/recover operation
and delegates payload post-processing to a RecoveredPayloadHandler.- Author:
- Anand Manissery
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclean()Removes all expired entries from the failover store.Recovers a previously stored payload after a failure.Stores the payload for later recovery.
-
Constructor Details
-
AdvancedFailoverHandler
public AdvancedFailoverHandler()
-
-
Method Details
-
store
Description copied from interface:FailoverHandlerStores the payload for later recovery.- Specified by:
storein interfaceFailoverHandler<T>- Parameters:
failover- annotation metadata for the failover pointargs- method arguments used to derive the store keypayload- the result to store- Returns:
- the stored payload
-
recover
Description copied from interface:FailoverHandlerRecovers a previously stored payload after a failure.- Specified by:
recoverin interfaceFailoverHandler<T>- Parameters:
failover- annotation metadata for the failover pointargs- method arguments used to derive the lookup keyclazz- expected return typecause- the exception that triggered recovery- Returns:
- the recovered payload, or
nullif not found or expired
-
recoverAll
- Specified by:
recoverAllin interfaceFailoverHandler<T>
-
clean
public void clean()Description copied from interface:FailoverHandlerRemoves all expired entries from the failover store.- Specified by:
cleanin interfaceFailoverHandler<T>
-