Skip to content

Commit 05a3ddc

Browse files
committed
Rename "retries" to "tries" in the MemcacheServiceRetryProxy
It’s more accurate
1 parent 3d72caf commit 05a3ddc

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/main/java/com/googlecode/objectify/cache/MemcacheServiceRetryProxy.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ public class MemcacheServiceRetryProxy implements InvocationHandler
2121
private static final Logger log = Logger.getLogger(MemcacheServiceRetryProxy.class.getName());
2222

2323
/** */
24-
private static final int DEFAULT_RETRIES = 4;
24+
private static final int DEFAULT_TRIES = 4;
2525

2626
/**
2727
* Create the proxy that does retries. Adds a strict error handler to the service.
2828
*/
2929
public static MemcacheService createProxy(MemcacheService raw)
3030
{
31-
return createProxy(raw, DEFAULT_RETRIES);
31+
return createProxy(raw, DEFAULT_TRIES);
3232
}
3333

3434
/**
@@ -48,13 +48,13 @@ public static MemcacheService createProxy(MemcacheService raw, int retryCount)
4848
private MemcacheService raw;
4949

5050
/** */
51-
private int retries;
51+
private int tries;
5252

5353
/** */
54-
public MemcacheServiceRetryProxy(MemcacheService raw, int retries)
54+
public MemcacheServiceRetryProxy(MemcacheService raw, int tries)
5555
{
5656
this.raw = raw;
57-
this.retries = retries;
57+
this.tries = tries;
5858
}
5959

6060
/* (non-Javadoc)
@@ -63,11 +63,11 @@ public MemcacheServiceRetryProxy(MemcacheService raw, int retries)
6363
@Override
6464
public Object invoke(Object proxy, Method meth, Object[] args) throws Throwable
6565
{
66-
for (int i=0; i<this.retries; i++) {
66+
for (int i = 0; i<this.tries; i++) {
6767
try {
6868
return meth.invoke(this.raw, args);
6969
} catch (InvocationTargetException ex) {
70-
if (i == (this.retries - 1))
70+
if (i == (this.tries - 1))
7171
log.log(Level.SEVERE, "Memcache operation failed, giving up", ex);
7272
else
7373
log.log(Level.WARNING, "Error performing memcache operation, retrying: " + meth, ex);

0 commit comments

Comments
 (0)