[jbosscache-dev] Habanero: implementing peek() and _*() methods

Manik Surtani manik at jboss.org
Mon Aug 14 08:17:22 EDT 2006


In 2.0.0, all interceptors have a reference to a CacheSPI only.

This causes a problem in some interceptors (cache loader, lock  
interceptors, etc) which currently make a few direct calls to _get(),  
_put(), etc. to perform operations on the cache while bypassing the  
interceptor stack entirely.

What do people think the best way would be do provide this access for  
very specialised cases, but not exposing such calls in the CacheSPI  
interface for generic Interceptors people may implement?

I'm currently doing this by creating a 'bypassInterceptorChain'  
option and then calling a standard put() or get(), but this is at  
best a hack, plus it exposes the 'bypassInterceptorChain' option in a  
public API for users to (ab)use.  Any better ideas?

Cheers,
--
Manik Surtani

Lead, JBoss Cache
JBoss, a division of Red Hat

Email: manik at jboss.org
Telephone: +44 7786 702 706
MSN: manik at surtani.org
Yahoo/AIM/Skype: maniksurtani





More information about the jbosscache-dev mailing list