[infinispan-dev] EmbeddedCacheManager needs getRunningCacheNames, doesn't it?
Patrick McFarland
pmcfarland at adterrasperaspera.com
Sat Mar 12 12:42:32 EST 2011
No, getCacheNames() should _already_ list everything thats defined
and/or running. .stop() and .removeCache() should happily no op on
stopped/non-existent caches.
On Fri, Mar 11, 2011 at 11:22 AM, Galder Zamarreño
<galder.zamarreno at redhat.com> wrote:
> Guys,
>
> This (http://community.jboss.org/message/592436#592436) thread brought up an interesting limitation of our CacheManager API.
>
> Let's say you wanna remove all caches within a cache manager, and by remote I mean not only clear the in memory contents, but also the cache store stuff (so, similar to what is suggested in https://issues.jboss.org/browse/ISPN-905 but at the cache manager level)
>
> I don't think this is such a common use case to require a removeAllCaches() at the CacheManager level (or maybe it does?). One would imagine that given a removeCache(name), you should be able to get all cache names and loop through them. However, there's no such method. We have getCacheNames() but that's only limited to the cache names that have predefined either via XML, as <namedCache>, or programmatically via defineConfiguration. Any other cache that might have been started and whose name was not predefined would be a running a cache based on the default config. However, there's no way to find out about all these caches.
>
> So, rather than providing removeAllCaches(), it might more interesting to provide: getRunningCacheNames() which would be getCacheNames() + (undefined caches that have been started which are based on default config). Or maybe we wanna provide both!
>
> Clearly, something for 5.0.
>
> Thoughts?
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
--
Patrick "Diablo-D3" McFarland || www.AdTerrasPerAspera.com
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." -- Kristian Wilson, Nintendo, Inc, 1989
More information about the infinispan-dev
mailing list