Interface RGeoAsync<V>

Type Parameters:
V - type of value
All Superinterfaces:
RExpirableAsync, RObjectAsync, RScoredSortedSetAsync<V>, RSortableAsync<Set<V>>
All Known Subinterfaces:
RGeo<V>
All Known Implementing Classes:
RedissonGeo

public interface RGeoAsync<V> extends RScoredSortedSetAsync<V>
Geospatial items holder. Asynchronous interface.
Author:
Nikita Koksharov
  • Method Details

    • addAsync

      RFuture<Long> addAsync(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
    • addAsync

      RFuture<Long> addAsync(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
    • addIfExistsAsync

      RFuture<Boolean> addIfExistsAsync(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
    • addIfExistsAsync

      RFuture<Long> addIfExistsAsync(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
    • tryAddAsync

      RFuture<Boolean> tryAddAsync(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
    • tryAddAsync

      RFuture<Long> tryAddAsync(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
    • distAsync

      RFuture<Double> distAsync(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
    • hashAsync

      RFuture<Map<V,String>> hashAsync(V... members)
      Returns 11 characters Geohash string mapped by defined member.
      Parameters:
      members - - objects
      Returns:
      hash mapped by object
    • posAsync

      RFuture<Map<V,GeoPosition>> posAsync(V... members)
      Returns geo-position mapped by defined member.
      Parameters:
      members - - objects
      Returns:
      geo position mapped by object
    • searchAsync

      RFuture<List<V>> searchAsync(GeoSearchArgs args)
      Returns the members of a sorted set, which are within the borders of specified search conditions.

      Usage examples:

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

      Requires Redis 3.2.10 and higher.

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

      @Deprecated RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
      Deprecated.
    • radiusAsync

      @Deprecated RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Deprecated.
    • radiusAsync

      @Deprecated RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Deprecated.
    • radiusAsync

      @Deprecated RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Deprecated.
    • searchWithDistanceAsync

      RFuture<Map<V,Double>> searchWithDistanceAsync(GeoSearchArgs args)
      Returns the distance mapped by member of a sorted set, which are within the borders of specified search conditions.

      Usage examples:

       RFuture objects = geo.searchWithDistanceAsync(GeoSearchArgs.from(15, 37)
                                       .radius(200, GeoUnit.KILOMETERS)
                                       .order(GeoOrder.ASC)
                                       .count(1)));
       
       RFuture objects = geo.searchWithDistanceAsync(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
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
    • searchWithPositionAsync

      RFuture<Map<V,GeoPosition>> searchWithPositionAsync(GeoSearchArgs args)
      Returns the position mapped by member of a sorted set, which are within the borders of specified search conditions.

      Usage examples:

       List objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37)
                                       .radius(200, GeoUnit.KILOMETERS)
                                       .order(GeoOrder.ASC)
                                       .count(1)));
       
       List 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
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
    • radiusAsync

      @Deprecated RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit)
      Deprecated.
    • radiusAsync

      @Deprecated RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit, int count)
      Deprecated.
    • radiusAsync

      @Deprecated RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Deprecated.
    • radiusAsync

      @Deprecated RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Deprecated.
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit)
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, int count)
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
    • radiusWithDistanceAsync

      RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit)
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, int count)
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
    • radiusWithPositionAsync

      RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
    • storeSearchToAsync

      RFuture<Long> storeSearchToAsync(String 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
    • radiusStoreToAsync

      @Deprecated RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
      Deprecated.
    • radiusStoreToAsync

      @Deprecated RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Deprecated.
    • radiusStoreToAsync

      @Deprecated RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Deprecated.
    • radiusStoreToAsync

      @Deprecated RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit)
      Deprecated.
    • radiusStoreToAsync

      @Deprecated RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count)
      Deprecated.
    • radiusStoreToAsync

      @Deprecated RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Deprecated.
    • storeSortedSearchToAsync

      RFuture<Long> storeSortedSearchToAsync(String 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
    • radiusStoreSortedToAsync

      RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
    • radiusStoreSortedToAsync

      RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
    • radiusStoreSortedToAsync

      RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
    • radiusStoreSortedToAsync

      RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit)
    • radiusStoreSortedToAsync

      RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count)
    • radiusStoreSortedToAsync

      RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)