]
Mircea Markus resolved ISPN-538.
--------------------------------
Fix Version/s: 4.1.0.CR2
Resolution: Done
added a class hierarchy.
remove code duplication from HotRodOperationsImpl
-------------------------------------------------
Key: ISPN-538
URL:
https://jira.jboss.org/browse/ISPN-538
Project: Infinispan
Issue Type: Feature Request
Reporter: Mircea Markus
Assignee: Mircea Markus
Fix For: 4.1.0.CR2
HotRodOperationsImpl - contain code duplication in the way retry is handled. Basically
following logic is replicated through all operations:
Transport transport = getTransport(key, true);
int retryCount = 0;
do {
try {
//to something here
} catch (TransportException te) {
logErrorAndThrowExceptionIfNeeded(retryCount, te);
} finally {
releaseTransport(transport);
}
if (shouldRetry(retryCount)) {
transport = getTransport(key, false);
}
retryCount++;
} while (shouldRetry(retryCount));
throw new IllegalStateException("We should not reach here!");
This should be factorized in a TemplateMethod because: a - duplication is evil and b -
duplication is more even in a reference implementation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: