[infinispan-issues] [JBoss JIRA] (ISPN-4134) Make Cache.evict() a cluster-wide operation
Dan Berindei (JIRA)
issues at jboss.org
Thu Apr 3 03:45:17 EDT 2014
[ https://issues.jboss.org/browse/ISPN-4134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12958764#comment-12958764 ]
Dan Berindei commented on ISPN-4134:
------------------------------------
I guess making {{Cache.evict()}} cluster-wide would be a natural evolution of what we've been doing so far.
{{evict()}} now behaves more or less like a regular {{remove()}} that writes the entry to the cache instead of removing it (or just skips the cache store, if passivation is disabled).
But the javadoc hasn't changed a lot since the beginning of the project, and it paints a completely different picture:
{noformat}
* This method is designed to evict an entry from memory to free up memory used by the application. This method uses
* a 0 lock acquisition timeout so it does not block in attempting to acquire locks. It behaves as a no-op if the
* lock on the entry cannot be acquired <i>immediately</i>.
* <p/>
* Important: this method should not be called from within a transaction scope.
{noformat}
> Make Cache.evict() a cluster-wide operation
> -------------------------------------------
>
> Key: ISPN-4134
> URL: https://issues.jboss.org/browse/ISPN-4134
> Project: Infinispan
> Issue Type: Enhancement
> Components: Eviction
> Affects Versions: 6.0.2.Final
> Reporter: Paul Ferraro
> Assignee: Dan Berindei
>
> Personally, I have never fully understood why Cache.evict() is a local-only operation.
> If a user wants to perform a cluster-wide evict, they need to implement their own RPC mechanism in order to perform the eviction on each node. Within WildFly, there are at least 2 use cases for such an operation.
> Why not instead make Cache.evict() a cluster-wide operation? The existing (i.e. local-only) behavior can always achieved via:
> AdvancedCache.withFlags(Flag.CACHE_MODE_LOCAL).evict(...)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list