[ 
https://issues.apache.org/jira/browse/COLLECTIONS-241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brent Worden resolved COLLECTIONS-241.
--------------------------------------

       Resolution: Implemented
    Fix Version/s: 4.0

r1376827
                
> [contribution] PassiveTimeOutMap
> --------------------------------
>
>                 Key: COLLECTIONS-241
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-241
>             Project: Commons Collections
>          Issue Type: New Feature
>          Components: Map
>            Reporter: Elifarley Callado Coelho
>            Assignee: Brent Worden
>            Priority: Minor
>             Fix For: 4.0
>
>         Attachments: PassiveTimeOutMap.zip
>
>
> This is a Map decorator which passively evicts expired keys once their expiry 
> time has been reached.
> When putting a key-value pair in the map, this decorator calls 
> expiryTime(key, value), passing the key and the value as parameters, and uses 
> the returned value as the expiry time for that key.
> When getting the value for a key, its expiry time is checked, and if it's 
> greater than the current time, the value is returned. Otherwise, the key is 
> removed from the decorated map, and null is returned.
> Doing so, there's no need to have a separate, active thread (hence the name 
> 'passive') to check expiry times - the check is performed on demand.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to