org.apache.jetspeed.components.interceptors
Class CachingInterceptor

java.lang.Object
  extended by org.apache.jetspeed.components.interceptors.AbstractCacheInterceptor
      extended by org.apache.jetspeed.components.interceptors.CachingInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class CachingInterceptor
extends AbstractCacheInterceptor

CacheInterceptor

AoP Interceptor that can be used for generalized caching. The only requirement is that intercepted methods must receive at least one (1) arguments.

CacheInterceptor ALWAYS use the first argument in the method to build the unique cache key.

Version:
$Id: CachingInterceptor.java 516448 2007-03-09 16:25:47Z ate $
Author:
Scott T. Weaver

Field Summary
 
Fields inherited from class org.apache.jetspeed.components.interceptors.AbstractCacheInterceptor
cache, uniquePrefix
 
Constructor Summary
CachingInterceptor(GeneralCache cache)
           
 
Method Summary
protected  java.lang.Object doCacheOperation(org.aopalliance.intercept.MethodInvocation mi, java.lang.String uniqueKey)
           doCacheOperation
 
Methods inherited from class org.apache.jetspeed.components.interceptors.AbstractCacheInterceptor
buildKey, invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingInterceptor

public CachingInterceptor(GeneralCache cache)
Parameters:
cache -
Method Detail

doCacheOperation

protected java.lang.Object doCacheOperation(org.aopalliance.intercept.MethodInvocation mi,
                                            java.lang.String uniqueKey)
                                     throws java.lang.Throwable

doCacheOperation

Specified by:
doCacheOperation in class AbstractCacheInterceptor
Parameters:
mi -
uniqueKey -
Returns:
Throws:
java.lang.Throwable


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.