[jboss-jira] [JBoss JIRA] (JGRP-1551) AgePutCache: use 1 timer tasks for all elements rather than 1 task per element

Bela Ban (JIRA) jira-events at lists.jboss.org
Mon Dec 10 06:12:17 EST 2012


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

Bela Ban edited comment on JGRP-1551 at 12/10/12 6:12 AM:
----------------------------------------------------------

Alternative: provide AgeOutCache without timer task: when we check if an element exceeds a certain time, we simply add a new method hasExpired(K) (instead of containsKey(K)), and - if yes - replace the key. Method clear() would be invoked on view changes, to purge the cache contents every now and then.
                
      was (Author: belaban):
    Alternative: provide AgeOutCache without timer task: when we check if an element exceeds a certain time, we simply add a new method hasExpired(K) (instead of containsKey(K)), and - if yes - replace the key.
                  
> AgePutCache: use 1 timer tasks for all elements rather than 1 task per element
> ------------------------------------------------------------------------------
>
>                 Key: JGRP-1551
>                 URL: https://issues.jboss.org/browse/JGRP-1551
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 3.3
>
>
> Currently, AgeOutCache uses 1 task for every element. Change this to 1 task for all elements, so we reduce the number of tasks in the timer.
> AgeOutCache is used e.g. in TP, to see if we've recently requested fetching of a physical address from the discovery protocol, to suppress too many discovery requests.
> The task would be started whenever add() is called and a task is not yet already running. After all elements have expired, the task would terminated until the next add() is called.

--
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 jboss-jira mailing list