[infinispan-issues] [JBoss JIRA] Commented: (ISPN-905) Enhance cache management methods on EmbeddedCacheManager

Galder Zamarreño (JIRA) jira-events at lists.jboss.org
Thu Feb 3 14:40:39 EST 2011


    [ https://issues.jboss.org/browse/ISPN-905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12579991#comment-12579991 ] 

Galder Zamarreño commented on ISPN-905:
---------------------------------------

The problem with listeners is that once you've closed a Cache, what is the other node gonna do? Close itself? You'll start to get some hard to deal reentrant @CacheStopped callbacks. Not nice. We avoid using listeners for internal stuff since they're quite restrictive. They're very useful for user code though. Most likely there will be some kind of RPC call. I've just finished with ISPN-915 which is key to making sure Cache.stop()/CacheManager.remove() are tx friendly.

Patrick, I still don't get what cacheExists/getCacheIfExists give you even if you plan to use them as store. You're gonna have to give me a tangible example to convince me to add them. As a side note, I can see the point of getting a cache but not starting it (ISPN-627) since that would allow you to hook listeners to Cache before it's started and so receive callbacks related to rehashing/state transfer. So, to convince me, show me what you'd do with those methods, particularly, what would you do different if cacheExists() return false, or getCacheIfExists() returned null.

> Enhance cache management methods on EmbeddedCacheManager
> --------------------------------------------------------
>
>                 Key: ISPN-905
>                 URL: https://issues.jboss.org/browse/ISPN-905
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Core API
>    Affects Versions: 4.2.0.Final
>            Reporter: Patrick McFarland
>            Assignee: Galder Zamarreño
>             Fix For: 5.0.0.ALPHA3, 5.0.0.Final
>
>
> These should include:
> {code:borderStyle=solid}
> boolean cacheExists(String cache)
> Cache<?, ?> getCacheIfExists(String cache)
> boolean remove(String Cache)
> {code}
> Original request:
> {quote}
> There seems to be no ability to check if a populated cache exists through both CacheManager and through Cache (=is this still a valid handle) and to get a cache if it exists.
> {quote}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the infinispan-issues mailing list