Writing user guides does have it's merits.
I picked up a really pointless method in CacheSPI.
CacheSPI.add/removeInterceptor(), meant for people who want to inject
their own custom interceptors in the chain.
Great, very useful, but how does one get a hold of a CacheSPI to do
this? CacheSPIs will get injected into the custom interceptor,
*after* it is added to the chain, but until then, a user does not
have a CacheSPI reference.
I see 2 ways around this, each one as unpalatable as the next.
1. Overload createCache() methods in CacheFactory to pass in
interceptor(s) to be added, and their relative positions in the
chain. Ok if we're just adding one interceptor, horrible if we're
adding several. We could have used varargs and it would have been
fine if it was just interceptors we're passing in and not
interceptors AND positions.
2. Pull up add/removeInterceptor() to Cache. Ugly for obvious reasons.
Can anyone think of anything else?
I'm holding back tagging BETA1 till the end of the week; now that CC
is alive again I want to stabilise the code as well as some more work
on the docs.
Cheers,
--
Manik Surtani
Lead, JBoss Cache
JBoss, a division of Red Hat
Email: manik(a)jboss.org
Telephone: +44 7786 702 706
MSN: manik(a)surtani.org
Yahoo/AIM/Skype: maniksurtani
Show replies by date