sk0x50 commented on a change in pull request #8780:
URL: https://github.com/apache/ignite/pull/8780#discussion_r619660321
##########
File path: modules/core/src/main/java/org/apache/ignite/IgniteCache.java
##########
@@ -1118,6 +1118,23 @@
*/
public IgniteFuture<V> getAndReplaceAsync(K key, V val);
+ /**
+ * Returns the remaining time to live of the specified key.
+ *
+ * @param key Key
+ * @return remaining TTL in milliseconds, null if there is no expiry
policy or EternalExpiryPolicy.
Review comment:
Please specify the behavior of this method in the following cases:
- the specified `key` as `null`
- cache does not contain the specified `key`
- cache is already closed
perhaps, something like as follows:
```
* @param key the key whose associated time-to-live value is to be returned
*
* @return the remaining time-to-live, or {@code null}, if it does not
exist or there is no expiry policy associated with the key or {@link
EternalExpiryPolicy}.
* @throws IllegalStateException if the cache is {@link #isClosed()}
* @throws NullPointerException if the key is null
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]