Interface RedisSessionCommands

  • All Superinterfaces:
    io.lettuce.core.dynamic.Commands

    @Deprecated
    public interface RedisSessionCommands
    extends io.lettuce.core.dynamic.Commands
    Deprecated.
    Commands for storing and retrieving Session instances.
    Since:
    1.0
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String configSet​(java.lang.String parameter, java.lang.String value)
      Deprecated.
      Set a configuration parameter to the given value.
      java.util.concurrent.CompletableFuture<java.lang.Void> del​(byte[] key)
      Deprecated.
      Delete a key.
      java.util.concurrent.CompletableFuture<java.lang.Void> deleteAttributes​(byte[] sessionId, byte[]... attributes)
      Deprecated.
      Removes a single attribute of a session.
      java.util.concurrent.CompletableFuture<java.lang.Boolean> expire​(byte[] key, long seconds)
      Deprecated.
      Set a key's time to live in seconds.
      java.util.concurrent.CompletableFuture<java.util.Map<byte[],​byte[]>> findSessionData​(byte[] sessionId)
      Deprecated.
      Get all the fields and values in a hash.
      java.util.concurrent.CompletableFuture<byte[]> get​(byte[] key)
      Deprecated.
      Touch one or more keys.
      java.util.concurrent.CompletableFuture<java.lang.Long> publish​(byte[] channel, byte[] message)
      Deprecated.
      Post a message to a channel.
      java.util.concurrent.CompletableFuture<java.lang.Void> saveExpiry​(byte[] expiryKey, byte[] seconds)
      Deprecated.
      Save an expiry.
      java.util.concurrent.CompletableFuture<java.lang.Void> saveSessionData​(byte[] sessionId, java.util.Map<byte[],​byte[]> attributes)
      Deprecated.
      Set multiple hash fields to multiple values.
      java.util.concurrent.CompletableFuture<java.lang.Void> setAttribute​(byte[] sessionId, byte[] attribute, byte[] value)
      Deprecated.
      Set a single attribute of a session.
      java.util.concurrent.CompletableFuture<java.lang.Long> zadd​(byte[] key, double score, byte[] member)
      Deprecated.
      Add one or more members to a sorted set, or update its score if it already exists.
      java.util.concurrent.CompletableFuture<java.util.List<byte[]>> zrangebyscore​(byte[] key, io.lettuce.core.Range<? extends java.lang.Number> range)
      Deprecated.
      Return a range of members in a sorted set, by score.
      java.util.concurrent.CompletableFuture<java.lang.Void> zrem​(byte[] key, byte[] member)
      Deprecated.
      Remove an item from the given sorted set.
    • Method Detail

      • saveSessionData

        @Command("HMSET :sessionId :attributes")
        java.util.concurrent.CompletableFuture<java.lang.Void> saveSessionData​(@Param("sessionId")
                                                                               byte[] sessionId,
                                                                               @Param("value")
                                                                               java.util.Map<byte[],​byte[]> attributes)
        Deprecated.
        Set multiple hash fields to multiple values.
        Parameters:
        sessionId - The session ID
        attributes - The attributes
        Returns:
        String simple-string-reply
      • setAttribute

        @Command("HSET :sessionId :attribute :value")
        java.util.concurrent.CompletableFuture<java.lang.Void> setAttribute​(@Param("sessionId")
                                                                            byte[] sessionId,
                                                                            @Param("attribute")
                                                                            byte[] attribute,
                                                                            @Param("value")
                                                                            byte[] value)
        Deprecated.
        Set a single attribute of a session.
        Parameters:
        sessionId - The session ID
        attribute - The attribute
        value - The value
        Returns:
        String simple-string-reply
      • deleteAttributes

        @Command("HDEL :sessionId :attributes")
        java.util.concurrent.CompletableFuture<java.lang.Void> deleteAttributes​(@Param("sessionId")
                                                                                byte[] sessionId,
                                                                                @Param("attributes")
                                                                                byte[]... attributes)
        Deprecated.
        Removes a single attribute of a session.
        Parameters:
        sessionId - The session ID
        attributes - The attributes to delete
        Returns:
        String simple-string-reply
      • findSessionData

        @Command("HGETALL")
        java.util.concurrent.CompletableFuture<java.util.Map<byte[],​byte[]>> findSessionData​(byte[] sessionId)
        Deprecated.
        Get all the fields and values in a hash.
        Parameters:
        sessionId - The session ID
        Returns:
        Map<K,V> array-reply list of fields and their values stored in the hash, or an empty list when key does not exist.
      • saveExpiry

        @Command("SET :expiryKey :seconds EX :seconds")
        java.util.concurrent.CompletableFuture<java.lang.Void> saveExpiry​(@Param("expiryKey")
                                                                          byte[] expiryKey,
                                                                          @Param("seconds")
                                                                          byte[] seconds)
        Deprecated.
        Save an expiry.
        Parameters:
        expiryKey - The expiry key
        seconds - The seconds until expiration
        Returns:
        A future
      • del

        java.util.concurrent.CompletableFuture<java.lang.Void> del​(byte[] key)
        Deprecated.
        Delete a key.
        Parameters:
        key - The key to delete
        Returns:
        the future
      • zrem

        java.util.concurrent.CompletableFuture<java.lang.Void> zrem​(byte[] key,
                                                                    byte[] member)
        Deprecated.
        Remove an item from the given sorted set.
        Parameters:
        key - The key of the set
        member - The member to remove
        Returns:
        the future
      • get

        java.util.concurrent.CompletableFuture<byte[]> get​(@Param("key")
                                                           byte[] key)
        Deprecated.
        Touch one or more keys. Touch sets the last accessed time for a key. Non-exsitent keys wont get created.
        Parameters:
        key - The key to get
        Returns:
        Long integer-reply the number of found keys.
      • zrangebyscore

        java.util.concurrent.CompletableFuture<java.util.List<byte[]>> zrangebyscore​(byte[] key,
                                                                                     io.lettuce.core.Range<? extends java.lang.Number> range)
        Deprecated.
        Return a range of members in a sorted set, by score.
        Parameters:
        key - The key
        range - The range
        Returns:
        List<V> array-reply list of elements in the specified score range.
        Since:
        4.3
      • zadd

        java.util.concurrent.CompletableFuture<java.lang.Long> zadd​(byte[] key,
                                                                    double score,
                                                                    byte[] member)
        Deprecated.
        Add one or more members to a sorted set, or update its score if it already exists.
        Parameters:
        key - The key
        score - The score
        member - The member
        Returns:
        Long integer-reply specifically:

        The number of elements added to the sorted sets, not including elements already existing for which the score was updated.

      • expire

        java.util.concurrent.CompletableFuture<java.lang.Boolean> expire​(byte[] key,
                                                                         long seconds)
        Deprecated.
        Set a key's time to live in seconds.
        Parameters:
        key - The key
        seconds - The seconds type: long
        Returns:
        Boolean integer-reply specifically:

        true if the timeout was set. false if key does not exist or the timeout could not be set.

      • publish

        java.util.concurrent.CompletableFuture<java.lang.Long> publish​(byte[] channel,
                                                                       byte[] message)
        Deprecated.
        Post a message to a channel.
        Parameters:
        channel - The channel type: key
        message - The message type: value
        Returns:
        Long integer-reply the number of clients that received the message.
      • configSet

        java.lang.String configSet​(java.lang.String parameter,
                                   java.lang.String value)
        Deprecated.
        Set a configuration parameter to the given value.
        Parameters:
        parameter - The parameter name
        value - The parameter value
        Returns:
        String simple-string-reply: OK when the configuration was set properly. Otherwise an error is returned.