Interface RGeoRx<V>

  • Type Parameters:
    V - type of value
    All Superinterfaces:
    <V>>

    public interface RGeoRx<V>
    extends RScoredSortedSetRx<V>
    Geospatial items holder. Reactive interface.
    Author:
    Nikita Koksharov
    • Method Detail

      • add

        io.reactivex.rxjava3.core.Single<> add​(double longitude,
                                                   double latitude,
                                                   V member)
        Adds geospatial member.
        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set, not including elements already existing for which the score was updated
      • add

        io.reactivex.rxjava3.core.Single<> add​(GeoEntry... entries)
        Adds geospatial members.
        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set, not including elements already existing for which the score was updated
      • addIfExists

        io.reactivex.rxjava3.core.Single<> addIfExists​(double longitude,
                                                           double latitude,
                                                           V member)
        Adds geospatial member only if it's already exists.

        Requires Redis 6.2.0 and higher.

        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set
      • addIfExists

        io.reactivex.rxjava3.core.Single<> addIfExists​(GeoEntry... entries)
        Adds geospatial members only if it's already exists.

        Requires Redis 6.2.0 and higher.

        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set
      • tryAdd

        io.reactivex.rxjava3.core.Single<> tryAdd​(double longitude,
                                                         double latitude,
                                                         V member)
        Adds geospatial member only if has not been added before.

        Requires Redis 6.2.0 and higher.

        Parameters:
        longitude - - longitude of object
        latitude - - latitude of object
        member - - object itself
        Returns:
        number of elements added to the sorted set
      • tryAdd

        io.reactivex.rxjava3.core.Single<> tryAdd​(GeoEntry... entries)
        Adds geospatial members only if has not been added before.

        Requires Redis 6.2.0 and higher.

        Parameters:
        entries - - objects
        Returns:
        number of elements added to the sorted set
      • dist

        io.reactivex.rxjava3.core.Single<> dist​(V firstMember,
                                                      V secondMember,
                                                      GeoUnit geoUnit)
        Returns distance between members in GeoUnit units.
        Parameters:
        firstMember - - first object
        secondMember - - second object
        geoUnit - - geo unit
        Returns:
        distance
      • hash

        io.reactivex.rxjava3.core.Single<<>> hash​(V... members)
        Returns 11 characters Geohash string mapped by defined member.
        Parameters:
        members - - objects
        Returns:
        hash mapped by object
      • pos

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> pos​(V... members)
        Returns geo-position mapped by defined member.
        Parameters:
        members - - objects
        Returns:
        geo position mapped by object
      • search

        io.reactivex.rxjava3.core.Single<<V>> search​(GeoSearchArgs args)
        Returns the members of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         List objects = geo.search(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         List objects = geo.search(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Parameters:
        args - - search conditions object
        Returns:
        list of memebers
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(double longitude,
                                                         double latitude,
                                                         double radius,
                                                         GeoUnit geoUnit)
        Deprecated.
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(double longitude,
                                                         double latitude,
                                                         double radius,
                                                         GeoUnit geoUnit,
                                                         int count)
        Deprecated.
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(double longitude,
                                                         double latitude,
                                                         double radius,
                                                         GeoUnit geoUnit,
                                                         GeoOrder geoOrder)
        Deprecated.
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(double longitude,
                                                         double latitude,
                                                         double radius,
                                                         GeoUnit geoUnit,
                                                         GeoOrder geoOrder,
                                                         int count)
        Deprecated.
      • searchWithDistance

        io.reactivex.rxjava3.core.Single<<>> searchWithDistance​(GeoSearchArgs args)
        Returns the distance mapped by member of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         Map objects = geo.searchWithDistance(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         Map objects = geo.searchWithDistance(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Parameters:
        args - - search conditions object
        Returns:
        distance mapped by object
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(double longitude,
                                                                                 double latitude,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit)
        Deprecated.
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(double longitude,
                                                                                 double latitude,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit,
                                                                                 int count)
        Deprecated.
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(double longitude,
                                                                                 double latitude,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit,
                                                                                 GeoOrder geoOrder)
        Deprecated.
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(double longitude,
                                                                                 double latitude,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit,
                                                                                 GeoOrder geoOrder,
                                                                                 int count)
        Deprecated.
      • searchWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> searchWithPosition​(GeoSearchArgs args)
        Returns the position mapped by member of a sorted set, which are within the borders of specified search conditions.

        Usage examples:

         Map objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         Map objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         

        Requires Redis 3.2.10 and higher.

        Parameters:
        args - - search conditions object
        Returns:
        position mapped by object
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(double longitude,
                                                                                      double latitude,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit)
        Deprecated.
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(double longitude,
                                                                                      double latitude,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit,
                                                                                      int count)
        Deprecated.
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(double longitude,
                                                                                      double latitude,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit,
                                                                                      GeoOrder geoOrder)
        Deprecated.
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(double longitude,
                                                                                      double latitude,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit,
                                                                                      GeoOrder geoOrder,
                                                                                      int count)
        Deprecated.
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(V member,
                                                         double radius,
                                                         GeoUnit geoUnit)
        Deprecated.
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(V member,
                                                         double radius,
                                                         GeoUnit geoUnit,
                                                         int count)
        Deprecated.
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(V member,
                                                         double radius,
                                                         GeoUnit geoUnit,
                                                         GeoOrder geoOrder)
        Deprecated.
      • radius

        io.reactivex.rxjava3.core.Single<<V>> radius​(V member,
                                                         double radius,
                                                         GeoUnit geoUnit,
                                                         GeoOrder geoOrder,
                                                         int count)
        Deprecated.
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(V member,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit)
        Deprecated.
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(V member,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit,
                                                                                 int count)
        Deprecated.
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(V member,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit,
                                                                                 GeoOrder geoOrder)
        Deprecated.
      • radiusWithDistance

        io.reactivex.rxjava3.core.Single<<>> radiusWithDistance​(V member,
                                                                                 double radius,
                                                                                 GeoUnit geoUnit,
                                                                                 GeoOrder geoOrder,
                                                                                 int count)
        Deprecated.
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(V member,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit)
        Deprecated.
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(V member,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit,
                                                                                      int count)
        Deprecated.
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(V member,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit,
                                                                                      GeoOrder geoOrder)
        Deprecated.
      • radiusWithPosition

        io.reactivex.rxjava3.core.Single<<V,​GeoPosition>> radiusWithPosition​(V member,
                                                                                      double radius,
                                                                                      GeoUnit geoUnit,
                                                                                      GeoOrder geoOrder,
                                                                                      int count)
        Deprecated.
      • storeSearchTo

        io.reactivex.rxjava3.core.Single<> storeSearchTo​( destName,
                                                             GeoSearchArgs args)
        Finds the members of a sorted set, which are within the borders of specified search conditions.

        Stores result to destName.

        Usage examples:

         long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         
        Parameters:
        args - - search conditions object
        Returns:
        length of result
      • radiusStoreTo

        io.reactivex.rxjava3.core.Single<> radiusStoreTo​( destName,
                                                             double longitude,
                                                             double latitude,
                                                             double radius,
                                                             GeoUnit geoUnit)
        Deprecated.
      • radiusStoreTo

        io.reactivex.rxjava3.core.Single<> radiusStoreTo​( destName,
                                                             double longitude,
                                                             double latitude,
                                                             double radius,
                                                             GeoUnit geoUnit,
                                                             int count)
        Deprecated.
      • radiusStoreTo

        io.reactivex.rxjava3.core.Single<> radiusStoreTo​( destName,
                                                             double longitude,
                                                             double latitude,
                                                             double radius,
                                                             GeoUnit geoUnit,
                                                             GeoOrder geoOrder,
                                                             int count)
        Deprecated.
      • radiusStoreTo

        io.reactivex.rxjava3.core.Single<> radiusStoreTo​( destName,
                                                             V member,
                                                             double radius,
                                                             GeoUnit geoUnit)
        Deprecated.
      • radiusStoreTo

        io.reactivex.rxjava3.core.Single<> radiusStoreTo​( destName,
                                                             V member,
                                                             double radius,
                                                             GeoUnit geoUnit,
                                                             int count)
        Deprecated.
      • radiusStoreTo

        io.reactivex.rxjava3.core.Single<> radiusStoreTo​( destName,
                                                             V member,
                                                             double radius,
                                                             GeoUnit geoUnit,
                                                             GeoOrder geoOrder,
                                                             int count)
        Deprecated.
      • storeSortedSearchTo

        > storeSortedSearchTo​( destName,
                                          GeoSearchArgs args)
        Finds the members of a sorted set, which are within the borders of specified search conditions.

        Stores result to destName sorted by distance.

        Usage examples:

         long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)
                                         .order(GeoOrder.ASC)
                                         .count(1)));
         
         long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37)
                                         .radius(200, GeoUnit.KILOMETERS)));
         
        Parameters:
        args - - search conditions object
        Returns:
        length of result
      • radiusStoreSortedTo

        io.reactivex.rxjava3.core.Single<> radiusStoreSortedTo​( destName,
                                                                   double longitude,
                                                                   double latitude,
                                                                   double radius,
                                                                   GeoUnit geoUnit)
        Deprecated.
      • radiusStoreSortedTo

        io.reactivex.rxjava3.core.Single<> radiusStoreSortedTo​( destName,
                                                                   double longitude,
                                                                   double latitude,
                                                                   double radius,
                                                                   GeoUnit geoUnit,
                                                                   int count)
        Deprecated.
      • radiusStoreSortedTo

        io.reactivex.rxjava3.core.Single<> radiusStoreSortedTo​( destName,
                                                                   double longitude,
                                                                   double latitude,
                                                                   double radius,
                                                                   GeoUnit geoUnit,
                                                                   GeoOrder geoOrder,
                                                                   int count)
        Deprecated.
      • radiusStoreSortedTo

        io.reactivex.rxjava3.core.Single<> radiusStoreSortedTo​( destName,
                                                                   V member,
                                                                   double radius,
                                                                   GeoUnit geoUnit)
        Deprecated.
      • radiusStoreSortedTo

        io.reactivex.rxjava3.core.Single<> radiusStoreSortedTo​( destName,
                                                                   V member,
                                                                   double radius,
                                                                   GeoUnit geoUnit,
                                                                   int count)
        Deprecated.
      • radiusStoreSortedTo

        io.reactivex.rxjava3.core.Single<> radiusStoreSortedTo​( destName,
                                                                   V member,
                                                                   double radius,
                                                                   GeoUnit geoUnit,
                                                                   GeoOrder geoOrder,
                                                                   int count)
        Deprecated.