public interface Expirable
This interface provides a time variable to be compared against other time values to decide on "future" or "past".
Modifier and Type | Method and Description |
---|---|
long |
getExpirationTime()
Gets the expiration time in milliseconds.
|
boolean |
isExpiredAt(long now)
Checks whether the expiration time is passed with respect to the provided time.
|
void |
setExpirationTime(long expirationTime)
Sets the expiration time in milliseconds.
|
long getExpirationTime()
System.currentTimeMillis()
void setExpirationTime(long expirationTime)
expirationTime
- System.currentTimeMillis()
boolean isExpiredAt(long now)
Returns true if and only if now > getExpirationTime()
now
- time in milliseconds.Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.