@NoExtend public abstract class AbstractPolicyTemplate extends AbstractComponent implements RetryPolicyTemplate
Modifier and Type | Field and Description |
---|---|
protected RetryNotifier |
notifier |
LOCATION_KEY, ROOT_CONTAINER_NAME_KEY
ANNOTATIONS_PROPERTY_NAME
Constructor and Description |
---|
AbstractPolicyTemplate() |
Modifier and Type | Method and Description |
---|---|
RetryContext |
execute(RetryCallback callback,
Executor workManager)
Applies the retry policy by performing a blocking action.
|
Map<Object,Object> |
getMetaInfo() |
RetryNotifier |
getNotifier() |
void |
setId(String id) |
void |
setMetaInfo(Map<Object,Object> metaInfo) |
void |
setNotificationFirer(NotificationDispatcher notificationFirer) |
void |
setNotifier(RetryNotifier retryNotifier) |
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyPolicy, applyPolicy, createRetryInstance
protected RetryNotifier notifier
public RetryContext execute(RetryCallback callback, Executor workManager) throws Exception
RetryPolicyTemplate
execute
in interface RetryPolicyTemplate
callback
- a callback with the logic to be executed on each retryworkManager
- the executor on which the retry operations are to be executedRetryContext
Exception
public RetryNotifier getNotifier()
getNotifier
in interface RetryPolicyTemplate
public void setNotifier(RetryNotifier retryNotifier)
setNotifier
in interface RetryPolicyTemplate
public Map<Object,Object> getMetaInfo()
getMetaInfo
in interface RetryPolicyTemplate
public void setMetaInfo(Map<Object,Object> metaInfo)
setMetaInfo
in interface RetryPolicyTemplate
public void setId(String id)
public void setNotificationFirer(NotificationDispatcher notificationFirer)
Copyright © 2018. All rights reserved.