com.googlecode.objectify.cache
Class MemcacheServiceRetryProxy

java.lang.Object
  extended by com.googlecode.objectify.cache.MemcacheServiceRetryProxy
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class MemcacheServiceRetryProxy
extends java.lang.Object
implements java.lang.reflect.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
MemcacheServiceRetryProxy(com.google.appengine.api.memcache.MemcacheService raw, int retries)
           
 
Method Summary
static 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.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method meth, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemcacheServiceRetryProxy

public MemcacheServiceRetryProxy(com.google.appengine.api.memcache.MemcacheService raw,
                                 int retries)
Method Detail

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

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method meth,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable


Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1