Yep, that's it exactly.
Logically the same thing could be done for Node, although I personally
don't have a need for it.
Mircea Markus wrote:
If I understood it correctly, what you need is a default cache(node)
delegate: a class that extends Cache interface, wraps a Cache instance
and delegate all calls to it.
Whenever you want to extend it, all you would have to do is only
override the methods you're interested in, so that if new methods are
added your code will still be compilable.
Am I right?
Brian Stansberry wrote:
> I've got a couple places where I've actually implemented the Cache
> interface in order add a bit of specialized behavior (one is in a
> test, one is to disable calls to stop/destroy by anyone but the AS
> CacheManager that created the cache). Simple stuff, just pass the real
> cache to the constructor and delegate to it.
>
> Problem is the Cache API changes via addition of new methods, which
> breaks these things. Can the next release of JBC (not asking for it in
> 3.1.0) include a class that does this?
>
> I include Node in $subject since the same conceptual issue applies
> there as well.
>
> Same request would apply to horizon as well.
>
--
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
brian.stansberry(a)redhat.com