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

Manik Surtani manik at jboss.org
Wed Aug 16 05:25:20 EDT 2006


I agree that access to _* methods will be useful/necessary.

This is why I proposed an interceptor chain bypass option, rather  
than directly exposing methods.  My problem with directly exposing  
methods is that end users may see these and use them.


--
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


On 16 Aug 2006, at 03:49, Ben Wang wrote:

> Since I haven't done the integration so it is difficult to say for  
> sure. But I have a feeling that I will need to have the access to  
> _* methods as well from PojoCache. So would it be OK then to create  
> a delegate interface from CacheSPI (e.g., NakedNode, in that calls  
> here are not going thru any interceptor chain) that exposes these  
> APIs? User can still access these but at least it doesn't pollute  
> the SPI interfaces.
>
> BTW, maybe this deserves a forum thread? :-)
>
> My 2 cents,
>
> -Ben
>
>
> -----Original Message-----
> From: jbosscache-dev-bounces at lists.jboss.org [mailto:jbosscache-dev- 
> bounces at lists.jboss.org] On Behalf Of Manik Surtani
> Sent: Monday, August 14, 2006 8:17 PM
> To: jbosscache-dev at lists.jboss.org
> Subject: [jbosscache-dev] Habanero: implementing peek() and _*()  
> methods
>
> 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
>
>
> _______________________________________________
> jbosscache-dev mailing list
> jbosscache-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosscache-dev




More information about the jbosscache-dev mailing list