You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directmemory.apache.org by "Raffaele P. Guidi (Commented) (JIRA)" <ji...@apache.org> on 2011/12/28 12:09:30 UTC

[jira] [Commented] (DIRECTMEMORY-41) Unified usage of Pointer.expires and Pointer.expiresIn

    [ https://issues.apache.org/jira/browse/DIRECTMEMORY-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13176609#comment-13176609 ] 

Raffaele P. Guidi commented on DIRECTMEMORY-41:
-----------------------------------------------

There's also another semantic difference between the two - expiresIn could be used for "sliding" expiration - that is: "expires in 10 minutes since last read" that could be useful in some cases
                
> Unified usage of Pointer.expires and Pointer.expiresIn
> ------------------------------------------------------
>
>                 Key: DIRECTMEMORY-41
>                 URL: https://issues.apache.org/jira/browse/DIRECTMEMORY-41
>             Project: Apache DirectMemory
>          Issue Type: Improvement
>            Reporter: Benoit Perroud
>            Priority: Minor
>
> Pointer.expires and Pointer.expiresIn variables have the same goal. It could be trivial to unify them and then keep on of the version : either the absolute expiration is kept and expiresIn is stored as currentTimeMillis + expiresIn, or relative expiration is kept and expires is stored as expires - currentTimeMillis.
> retrive function should also be aware of the expiration and have appropriate behavior when a pointer's value has expired (throw an exception or return null ?)

--
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