ca.uhn.cache.proxy.impl
Class AbstractMethodAdapter
java.lang.Object
ca.uhn.cache.proxy.impl.AbstractMethodAdapter
- All Implemented Interfaces:
- IMethodAdapter
- public abstract class AbstractMethodAdapter
- extends java.lang.Object
- implements IMethodAdapter
Base implementation of IMethodAdapter.
- Version:
- $Revision: 1.1 $ updated on $Date: 2005/01/24 22:53:38 $ by $Author: bryan_tripp $
- Author:
- Bryan Tripp
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMethodAdapter
public AbstractMethodAdapter(java.lang.String theMethodName,
java.lang.Class[] theArgTypes,
int theMaxGroups,
IDataInspector theInspector)
- Parameters:
theMethodName
- name of the method to be wrappedtheArgTypes
- classes of arguments (in order) of method to be wrappedtheMaxGroups
- maximum number of allowed queries with which to express a remainder
(generally, more means more queries but fewer un-needed results)theInspector
- expressor of method arguments as IQueryParams
AbstractMethodAdapter
public AbstractMethodAdapter(java.lang.reflect.Method theMethod,
int theMaxGroups,
IDataInspector theInspector)
- Parameters:
theMethod
- the method to be wrappedtheMaxGroups
- maximum number of allowed queries with which to express a remainder
(generally, more means more queries but fewer un-needed results)theInspector
- expressor of method arguments as IQueryParams
getMethodName
public java.lang.String getMethodName()
- Specified by:
getMethodName
in interface IMethodAdapter
- Returns:
- the name of the adapted Java method
- See Also:
IMethodAdapter.getMethodName()
getArgTypes
public java.lang.Class[] getArgTypes()
- Specified by:
getArgTypes
in interface IMethodAdapter
- Returns:
- the argument types of the adapted Java method
- See Also:
IMethodAdapter.getArgTypes()
getMaxGroups
public int getMaxGroups()
- Specified by:
getMaxGroups
in interface IMethodAdapter
- Returns:
- the maximum number of calls to the source system (remainder queries)
that should be executed per single method call. Generally, the more are allowed,
the less they will span data that are already cached.
- See Also:
IMethodAdapter.getMaxGroups()
getReason
public CacheReasonEnum getReason(java.lang.Object[] theMethodArgs)
- Defaults to CacheReasonEnum.QUERY.
- Specified by:
getReason
in interface IMethodAdapter
- Parameters:
theMethodArgs
- method arguments defining query parameters
- Returns:
- reason for caching data, if this can be determined from the args (defaults
to CacheReasonEnum.QUERY if nothing more specific is known)
- See Also:
IMethodAdapter.getReason(java.lang.Object[])
getDataInspector
public IDataInspector getDataInspector()
- Specified by:
getDataInspector
in interface IMethodAdapter
- Returns:
- a helper that knows things about data items
- See Also:
IMethodAdapter.getDataInspector()
Copyright © 2004-2005 University Health Network. All Rights Reserved.