You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jinmei Liao (JIRA)" <ji...@apache.org> on 2018/02/05 16:34:00 UTC

[jira] [Commented] (GEODE-3876) gfsh command for custom expiry

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

Jinmei Liao commented on GEODE-3876:
------------------------------------

Currently the region factory has these methods to set the expiry attributes:
1: factory.setRegionIdleTimeout();
2: factory.setRegionTimeToLive();
3: factory.setEntryIdleTimeout();
4: factory.setEntryTimeToLive();
5: factory.setCustomEntryIdleTimeout();
6: factory.setCustomEntryTimeToLive();

Can someone tell me:
1. Which ones are mutually exclusive?
2. which ones can be set together, and when set together, which one takes precedence?

Response From: Darrel Schneider
None are mutually exclusive.
For the entry ones if a custom one exists it is checked first. But if the CustomExpiry callback returns null then the corresponding non-custom one will still be checked and used if it was configured.

I based this on this method: org.apache.geode.internal.cache.LocalRegion.createExpiryTask(RegionEntry)

> gfsh command for custom expiry
> ------------------------------
>
>                 Key: GEODE-3876
>                 URL: https://issues.apache.org/jira/browse/GEODE-3876
>             Project: Geode
>          Issue Type: Sub-task
>          Components: docs, gfsh
>            Reporter: Swapnil Bawaskar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> When creating or altering a region the ability to add custom expiration is missing.   
> It would be great to have something like this:
> {code}
> alter/create region --name=regioName [--region-custom-expiry=customExpiryImplementationClassName]
> {code}
> If the class implementing custom expiry also implements Declarable, we should add support for passing parameters to the init method.
>  
> {code}
> alter/create region --name=regionName --region-custom-expiry=CustomExpirayImplementation?{'k':'v','k2':'v2'}
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)