public interface RedisSessionCommands
extends io.lettuce.core.dynamic.Commands
Session instances.| Modifier and Type | Method and Description |
|---|---|
String |
configSet(String parameter,
String value)
Set a configuration parameter to the given value.
|
CompletableFuture<Void> |
del(byte[] key)
Delete a key.
|
CompletableFuture<Void> |
deleteAttributes(byte[] sessionId,
byte[]... attributes)
Removes a single attribute of a session.
|
CompletableFuture<Boolean> |
expire(byte[] key,
long seconds)
Set a key's time to live in seconds.
|
CompletableFuture<Map<byte[],byte[]>> |
findSessionData(byte[] sessionId)
Get all the fields and values in a hash.
|
CompletableFuture<byte[]> |
get(byte[] key)
Touch one or more keys.
|
CompletableFuture<Long> |
publish(byte[] channel,
byte[] message)
Post a message to a channel.
|
CompletableFuture<Void> |
saveExpiry(byte[] expiryKey,
byte[] seconds)
Save an expiry.
|
CompletableFuture<Void> |
saveSessionData(byte[] sessionId,
Map<byte[],byte[]> attributes)
Set multiple hash fields to multiple values.
|
CompletableFuture<Void> |
setAttribute(byte[] sessionId,
byte[] attribute,
byte[] value)
Set a single attribute of a session.
|
CompletableFuture<Long> |
zadd(byte[] key,
double score,
byte[] member)
Add one or more members to a sorted set, or update its score if it already exists.
|
CompletableFuture<List<byte[]>> |
zrangebyscore(byte[] key,
io.lettuce.core.Range<? extends Number> range)
Return a range of members in a sorted set, by score.
|
CompletableFuture<Void> |
zrem(byte[] key,
byte[] member)
Remove an item from the given sorted set.
|
@Command(value="HMSET :sessionId :attributes") CompletableFuture<Void> saveSessionData(@Param(value="sessionId") byte[] sessionId, @Param(value="value") Map<byte[],byte[]> attributes)
sessionId - The session IDattributes - The attributes@Command(value="HSET :sessionId :attribute :value") CompletableFuture<Void> setAttribute(@Param(value="sessionId") byte[] sessionId, @Param(value="attribute") byte[] attribute, @Param(value="value") byte[] value)
sessionId - The session IDattribute - The attributevalue - The value@Command(value="HDEL :sessionId :attributes") CompletableFuture<Void> deleteAttributes(@Param(value="sessionId") byte[] sessionId, @Param(value="attributes") byte[]... attributes)
sessionId - The session IDattributes - The attributes to delete@Command(value="HGETALL") CompletableFuture<Map<byte[],byte[]>> findSessionData(byte[] sessionId)
sessionId - The session IDkey
does not exist.@Command(value="SET :expiryKey :seconds EX :seconds") CompletableFuture<Void> saveExpiry(@Param(value="expiryKey") byte[] expiryKey, @Param(value="seconds") byte[] seconds)
expiryKey - The expiry keyseconds - The seconds until expirationCompletableFuture<Void> del(byte[] key)
key - The key to deleteCompletableFuture<Void> zrem(byte[] key, byte[] member)
key - The key of the setmember - The member to removeCompletableFuture<byte[]> get(@Param(value="key") byte[] key)
key - The key to getCompletableFuture<List<byte[]>> zrangebyscore(byte[] key, io.lettuce.core.Range<? extends Number> range)
key - The keyrange - The rangeCompletableFuture<Long> zadd(byte[] key, double score, byte[] member)
key - The keyscore - The scoremember - The memberThe number of elements added to the sorted sets, not including elements already existing for which the score was updated.
CompletableFuture<Boolean> expire(byte[] key, long seconds)
key - The keyseconds - The seconds type: long
true if the timeout was set. false if key does not exist or the timeout could not
be set.
CompletableFuture<Long> publish(byte[] channel, byte[] message)
channel - The channel type: keymessage - The message type: value