[
https://issues.apache.org/jira/browse/IGNITE-14326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen Darlington updated IGNITE-14326:
----------------------------------------
Description:
Ignite provides a way to specify an expiry policy on per entry level, but there
is no way to know the current TTL for a particular key or refresh the TTL
without first retrieving the record.
Ticket IGNITE-7641 details the IgniteCache#ttl() method. This ticket is about
_setting_ the TTL.
The API for this is less well defined than the get TTL method. Suggest a number
of options:
* Update using the default TTL policy
* Update using a specified long
* Update using a specified Expiry policy
was:
Ignite provides a way to specify an expiry policy on per entry level, but there
is no way to know the current TTL for a particular key or refresh the TTL
without first retrieving the record.
Ticket IGNITE-7641 details the IgniteCache#ttl() method. This ticket is about
_setting_ the TTL.
We can add {{CacheEntry#setTtl()}} and/or {{IgniteCache#setTtl(K key)}} method
that will provide this information. Looks like it's already available via
{{GridCacheMapEntry#ttl()}}, so we just need to properly expose it to public
API.
Here is the user forum discussion about this:
[http://apache-ignite-users.70518.x6.nabble.com/Get-TTL-of-the-specific-K-V-entry-td19817.html]
> Add CacheEntry#setTtl method
> ----------------------------
>
> Key: IGNITE-14326
> URL: https://issues.apache.org/jira/browse/IGNITE-14326
> Project: Ignite
> Issue Type: Improvement
> Components: cache
> Affects Versions: 2.3
> Reporter: Stephen Darlington
> Assignee: Stephen Darlington
> Priority: Major
>
> Ignite provides a way to specify an expiry policy on per entry level, but
> there is no way to know the current TTL for a particular key or refresh the
> TTL without first retrieving the record.
> Ticket IGNITE-7641 details the IgniteCache#ttl() method. This ticket is about
> _setting_ the TTL.
> The API for this is less well defined than the get TTL method. Suggest a
> number of options:
> * Update using the default TTL policy
> * Update using a specified long
> * Update using a specified Expiry policy
--
This message was sent by Atlassian Jira
(v8.3.4#803005)