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

    Constructors
    Constructor
    Description
    MemcacheServiceRetryProxy​(com.google.appengine.api.memcache.MemcacheService raw, int tries)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    invoke​(Object proxy, Method meth, Object[] args)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

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