[infinispan-issues] [JBoss JIRA] (ISPN-6443) Add ability to cancel an event in a listener

Vincent Massol (JIRA) issues at jboss.org
Tue Mar 29 06:39:00 EDT 2016


     [ https://issues.jboss.org/browse/ISPN-6443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent Massol updated ISPN-6443:
---------------------------------
    Description: 
My use case is the following:
* I have some lenghty computation that I cache
* I don't want users to incur the wait before the computation is finished

One idea is:
* Upon expiration (or eviction), I'd like to put back the entry in the cache and start a thread to perform a recomputation (which would put the recomputed value in the cache)
* The issue is that the cache has a lock on the entry and thus I can't put it back in the cache.

Thus one solution is to be able to cancel the expiration/eviction events (and thus not have to put back the entry in the cache).

  was:
My use case is the following:
* I have some lenghty computation that I cache
* I don't want users to incur the wait before the computation is finished
* Thus, upon expiration, I'd like to put back the entry in the cache and start a thread to perform a recomputation (which would put the recomputed value in the cache)
* The issue is that the cache has a lock on the entry and thus I can't put it back in the cache.

Thus one solution is to be able to cancel the expiration event (and thus not have to put back the entry in the cache).



> Add ability to cancel an event in a listener
> --------------------------------------------
>
>                 Key: ISPN-6443
>                 URL: https://issues.jboss.org/browse/ISPN-6443
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Core, Expiration
>    Affects Versions: 8.2.0.Final
>            Reporter: Vincent Massol
>
> My use case is the following:
> * I have some lenghty computation that I cache
> * I don't want users to incur the wait before the computation is finished
> One idea is:
> * Upon expiration (or eviction), I'd like to put back the entry in the cache and start a thread to perform a recomputation (which would put the recomputed value in the cache)
> * The issue is that the cache has a lock on the entry and thus I can't put it back in the cache.
> Thus one solution is to be able to cancel the expiration/eviction events (and thus not have to put back the entry in the cache).



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list