[jbosscache-dev] Habanero: implementing peek() and _*() methods
Ben Wang
ben.wang at jboss.com
Tue Aug 15 22:49:18 EDT 2006
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