geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jinmei Liao (JIRA)" <>
Subject [jira] [Commented] (GEODE-3876) gfsh command for custom expiry
Date Mon, 05 Feb 2018 16:34:00 GMT


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

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

> gfsh command for custom expiry
> ------------------------------
>                 Key: GEODE-3876
>                 URL:
>             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

View raw message