[infinispan-issues] [JBoss JIRA] (ISPN-8094) Support expiration per counter

Pedro Ruivo (JIRA) issues at jboss.org
Mon Jul 24 13:47:00 EDT 2017


Pedro Ruivo created ISPN-8094:
---------------------------------

             Summary: Support expiration per counter
                 Key: ISPN-8094
                 URL: https://issues.jboss.org/browse/ISPN-8094
             Project: Infinispan
          Issue Type: Feature Request
          Components: Clustered Counter
            Reporter: Pedro Ruivo
            Assignee: Pedro Ruivo


This would allow a counter to expire (lifespan/max-idle). If expired, an update will recreate the counter with its initial value and apply the update. A read operation in a expired counter returns its initial value (without recreate).

Configuration change:
{code:xml}
<strong-counter ...>
    <expiration lifespan="xxxx" max-idle="yyy/> //similar to cache expiration
</strong-counter>
{code}

or add it to the tag attributes

{code:xml}
<strong-counter lifespan="xxxx" max-idle="yyyy"/>
{code}

IMO, the first option is better...

Note: probably expiration won't work with weak counters. Since its value is sliced in multiple keys, if one key expire will make the counter's value inconsistent... 



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list