|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.handler.AbstractRetryOperationExceptionHandler<Q,S>
Q - type of ldap requestS - type of ldap responsepublic abstract class AbstractRetryOperationExceptionHandler<Q extends Request,S>
Provides common implementation for retrying after an operation exception.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
AbstractRetryOperationExceptionHandler()
|
|
| Method Summary | |
|---|---|
protected abstract HandlerResult<Response<S>> |
createResult(Connection conn,
Q request,
Response<S> response)
Invoked if handleInternal(org.ldaptive.Connection, Q, org.ldaptive.Response succeeded. |
int |
getRetry()
Returns the retry. |
int |
getRetryBackoff()
Returns the retry backoff. |
long |
getRetryWait()
Returns the retry wait. |
HandlerResult<Response<S>> |
handle(Connection conn,
Q request,
Response<S> response)
Handle the supplied result. |
protected abstract void |
handleInternal(Connection conn,
Q request,
Response<S> response)
Perform any operations required to recover from the operation exception. |
protected boolean |
retry(int count)
Returns whether the supplied count indicates that the operation should be retried. |
void |
setRetry(int i)
Sets the number of retries. |
void |
setRetryBackoff(int backoff)
Sets the retry backoff. |
void |
setRetryWait(long time)
Sets the retry wait. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public AbstractRetryOperationExceptionHandler()
| Method Detail |
|---|
public int getRetry()
public void setRetry(int i)
i - to setpublic long getRetryWait()
public void setRetryWait(long time)
time - in secondspublic int getRetryBackoff()
public void setRetryBackoff(int backoff)
backoff - to set
public HandlerResult<Response<S>> handle(Connection conn,
Q request,
Response<S> response)
throws LdapException
handle in interface Handler<Q extends Request,Response<S>>handle in interface OperationExceptionHandler<Q extends Request,S>conn - connection the operation was executed onrequest - executed by the operationresponse - produced from the operation
LdapException - if handling fails
protected abstract void handleInternal(Connection conn,
Q request,
Response<S> response)
throws LdapException
conn - connection the operation was executed onrequest - executed by the operationresponse - typically null
LdapException - if the retry fails
protected abstract HandlerResult<Response<S>> createResult(Connection conn,
Q request,
Response<S> response)
throws LdapException
handleInternal(org.ldaptive.Connection, Q, org.ldaptive.Response) succeeded. Creates a response for the
original invocation that failed.
conn - connection the operation was executed onrequest - executed by the operationresponse - typically null
LdapException - if the operation failsprotected boolean retry(int count)
count - number of times the operation has been retried
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||