Package com.couchbase.client.java.kv
Class Expiry
- java.lang.Object
-
- com.couchbase.client.java.kv.Expiry
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Expiryabsolute(Instant expiry)longencode()longencode(EventBus eventBus)Deprecated.Please useencode()instead.static Expirynone()static Expiryrelative(Duration expiry)StringtoString()
-
-
-
Method Detail
-
none
public static Expiry none()
-
relative
public static Expiry relative(Duration expiry)
- Throws:
InvalidArgumentException- if the Duration is non-zero and less than 1 second, or greater than 18,250 days (~50 years)
-
absolute
public static Expiry absolute(Instant expiry)
- Throws:
InvalidArgumentException- if the Instant is after 2106-02-07T06:28:15Z, or is non-zero and before 1970-02-01T00:00:00Z
-
encode
public long encode()
- Throws:
InvalidArgumentException- if the expiry occurs after 2106-02-07T06:28:15Z
-
encode
@Deprecated public long encode(EventBus eventBus)
Deprecated.Please useencode()instead.This method remains as a courtesy to users brave enough to rely on Couchbase internal API. It is scheduled for removal in a future version of the SDK.
-
-