Package org.redisson

Class RedissonGeo<V>

Type Parameters:
V - value
All Implemented Interfaces:
Iterable<V>, RExpirable, RExpirableAsync, RGeo<V>, RGeoAsync<V>, RObject, RObjectAsync, RScoredSortedSet<V>, RScoredSortedSetAsync<V>, RSortable<Set<V>>, RSortableAsync<Set<V>>

public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V>
Geospatial items holder
Author:
Nikita Koksharov
  • Constructor Details

  • Method Details

    • addAsync

      public RFuture<Long> addAsync(double longitude, double latitude, V member)
      Description copied from interface: RGeoAsync
      Adds geospatial member.
      Specified by:
      addAsync in interface RGeoAsync<V>
      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

      public long add(double longitude, double latitude, V member)
      Description copied from interface: RGeo
      Adds geospatial member.
      Specified by:
      add in interface RGeo<V>
      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

      public long add(GeoEntry... entries)
      Description copied from interface: RGeo
      Adds geospatial members.
      Specified by:
      add in interface RGeo<V>
      Parameters:
      entries - - objects
      Returns:
      number of elements added to the sorted set, not including elements already existing for which the score was updated
    • addAsync

      public RFuture<Long> addAsync(GeoEntry... entries)
      Description copied from interface: RGeoAsync
      Adds geospatial members.
      Specified by:
      addAsync in interface RGeoAsync<V>
      Parameters:
      entries - - objects
      Returns:
      number of elements added to the sorted set, not including elements already existing for which the score was updated
    • addIfExists

      public Boolean addIfExists(double longitude, double latitude, V member)
      Description copied from interface: RGeo
      Adds geospatial member only if it's already exists.

      Requires Redis 6.2.0 and higher.

      Specified by:
      addIfExists in interface RGeo<V>
      Parameters:
      longitude - - longitude of object
      latitude - - latitude of object
      member - - object itself
      Returns:
      number of elements added to the sorted set
    • addIfExists

      public long addIfExists(GeoEntry... entries)
      Description copied from interface: RGeo
      Adds geospatial members only if it's already exists.

      Requires Redis 6.2.0 and higher.

      Specified by:
      addIfExists in interface RGeo<V>
      Parameters:
      entries - - objects
      Returns:
      number of elements added to the sorted set
    • addIfExistsAsync

      public RFuture<Boolean> addIfExistsAsync(double longitude, double latitude, V member)
      Description copied from interface: RGeoAsync
      Adds geospatial member only if it's already exists.

      Requires Redis 6.2.0 and higher.

      Specified by:
      addIfExistsAsync in interface RGeoAsync<V>
      Parameters:
      longitude - - longitude of object
      latitude - - latitude of object
      member - - object itself
      Returns:
      number of elements added to the sorted set
    • addIfExistsAsync

      public RFuture<Long> addIfExistsAsync(GeoEntry... entries)
      Description copied from interface: RGeoAsync
      Adds geospatial members only if it's already exists.

      Requires Redis 6.2.0 and higher.

      Specified by:
      addIfExistsAsync in interface RGeoAsync<V>
      Parameters:
      entries - - objects
      Returns:
      number of elements added to the sorted set
    • tryAdd

      public boolean tryAdd(double longitude, double latitude, V member)
      Description copied from interface: RGeo
      Adds geospatial member only if has not been added before.

      Requires Redis 6.2.0 and higher.

      Specified by:
      tryAdd in interface RGeo<V>
      Parameters:
      longitude - - longitude of object
      latitude - - latitude of object
      member - - object itself
      Returns:
      number of elements added to the sorted set
    • tryAdd

      public long tryAdd(GeoEntry... entries)
      Description copied from interface: RGeo
      Adds geospatial members only if has not been added before.

      Requires Redis 6.2.0 and higher.

      Specified by:
      tryAdd in interface RGeo<V>
      Parameters:
      entries - - objects
      Returns:
      number of elements added to the sorted set
    • tryAddAsync

      public RFuture<Boolean> tryAddAsync(double longitude, double latitude, V member)
      Description copied from interface: RGeoAsync
      Adds geospatial member only if has not been added before.

      Requires Redis 6.2.0 and higher.

      Specified by:
      tryAddAsync in interface RGeoAsync<V>
      Parameters:
      longitude - - longitude of object
      latitude - - latitude of object
      member - - object itself
      Returns:
      number of elements added to the sorted set
    • tryAddAsync

      public RFuture<Long> tryAddAsync(GeoEntry... entries)
      Description copied from interface: RGeoAsync
      Adds geospatial members only if has not been added before.

      Requires Redis 6.2.0 and higher.

      Specified by:
      tryAddAsync in interface RGeoAsync<V>
      Parameters:
      entries - - objects
      Returns:
      number of elements added to the sorted set
    • dist

      public Double dist(V firstMember, V secondMember, GeoUnit geoUnit)
      Description copied from interface: RGeo
      Returns distance between members in GeoUnit units.
      Specified by:
      dist in interface RGeo<V>
      Parameters:
      firstMember - - first object
      secondMember - - second object
      geoUnit - - geo unit
      Returns:
      distance
    • distAsync

      public RFuture<Double> distAsync(V firstMember, V secondMember, GeoUnit geoUnit)
      Description copied from interface: RGeoAsync
      Returns distance between members in GeoUnit units.
      Specified by:
      distAsync in interface RGeoAsync<V>
      Parameters:
      firstMember - - first object
      secondMember - - second object
      geoUnit - - geo unit
      Returns:
      distance
    • hash

      public Map<V,String> hash(V... members)
      Description copied from interface: RGeo
      Returns 11 characters long Geohash string mapped by defined member.
      Specified by:
      hash in interface RGeo<V>
      Parameters:
      members - - objects
      Returns:
      hash mapped by object
    • hashAsync

      public RFuture<Map<V,String>> hashAsync(V... members)
      Description copied from interface: RGeoAsync
      Returns 11 characters Geohash string mapped by defined member.
      Specified by:
      hashAsync in interface RGeoAsync<V>
      Parameters:
      members - - objects
      Returns:
      hash mapped by object
    • pos

      public Map<V,GeoPosition> pos(V... members)
      Description copied from interface: RGeo
      Returns geo-position mapped by defined member.
      Specified by:
      pos in interface RGeo<V>
      Parameters:
      members - - objects
      Returns:
      geo position mapped by object
    • posAsync

      public RFuture<Map<V,GeoPosition>> posAsync(V... members)
      Description copied from interface: RGeoAsync
      Returns geo-position mapped by defined member.
      Specified by:
      posAsync in interface RGeoAsync<V>
      Parameters:
      members - - objects
      Returns:
      geo position mapped by object
    • search

      public List<V> search(GeoSearchArgs args)
      Description copied from interface: RGeo
      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.

      Specified by:
      search in interface RGeo<V>
      Parameters:
      args - - search conditions object
      Returns:
      list of memebers
    • searchAsync

      public RFuture<List<V>> searchAsync(GeoSearchArgs args)
      Description copied from interface: RGeoAsync
      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.

      Specified by:
      searchAsync in interface RGeoAsync<V>
      Parameters:
      args - - search conditions object
      Returns:
      list of memebers
    • searchWithDistance

      public Map<V,Double> searchWithDistance(GeoSearchArgs args)
      Description copied from interface: RGeo
      Returns the distance mapped by member of a sorted set, which are within the borders of specified search conditions.

      Usage examples:

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

      Requires Redis 3.2.10 and higher.

      Specified by:
      searchWithDistance in interface RGeo<V>
      Parameters:
      args - - search conditions object
      Returns:
      distance mapped by object
    • searchWithDistanceAsync

      public RFuture<Map<V,Double>> searchWithDistanceAsync(GeoSearchArgs args)
      Description copied from interface: RGeoAsync
      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.

      Specified by:
      searchWithDistanceAsync in interface RGeoAsync<V>
      Parameters:
      args - - search conditions object
      Returns:
      distance mapped by object
    • searchWithPosition

      public Map<V,GeoPosition> searchWithPosition(GeoSearchArgs args)
      Description copied from interface: RGeo
      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.

      Specified by:
      searchWithPosition in interface RGeo<V>
      Parameters:
      args - - search conditions object
      Returns:
      position mapped by object
    • searchWithPositionAsync

      public RFuture<Map<V,GeoPosition>> searchWithPositionAsync(GeoSearchArgs args)
      Description copied from interface: RGeoAsync
      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.

      Specified by:
      searchWithPositionAsync in interface RGeoAsync<V>
      Parameters:
      args - - search conditions object
      Returns:
      position mapped by object
    • radius

      public List<V> radius(double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radius

      public List<V> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radius

      public List<V> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radius

      public List<V> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radius

      public List<V> radius(V member, double radius, GeoUnit geoUnit)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radius

      public List<V> radius(V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radius

      public List<V> radius(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radius

      public List<V> radius(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radius in interface RGeo<V>
    • radiusAsync

      public RFuture<List<V>> radiusAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithDistance

      public Map<V,Double> radiusWithDistance(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithDistance in interface RGeo<V>
    • radiusWithDistanceAsync

      public RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithDistanceAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radiusWithPosition

      public Map<V,GeoPosition> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithPosition in interface RGeo<V>
    • radiusWithPositionAsync

      public RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusWithPositionAsync in interface RGeoAsync<V>
    • radiusStoreTo

      public long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreTo in interface RGeo<V>
    • radiusStoreToAsync

      public RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreToAsync in interface RGeoAsync<V>
    • storeSearchTo

      public long storeSearchTo(String destName, GeoSearchArgs args)
      Description copied from interface: RGeo
      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)));
       
      Specified by:
      storeSearchTo in interface RGeo<V>
      args - - search conditions object
      Returns:
      length of result
    • storeSearchToAsync

      public RFuture<Long> storeSearchToAsync(String destName, GeoSearchArgs args)
      Description copied from interface: RGeoAsync
      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)));
       
      Specified by:
      storeSearchToAsync in interface RGeoAsync<V>
      args - - search conditions object
      Returns:
      length of result
    • radiusStoreTo

      public long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreTo in interface RGeo<V>
    • radiusStoreToAsync

      public RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreToAsync in interface RGeoAsync<V>
    • radiusStoreTo

      public long radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreTo in interface RGeo<V>
    • radiusStoreToAsync

      public RFuture<Long> radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreToAsync in interface RGeoAsync<V>
    • radiusStoreTo

      public long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreTo in interface RGeo<V>
    • radiusStoreToAsync

      public RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreToAsync in interface RGeoAsync<V>
    • radiusStoreTo

      public long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreTo in interface RGeo<V>
    • radiusStoreToAsync

      public RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreToAsync in interface RGeoAsync<V>
    • radiusStoreTo

      public long radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreTo in interface RGeo<V>
    • radiusStoreToAsync

      public RFuture<Long> radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreToAsync in interface RGeoAsync<V>
    • storeSortedSearchTo

      public long storeSortedSearchTo(String destName, GeoSearchArgs args)
      Description copied from interface: RGeo
      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)));
       
      Specified by:
      storeSortedSearchTo in interface RGeo<V>
      args - - search conditions object
      Returns:
      length of result
    • storeSortedSearchToAsync

      public RFuture<Long> storeSortedSearchToAsync(String destName, GeoSearchArgs args)
      Description copied from interface: RGeoAsync
      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)));
       
      Specified by:
      storeSortedSearchToAsync in interface RGeoAsync<V>
      args - - search conditions object
      Returns:
      length of result
    • radiusStoreSortedToAsync

      public RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreSortedToAsync in interface RGeoAsync<V>
    • radiusStoreSortedToAsync

      public RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreSortedToAsync in interface RGeoAsync<V>
    • radiusStoreSortedToAsync

      public RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreSortedToAsync in interface RGeoAsync<V>
    • radiusStoreSortedToAsync

      public RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreSortedToAsync in interface RGeoAsync<V>
    • radiusStoreSortedToAsync

      public RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreSortedToAsync in interface RGeoAsync<V>
    • radiusStoreSortedToAsync

      public RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreSortedToAsync in interface RGeoAsync<V>
    • radiusStoreSortedTo

      public long radiusStoreSortedTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreSortedTo in interface RGeo<V>
    • radiusStoreSortedTo

      public long radiusStoreSortedTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreSortedTo in interface RGeo<V>
    • radiusStoreSortedTo

      public long radiusStoreSortedTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreSortedTo in interface RGeo<V>
    • radiusStoreSortedTo

      public long radiusStoreSortedTo(String destName, V member, double radius, GeoUnit geoUnit)
      Specified by:
      radiusStoreSortedTo in interface RGeo<V>
    • radiusStoreSortedTo

      public long radiusStoreSortedTo(String destName, V member, double radius, GeoUnit geoUnit, int count)
      Specified by:
      radiusStoreSortedTo in interface RGeo<V>
    • radiusStoreSortedTo

      public long radiusStoreSortedTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
      Specified by:
      radiusStoreSortedTo in interface RGeo<V>
    • expire

      public boolean expire(long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RExpirable
      Specified by:
      expire in interface RExpirable
      Parameters:
      timeToLive - - timeout before object will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      timeToLive - - timeout before object will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if the timeout was set and false if not
    • expireAt

      public boolean expireAt(long timestamp)
      Description copied from interface: RExpirable
      Specified by:
      expireAt in interface RExpirable
      Parameters:
      timestamp - - expire date in milliseconds (Unix timestamp)
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      public RFuture<Boolean> expireAtAsync(long timestamp)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAtAsync in interface RExpirableAsync
      Parameters:
      timestamp - - expire date in milliseconds (Unix timestamp)
      Returns:
      true if the timeout was set and false if not
    • expire

      public boolean expire(Instant instant)
      Description copied from interface: RExpirable
      Sets an expiration date for this object. When expire date comes the key will automatically be deleted.
      Specified by:
      expire in interface RExpirable
      Parameters:
      instant - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSet

      public boolean expireIfSet(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSet in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      public RFuture<Boolean> expireIfSetAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSetAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSet

      public boolean expireIfNotSet(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSet in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      public RFuture<Boolean> expireIfNotSetAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSetAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfGreater

      public boolean expireIfGreater(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreater in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      public RFuture<Boolean> expireIfGreaterAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreaterAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfLess

      public boolean expireIfLess(Instant time)
      Description copied from interface: RExpirable
      Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLess in interface RExpirable
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      public RFuture<Boolean> expireIfLessAsync(Instant time)
      Description copied from interface: RExpirableAsync
      Sets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLessAsync in interface RExpirableAsync
      Parameters:
      time - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(Instant instant)
      Description copied from interface: RExpirableAsync
      Set an expire date for object. When expire date comes the key will automatically be deleted.
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      instant - - expire date
      Returns:
      true if the timeout was set and false if not
    • expire

      public boolean expire(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.
      Specified by:
      expire in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireAsync

      public RFuture<Boolean> expireAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Set a timeout for object. After the timeout has expired, the key will automatically be deleted.
      Specified by:
      expireAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireAt

      public boolean expireAt(Date timestamp)
      Description copied from interface: RExpirable
      Specified by:
      expireAt in interface RExpirable
      Parameters:
      timestamp - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireAtAsync

      public RFuture<Boolean> expireAtAsync(Date timestamp)
      Description copied from interface: RExpirableAsync
      Specified by:
      expireAtAsync in interface RExpirableAsync
      Parameters:
      timestamp - - expire date
      Returns:
      true if the timeout was set and false if not
    • expireIfSet

      public boolean expireIfSet(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSet in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfSetAsync

      public RFuture<Boolean> expireIfSetAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfSetAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSet

      public boolean expireIfNotSet(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSet in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfNotSetAsync

      public RFuture<Boolean> expireIfNotSetAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfNotSetAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfGreater

      public boolean expireIfGreater(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreater in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfGreaterAsync

      public RFuture<Boolean> expireIfGreaterAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfGreaterAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfLess

      public boolean expireIfLess(Duration duration)
      Description copied from interface: RExpirable
      Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLess in interface RExpirable
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • expireIfLessAsync

      public RFuture<Boolean> expireIfLessAsync(Duration duration)
      Description copied from interface: RExpirableAsync
      Sets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.

      Requires Redis 7.0.0 and higher.

      Specified by:
      expireIfLessAsync in interface RExpirableAsync
      Parameters:
      duration - timeout before object will be deleted
      Returns:
      true if the timeout was set and false if not
    • clearExpire

      public boolean clearExpire()
      Description copied from interface: RExpirable
      Clear an expire timeout or expire date for object.
      Specified by:
      clearExpire in interface RExpirable
      Returns:
      true if timeout was removed false if object does not exist or does not have an associated timeout
    • clearExpireAsync

      public RFuture<Boolean> clearExpireAsync()
      Description copied from interface: RExpirableAsync
      Clear an expire timeout or expire date for object in async mode. Object will not be deleted.
      Specified by:
      clearExpireAsync in interface RExpirableAsync
      Returns:
      true if the timeout was cleared and false if not
    • remainTimeToLive

      public long remainTimeToLive()
      Description copied from interface: RExpirable
      Remaining time to live of Redisson object that has a timeout
      Specified by:
      remainTimeToLive in interface RExpirable
      Returns:
      time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
    • remainTimeToLiveAsync

      public RFuture<Long> remainTimeToLiveAsync()
      Description copied from interface: RExpirableAsync
      Remaining time to live of Redisson object that has a timeout
      Specified by:
      remainTimeToLiveAsync in interface RExpirableAsync
      Returns:
      time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
    • getExpireTime

      public long getExpireTime()
      Description copied from interface: RExpirable
      Expiration time of Redisson object that has a timeout

      Requires Redis 7.0.0 and higher.

      Specified by:
      getExpireTime in interface RExpirable
      Returns:
      expiration time
    • getExpireTimeAsync

      public RFuture<Long> getExpireTimeAsync()
      Description copied from interface: RExpirableAsync
      Expiration time of Redisson object that has a timeout

      Requires Redis 7.0.0 and higher.

      Specified by:
      getExpireTimeAsync in interface RExpirableAsync
      Returns:
      expiration time
    • expireAsync

      protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys)
    • expireAtAsync

      protected RFuture<Boolean> expireAtAsync(long timestamp, String param, String... keys)
    • clearExpireAsync

      protected RFuture<Boolean> clearExpireAsync(String... keys)