Package redis.clients.jedis.params
Class SetParams
- java.lang.Object
-
- redis.clients.jedis.params.SetParams
-
public class SetParams extends java.lang.ObjectParameters for SET command in Jedis compatibility layer. Provides a fluent API for setting expiration and conditional set options.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSetParams.ExistenceConditionstatic classSetParams.ExpirationType
-
Constructor Summary
Constructors Constructor Description SetParams()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SetParamsex(long seconds)Set the specified expire time, in seconds.SetParamsexAt(long unixTimeSeconds)Set the specified Unix time at which the key will expire, in seconds.SetParamsget()Return the old string stored at key, or null if key did not exist.SetParams.ExistenceConditiongetExistenceCondition()SetParams.ExpirationTypegetExpirationType()java.lang.LonggetExpirationValue()booleanisGet()SetParamskeepTtl()Retain the time to live associated with the key.SetParamsnx()Only set the key if it does not already exist.SetParamspx(long milliseconds)Set the specified expire time, in milliseconds.SetParamspxAt(long unixTimeMilliseconds)Set the specified Unix time at which the key will expire, in milliseconds.static SetParamssetParams()SetParamsxx()Only set the key if it already exists.
-
-
-
Method Detail
-
setParams
public static SetParams setParams()
-
nx
public SetParams nx()
Only set the key if it does not already exist.
-
xx
public SetParams xx()
Only set the key if it already exists.
-
ex
public SetParams ex(long seconds)
Set the specified expire time, in seconds.
-
px
public SetParams px(long milliseconds)
Set the specified expire time, in milliseconds.
-
exAt
public SetParams exAt(long unixTimeSeconds)
Set the specified Unix time at which the key will expire, in seconds.
-
pxAt
public SetParams pxAt(long unixTimeMilliseconds)
Set the specified Unix time at which the key will expire, in milliseconds.
-
keepTtl
public SetParams keepTtl()
Retain the time to live associated with the key.
-
get
public SetParams get()
Return the old string stored at key, or null if key did not exist.
-
getExistenceCondition
public SetParams.ExistenceCondition getExistenceCondition()
-
getExpirationType
public SetParams.ExpirationType getExpirationType()
-
getExpirationValue
public java.lang.Long getExpirationValue()
-
isGet
public boolean isGet()
-
-