Package io.joynr.common
Class ExpiryDate
- java.lang.Object
-
- io.joynr.common.ExpiryDate
-
public class ExpiryDate extends Object
Instances of this class represent absolute time stamps since 01 Jan 1970 00:00:00 .
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExpiryDatefromAbsolute(long expiryDate)NOTE: relative Ttl can be negative if the ExpiryDate passed in was in the paststatic ExpiryDatefromRelativeTtl(long relativeTtl)longgetRelativeTtl()longgetValue()StringtoString()
-
-
-
Method Detail
-
fromRelativeTtl
public static ExpiryDate fromRelativeTtl(long relativeTtl)
- Parameters:
relativeTtl- milliseconds until the ttl expires- Returns:
- an ExpiryDate with creationTime = current time and value = creationTime + relativeTtl
-
fromAbsolute
public static ExpiryDate fromAbsolute(long expiryDate)
NOTE: relative Ttl can be negative if the ExpiryDate passed in was in the past- Parameters:
expiryDate- time measured in milliseconds, between the current time and midnight, January 1, 1970, UTC- Returns:
- an ExpiryDate object with creationTime = current time, and relativeTtl = ExpiryDate - creationTime;
-
getValue
public long getValue()
-
getRelativeTtl
public long getRelativeTtl()
- Returns:
- the original relative ttl used to create this object
-
-