org.castor.cache

Class AbstractBaseCache

Implemented Interfaces:
Cache, Map
Known Direct Subclasses:
AbstractDistributedCache, AbstractHashbelt, CountLimited, EHCache, JcsCache, NoCache, OsCache, TimeLimited, Unlimited

public abstract class AbstractBaseCache
extends java.lang.Object
implements Cache

Base implementation of all LRU cache types.
Version:
$Revision: 6907 $ $Date: 2006-05-05 13:53:54 -0600 (Fri, 05 May 2006) $
Authors:
Werner Guttmann
Ralf Joachim
Since:
1.0

Fields inherited from interface org.castor.cache.Cache

DEFAULT_DEBUG, DEFAULT_NAME, DEFAULT_TYPE, PARAM_DEBUG, PARAM_NAME, PARAM_TYPE

Method Summary

void
close()
void
expire(Object key)
void
expireAll()
String
getName()
void
initialize(Properties params)
protected Object
invokeMethod(Object target, String name, Class[] types, Object[] arguments)
Invoke method with given name and arguments having parameters of types specified on the given target.
protected Object
invokeStaticMethod(Class target, String name, Class[] types, Object[] arguments)
Invoke static method with given name and arguments having parameters of types specified on the given target.

Method Details

close

public void close()
Specified by:
close in interface Cache
See Also:
Cache.close()

expire

public final void expire(Object key)
Specified by:
expire in interface Cache
See Also:
org.castor.cache.Cache.expire(java.lang.Object)

expireAll

public final void expireAll()
Specified by:
expireAll in interface Cache

getName

public final String getName()
Specified by:
getName in interface Cache

initialize

public void initialize(Properties params)
            throws CacheAcquireException
Specified by:
initialize in interface Cache
See Also:
org.castor.cache.Cache.initialize(java.util.Properties)

invokeMethod

protected final Object invokeMethod(Object target,
                                    String name,
                                    Class[] types,
                                    Object[] arguments)
            throws NoSuchMethodException,
                   IllegalAccessException,
                   InvocationTargetException
Invoke method with given name and arguments having parameters of types specified on the given target.
Parameters:
target - The target object to invoke the method on.
name - The name of the method to invoke.
types - The types of the parameters.
arguments - The parameters.
Returns:
The result of the method invokation.

invokeStaticMethod

protected final Object invokeStaticMethod(Class target,
                                          String name,
                                          Class[] types,
                                          Object[] arguments)
            throws NoSuchMethodException,
                   IllegalAccessException,
                   InvocationTargetException
Invoke static method with given name and arguments having parameters of types specified on the given target.
Parameters:
target - The target object to invoke the method on.
name - The name of the method to invoke.
types - The types of the parameters.
arguments - The parameters.
Returns:
The result of the method invokation.

Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com