com.hazelcast.cache.impl.record
Interface Expirable

All Known Subinterfaces:
CacheRecord<V>
All Known Implementing Classes:
AbstractCacheRecord, CacheDataRecord, CacheObjectRecord

public interface Expirable

Expiring Data model interface.

This interface provides a time variable to be compared against other time values to decide on "future" or "past".


Method Summary
 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.
 

Method Detail

getExpirationTime

long getExpirationTime()
Gets the expiration time in milliseconds.

Returns:
expiration time.
See Also:
System.currentTimeMillis()

setExpirationTime

void setExpirationTime(long expirationTime)
Sets the expiration time in milliseconds.

Parameters:
expirationTime -
See Also:
System.currentTimeMillis()

isExpiredAt

boolean isExpiredAt(long now)
Checks whether the expiration time is passed with respect to the provided time.

Returns true if and only if now > getExpirationTime()

.

Parameters:
now - time in milliseconds.
Returns:
true if expired.


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.