Module lettuce.core

Class GeoRadiusStoreArgs<K>

java.lang.Object
io.lettuce.core.GeoRadiusStoreArgs<K>
All Implemented Interfaces:
CompositeArgument

public class GeoRadiusStoreArgs<K>
extends Object
implements CompositeArgument
Argument list builder for the Redis GEORADIUS command to store GEORADIUS results or GEORADIUS distances in a sorted set.

GeoRadiusStoreArgs is a mutable object and instances should be used only once to avoid shared mutable state.

Author:
Mark Paluch
  • Constructor Details

    • GeoRadiusStoreArgs

      public GeoRadiusStoreArgs()
  • Method Details

    • withStore

      public GeoRadiusStoreArgs withStore​(K storeKey)
      Store the resulting members with their location in the new Geo set storeKey. Cannot be used together with withStoreDist(Object).
      Parameters:
      storeKey - the destination key.
      Returns:
      this GeoRadiusStoreArgs.
    • withStoreDist

      public GeoRadiusStoreArgs withStoreDist​(K storeKey)
      Store the resulting members with their distance in the sorted set storeKey. Cannot be used together with withStore(Object).
      Parameters:
      storeKey - the destination key.
      Returns:
      this GeoRadiusStoreArgs.
    • withCount

      public GeoRadiusStoreArgs withCount​(long count)
      Limit results to count entries.
      Parameters:
      count - number greater 0.
      Returns:
      this GeoRadiusStoreArgs.
    • asc

      public GeoRadiusStoreArgs asc()
      Sort results ascending.
      Returns:
      this GeoRadiusStoreArgs.
    • desc

      public GeoRadiusStoreArgs desc()
      Sort results descending.
      Returns:
      this GeoRadiusStoreArgs.
    • getStoreKey

      public K getStoreKey()
      Returns:
      the key for storing results
    • getStoreDistKey

      public K getStoreDistKey()
      Returns:
      the key for storing distance results
    • sort

      public GeoRadiusStoreArgs sort​(GeoArgs.Sort sort)
      Sort results.
      Parameters:
      sort - sort order, must not be null
      Returns:
      this GeoRadiusStoreArgs.
    • build

      public <K,​ V> void build​(CommandArgs<K,​V> args)
      Description copied from interface: CompositeArgument
      Build command arguments and contribute arguments to CommandArgs.

      Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.

      Specified by:
      build in interface CompositeArgument
      Type Parameters:
      K - Key type.
      V - Value type.
      Parameters:
      args - the command arguments, must not be null.