Package com.googlecode.objectify.cache
Class MemcacheServiceRetryProxy
java.lang.Object
com.googlecode.objectify.cache.MemcacheServiceRetryProxy
- All Implemented Interfaces:
InvocationHandler
public class MemcacheServiceRetryProxy extends Object implements InvocationHandler
Dynamic proxy which wraps a MemcacheService and adds retries when an exception occurs. It logs and masks exceptions on complete failure.
- Author:
- Jeff Schnitzer
-
Constructor Summary
ConstructorDescriptionMemcacheServiceRetryProxy(com.google.appengine.api.memcache.MemcacheService raw, int tries)
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.appengine.api.memcache.MemcacheService
createProxy(com.google.appengine.api.memcache.MemcacheService raw)
Create the proxy that does retries.static com.google.appengine.api.memcache.MemcacheService
createProxy(com.google.appengine.api.memcache.MemcacheService raw, int retryCount)
Create the proxy that does retries.
-
Constructor Details
-
MemcacheServiceRetryProxy
public MemcacheServiceRetryProxy(com.google.appengine.api.memcache.MemcacheService raw, int tries)
-
-
Method Details
-
createProxy
public static com.google.appengine.api.memcache.MemcacheService createProxy(com.google.appengine.api.memcache.MemcacheService raw)Create the proxy that does retries. Adds a strict error handler to the service. -
createProxy
public static com.google.appengine.api.memcache.MemcacheService createProxy(com.google.appengine.api.memcache.MemcacheService raw, int retryCount)Create the proxy that does retries. Adds a strict error handler to the service. -
invoke
- Specified by:
invoke
in interfaceInvocationHandler
- Throws:
Throwable
-