[infinispan-issues] [JBoss JIRA] (ISPN-5482) JSR-107 - Provide mechanism to handle expiration events

RH Bugzilla Integration (JIRA) issues at jboss.org
Wed Dec 16 10:23:01 EST 2015


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

RH Bugzilla Integration commented on ISPN-5482:
-----------------------------------------------

Sebastian Łaskawiec <slaskawi at redhat.com> changed the Status of [bug 1222995|https://bugzilla.redhat.com/show_bug.cgi?id=1222995] from MODIFIED to ON_QA

> JSR-107 - Provide mechanism to handle expiration events 
> --------------------------------------------------------
>
>                 Key: ISPN-5482
>                 URL: https://issues.jboss.org/browse/ISPN-5482
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: JCache
>            Reporter: Matej Čimbora
>            Assignee: Gustavo Fernandes
>             Fix For: 8.2.0.Alpha1, 8.0.3.Final
>
>
> Currently, expiration events are supported only by embedded mode & additionally require entry to be accessed in order to be created. This can lead to CacheEntryExpiredListener not being notified when an entry expires.
> Note: Not covered by TCK tests.
> Example:
> {code}
>    @Test
>    public void testExpiration(Method m) {
>       Cache<String, String> cache1 = getCache1(m);
>       Cache<String, String> cache2 = getCache2(m);
>       TestExpiredListener listener = new TestExpiredListener();
>       MutableCacheEntryListenerConfiguration conf1 = new MutableCacheEntryListenerConfiguration(FactoryBuilder.factoryOf(listener), null, false, false);
>       cache1.registerCacheEntryListener(conf1);
>       cache2.put("key1", "val1");
>       sleep(5000);
>       // Required by embedded JCache implementation to work 
>       assert cache1.get("key1") == null;
>       // Failing for remote JCache implementation
>       assertEquals(1, listener.invocationCount);
>    }
>    private static class TestExpiredListener implements CacheEntryExpiredListener, Serializable {
>       private int invocationCount;
>       @Override
>       public void onExpired(Iterable iterable) throws CacheEntryListenerException {
>          Iterator iterator = iterable.iterator();
>          while (iterator.hasNext()) {
>             iterator.next();
>             invocationCount++;
>          }
>       }
>    }
> {code}



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



More information about the infinispan-issues mailing list