Class BlockingGeoCommandsImpl<K,V>

java.lang.Object
io.quarkus.redis.runtime.datasource.AbstractRedisCommandGroup
io.quarkus.redis.runtime.datasource.BlockingGeoCommandsImpl<K,V>
All Implemented Interfaces:
GeoCommands<K,V>, RedisCommands

public class BlockingGeoCommandsImpl<K,V> extends AbstractRedisCommandGroup implements GeoCommands<K,V>
  • Constructor Details

  • Method Details

    • geoadd

      public boolean geoadd(K key, double longitude, double latitude, V member)
      Description copied from interface: GeoCommands
      Execute the command GEOADD. Summary: Add one geospatial item in the geospatial index represented using a sorted set Group: geo Requires Redis 3.2.0
      Specified by:
      geoadd in interface GeoCommands<K,V>
      Parameters:
      key - the key
      longitude - the longitude coordinate according to WGS84.
      latitude - the latitude coordinate according to WGS84.
      member - the member to add.
      Returns:
      true if the geospatial item was added, false otherwise
    • geoadd

      public boolean geoadd(K key, GeoPosition position, V member)
      Description copied from interface: GeoCommands
      Execute the command GEOADD. Summary: Add one geospatial item in the geospatial index represented using a sorted set Group: geo Requires Redis 3.2.0
      Specified by:
      geoadd in interface GeoCommands<K,V>
      Parameters:
      key - the key
      position - the geo position
      member - the member to add.
      Returns:
      true if the geospatial item was added, false otherwise
    • geoadd

      public boolean geoadd(K key, GeoItem<V> item)
      Description copied from interface: GeoCommands
      Execute the command GEOADD. Summary: Add one geospatial item in the geospatial index represented using a sorted set Group: geo Requires Redis 3.2.0
      Specified by:
      geoadd in interface GeoCommands<K,V>
      Parameters:
      key - the key
      item - the item to add
      Returns:
      true if the geospatial item was added, false otherwise
    • geoadd

      public int geoadd(K key, GeoItem<V>... items)
      Description copied from interface: GeoCommands
      Execute the command GEOADD. Summary: Add one or more geospatial items in the geospatial index represented using a sorted set Group: geo Requires Redis 3.2.0
      Specified by:
      geoadd in interface GeoCommands<K,V>
      Parameters:
      key - the key
      items - the geo-item triplets containing the longitude, latitude and name / value
      Returns:
      the number of elements added to the sorted set (excluding score updates).
    • geoadd

      public boolean geoadd(K key, double longitude, double latitude, V member, GeoAddArgs args)
      Description copied from interface: GeoCommands
      Execute the command GEOADD. Summary: Add one geospatial item in the geospatial index represented using a sorted set Group: geo Requires Redis 3.2.0
      Specified by:
      geoadd in interface GeoCommands<K,V>
      Parameters:
      key - the key
      longitude - the longitude coordinate according to WGS84.
      latitude - the latitude coordinate according to WGS84.
      member - the member to add.
      args - additional arguments.
      Returns:
      true if the geospatial item was added, false otherwise
    • geoadd

      public boolean geoadd(K key, GeoItem<V> item, GeoAddArgs args)
      Description copied from interface: GeoCommands
      Execute the command GEOADD. Summary: Add one geospatial item in the geospatial index represented using a sorted set Group: geo Requires Redis 3.2.0
      Specified by:
      geoadd in interface GeoCommands<K,V>
      Parameters:
      key - the key
      item - the item to add
      args - additional arguments.
      Returns:
      true if the geospatial item was added, false otherwise
    • geoadd

      public int geoadd(K key, GeoAddArgs args, GeoItem<V>... items)
      Description copied from interface: GeoCommands
      Execute the command GEOADD. Summary: Add one or more geospatial items in the geospatial index represented using a sorted set Group: geo Requires Redis 3.2.0
      Specified by:
      geoadd in interface GeoCommands<K,V>
      Parameters:
      key - the key
      args - additional arguments.
      items - the items containing the longitude, latitude and name / value
      Returns:
      the number of elements added to the sorted set (excluding score updates). If the CH option is specified, the number of elements that were changed (added or updated).
    • geodist

      public OptionalDouble geodist(K key, V from, V to, GeoUnit unit)
      Description copied from interface: GeoCommands
      Execute the command GEODIST. Summary: Returns the distance between two members of a geospatial index Group: geo Requires Redis 3.2.0
      Specified by:
      geodist in interface GeoCommands<K,V>
      Parameters:
      key - the key
      from - from member
      to - to member
      unit - the unit
      Returns:
      The command returns the distance as a double in the specified unit, or empty if one or both the elements are missing.
    • geohash

      public List<String> geohash(K key, V... members)
      Description copied from interface: GeoCommands
      Execute the command GEOHASH. Summary: Returns members of a geospatial index as standard geohash strings Group: geo Requires Redis 3.2.0
      Specified by:
      geohash in interface GeoCommands<K,V>
      Parameters:
      key - the key
      members - the members
      Returns:
      The command returns an array where each element is the Geohash corresponding to each member name passed as argument to the command.
    • geopos

      public List<GeoPosition> geopos(K key, V... members)
      Description copied from interface: GeoCommands
      Execute the command GEOPOS. Summary: Returns longitude and latitude of members of a geospatial index Group: geo Requires Redis 3.2.0
      Specified by:
      geopos in interface GeoCommands<K,V>
      Parameters:
      key - the key
      members - the items
      Returns:
      The command returns an array where each element is aGeoPosition representing longitude and latitude (x,y) of each member name passed as argument to the command. Non-existing elements are reported as null elements.
    • georadius

      public Set<V> georadius(K key, double longitude, double latitude, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUS. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point Group: geo Requires Redis 3.2.0
      Specified by:
      georadius in interface GeoCommands<K,V>
      Parameters:
      key - the key
      longitude - the longitude
      latitude - the latitude
      radius - the radius
      unit - the unit
      Returns:
      the list of values.
    • georadius

      public Set<V> georadius(K key, GeoPosition position, double radius, GeoUnit unit)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUS. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point Group: geo Requires Redis 3.2.0
      Specified by:
      georadius in interface GeoCommands<K,V>
      Parameters:
      key - the key
      position - the position
      radius - the radius
      unit - the unit
      Returns:
      the list of values.
    • georadius

      public List<GeoValue<V>> georadius(K key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusArgs geoArgs)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUS. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point Group: geo Requires Redis 3.2.0
      Specified by:
      georadius in interface GeoCommands<K,V>
      Parameters:
      key - the key
      longitude - the longitude
      latitude - the latitude
      radius - the radius
      unit - the unit
      geoArgs - the extra arguments of the GEORADIUS command
      Returns:
      the list of GeoValue. Only the field requested using geoArgs are populated in the returned GeoValue.
    • georadius

      public List<GeoValue<V>> georadius(K key, GeoPosition position, double radius, GeoUnit unit, GeoRadiusArgs geoArgs)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUS. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point Group: geo Requires Redis 3.2.0
      Specified by:
      georadius in interface GeoCommands<K,V>
      Parameters:
      key - the key
      position - the position
      radius - the radius
      unit - the unit
      geoArgs - the extra arguments of the GEORADIUS command
      Returns:
      the list of GeoValue. Only the field requested using geoArgs are populated in the returned GeoValue.
    • georadius

      public long georadius(K key, double longitude, double latitude, double radius, GeoUnit unit, GeoRadiusStoreArgs<K> geoArgs)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUS. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point. It also stores the results in a sorted set. Group: geo Requires Redis 3.2.0
      Specified by:
      georadius in interface GeoCommands<K,V>
      Parameters:
      key - the key
      longitude - the longitude
      latitude - the latitude
      radius - the radius
      unit - the unit
      geoArgs - the extra STORE arguments of the GEORADIUS command
      Returns:
      The number of items contained in the result written at the configured key.
    • georadius

      public long georadius(K key, GeoPosition position, double radius, GeoUnit unit, GeoRadiusStoreArgs<K> geoArgs)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUS. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a point. It also stores the results in a sorted set. Group: geo Requires Redis 3.2.0
      Specified by:
      georadius in interface GeoCommands<K,V>
      Parameters:
      key - the key
      position - the position
      radius - the radius
      unit - the unit
      geoArgs - the extra STORE arguments of the GEORADIUS command
      Returns:
      The number of items contained in the result written at the configured key.
    • georadiusbymember

      public Set<V> georadiusbymember(K key, V member, double distance, GeoUnit unit)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUSBYMEMBER. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member Group: geo Requires Redis 3.2.0
      Specified by:
      georadiusbymember in interface GeoCommands<K,V>
      Parameters:
      key - the key
      member - the member
      distance - the max distance
      Returns:
      the set of values
    • georadiusbymember

      public List<GeoValue<V>> georadiusbymember(K key, V member, double distance, GeoUnit unit, GeoRadiusArgs geoArgs)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUSBYMEMBER. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member Group: geo Requires Redis 3.2.0
      Specified by:
      georadiusbymember in interface GeoCommands<K,V>
      Parameters:
      key - the key
      member - the member
      distance - the max distance
      geoArgs - the extra arguments of the GEORADIUS command
      Returns:
      the list of GeoValue. Only the field requested using geoArgs are populated in the returned values.
    • georadiusbymember

      public long georadiusbymember(K key, V member, double distance, GeoUnit unit, GeoRadiusStoreArgs<K> geoArgs)
      Description copied from interface: GeoCommands
      Execute the command GEORADIUSBYMEMBER. Summary: Query a sorted set representing a geospatial index to fetch members matching a given maximum distance from a member. It also stores the results in a sorted set. Group: geo Requires Redis 3.2.0
      Specified by:
      georadiusbymember in interface GeoCommands<K,V>
      Parameters:
      key - the key
      member - the member
      distance - the max distance
      geoArgs - the extra arguments of the GEORADIUS command
      Returns:
      The number of items contained in the result written at the configured key.
    • geosearch

      public List<GeoValue<V>> geosearch(K key, GeoSearchArgs<V> args)
      Description copied from interface: GeoCommands
      Execute the command GEOSEARCH. Summary: Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle. Group: geo Requires Redis 6.2.0
      Specified by:
      geosearch in interface GeoCommands<K,V>
      Returns:
      the list of GeoValue&lt;V>&gt;. The populated data depends on the parameters configured in args.
    • geosearchstore

      public long geosearchstore(K destination, K key, GeoSearchStoreArgs<V> args, boolean storeDist)
      Description copied from interface: GeoCommands
      Execute the command GEOSEARCHSTORE. Summary: Query a sorted set representing a geospatial index to fetch members inside an area of a box or a circle, and store the result in another key. Group: geo Requires Redis 6.2.0
      Specified by:
      geosearchstore in interface GeoCommands<K,V>
      Returns:
      the number of elements in the resulting set.