|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.util.interceptors.MethodReplayInterceptor
public class MethodReplayInterceptor
Generic aspect that will attempt to replay a method invocation if one of a set of specified exceptions is thrown from its execution.
Field Summary | |
---|---|
private org.apache.commons.logging.Log |
log
Log reference |
private TransactionalMethodReplayDecisionMaker |
replayDecisionMaker
Object which decides whether or not a method invocation should be replayed |
private int |
retryCount
How many times we should attempt to retry the method invocation if it fails |
private int |
retryInterval
How long we should wait before retrying - specified in milliseconds * |
private static long |
serialVersionUID
Serialization version identifier |
Constructor Summary | |
---|---|
MethodReplayInterceptor()
|
Method Summary | |
---|---|
int |
getRetryCount()
|
int |
getRetryInterval()
|
Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation)
Encloses super.invoke() in a try/catch block, where the
catch block contains additional retry logic. |
private boolean |
isReplayable(org.aopalliance.intercept.MethodInvocation invocation,
Exception exp)
Determine if we should attempt to replay the method given that the previous invocation returned the passed exception. |
void |
setReplayDecisionMaker(TransactionalMethodReplayDecisionMaker replayDecisionMaker)
|
void |
setRetryCount(int retryCount)
|
void |
setRetryInterval(int retryInterval)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private org.apache.commons.logging.Log log
private static final long serialVersionUID
private int retryCount
private int retryInterval
private TransactionalMethodReplayDecisionMaker replayDecisionMaker
Constructor Detail |
---|
public MethodReplayInterceptor()
Method Detail |
---|
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
super.invoke()
in a try/catch block, where the
catch block contains additional retry logic.
invoke
in interface org.aopalliance.intercept.MethodInterceptor
Throwable
public int getRetryCount()
public void setRetryCount(int retryCount)
public int getRetryInterval()
public void setRetryInterval(int retryInterval)
private boolean isReplayable(org.aopalliance.intercept.MethodInvocation invocation, Exception exp)
exp
-
public void setReplayDecisionMaker(TransactionalMethodReplayDecisionMaker replayDecisionMaker)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |