org.qi4j.library.cache
Class ReturnCachedValueOnExceptionConcern

java.lang.Object
  extended by org.qi4j.api.concern.ConcernOf<java.lang.reflect.InvocationHandler>
      extended by org.qi4j.library.cache.ReturnCachedValueOnExceptionConcern
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

@AppliesTo(value=Cached.class)
public class ReturnCachedValueOnExceptionConcern
extends ConcernOf<java.lang.reflect.InvocationHandler>
implements java.lang.reflect.InvocationHandler

Return value of @Cached calls on exceptions.

If an Exception occurs, try to reuse a previous result. Don't do anything on Throwables.


Field Summary
 
Fields inherited from class org.qi4j.api.concern.ConcernOf
next
 
Constructor Summary
ReturnCachedValueOnExceptionConcern()
           
 
Method Summary
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReturnCachedValueOnExceptionConcern

public ReturnCachedValueOnExceptionConcern()
Method Detail

invoke

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