Package org.redisson.api
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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description RFuture<Long>
addAsync(double longitude, double latitude, V member)
Adds geospatial member.RFuture<Long>
addAsync(GeoEntry... entries)
Adds geospatial members.RFuture<Boolean>
addIfExistsAsync(double longitude, double latitude, V member)
Adds geospatial member only if it's already exists.RFuture<Long>
addIfExistsAsync(GeoEntry... entries)
Adds geospatial members only if it's already exists.RFuture<Double>
distAsync(V firstMember, V secondMember, GeoUnit geoUnit)
Returns distance between members inGeoUnit
units.RFuture<Map<V,String>>
hashAsync(V... members)
Returns 11 characters Geohash string mapped by defined member.RFuture<Map<V,GeoPosition>>
posAsync(V... members)
Returns geo-position mapped by defined member.RFuture<List<V>>
radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
Deprecated.RFuture<List<V>>
radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
Deprecated.RFuture<List<V>>
radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
Deprecated.RFuture<List<V>>
radiusAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
Deprecated.RFuture<List<V>>
radiusAsync(V member, double radius, GeoUnit geoUnit)
Deprecated.RFuture<List<V>>
radiusAsync(V member, double radius, GeoUnit geoUnit, int count)
Deprecated.RFuture<List<V>>
radiusAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
Deprecated.RFuture<List<V>>
radiusAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
Deprecated.RFuture<Long>
radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
RFuture<Long>
radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
RFuture<Long>
radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
RFuture<Long>
radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit)
RFuture<Long>
radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count)
RFuture<Long>
radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
RFuture<Long>
radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit)
Deprecated.RFuture<Long>
radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
Deprecated.RFuture<Long>
radiusStoreToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
Deprecated.RFuture<Long>
radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit)
Deprecated.RFuture<Long>
radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count)
Deprecated.RFuture<Long>
radiusStoreToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
Deprecated.RFuture<Map<V,Double>>
radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
RFuture<Map<V,Double>>
radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
RFuture<Map<V,Double>>
radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
RFuture<Map<V,Double>>
radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
RFuture<Map<V,Double>>
radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit)
RFuture<Map<V,Double>>
radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, int count)
RFuture<Map<V,Double>>
radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
RFuture<Map<V,Double>>
radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, int count)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder)
RFuture<Map<V,GeoPosition>>
radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count)
RFuture<List<V>>
searchAsync(GeoSearchArgs args)
Returns the members of a sorted set, which are within the borders of specified search conditions.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.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.RFuture<Long>
storeSearchToAsync(String destName, GeoSearchArgs args)
Finds the members of a sorted set, which are within the borders of specified search conditions.RFuture<Long>
storeSortedSearchToAsync(String destName, GeoSearchArgs args)
Finds the members of a sorted set, which are within the borders of specified search conditions.RFuture<Boolean>
tryAddAsync(double longitude, double latitude, V member)
Adds geospatial member only if has not been added before.RFuture<Long>
tryAddAsync(GeoEntry... entries)
Adds geospatial members only if has not been added before.-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Methods inherited from interface org.redisson.api.RScoredSortedSetAsync
addAllAsync, addAndGetRankAsync, addAndGetRevRankAsync, addAndGetRevRankAsync, addAsync, addIfExistsAsync, addIfGreaterAsync, addIfLessAsync, addScoreAndGetRankAsync, addScoreAndGetRevRankAsync, addScoreAsync, containsAllAsync, containsAsync, countAsync, diffAsync, entryRangeAsync, entryRangeAsync, entryRangeAsync, entryRangeReversedAsync, entryRangeReversedAsync, entryRangeReversedAsync, firstAsync, firstScoreAsync, getScoreAsync, getScoreAsync, intersectionAsync, intersectionAsync, intersectionAsync, intersectionAsync, lastAsync, lastScoreAsync, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstFromAnyAsync, pollLastAsync, pollLastAsync, pollLastAsync, pollLastFromAnyAsync, randomAsync, randomAsync, randomEntriesAsync, rangeToAsync, rangeToAsync, rangeToAsync, rankAsync, readAllAsync, readDiffAsync, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readUnionAsync, readUnionAsync, readUnionAsync, readUnionAsync, removeAllAsync, removeAsync, removeRangeByRankAsync, removeRangeByScoreAsync, retainAllAsync, revRangeToAsync, revRangeToAsync, revRangeToAsync, revRankAsync, revRankAsync, sizeAsync, takeFirstAsync, takeLastAsync, tryAddAsync, unionAsync, unionAsync, unionAsync, unionAsync, valueRangeAsync, valueRangeAsync, valueRangeAsync, valueRangeReversedAsync, valueRangeReversedAsync, valueRangeReversedAsync
-
Methods inherited from interface org.redisson.api.RSortableAsync
readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAlphaAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, readSortAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync
-
-
-
-
Method Detail
-
addAsync
RFuture<Long> addAsync(double longitude, double latitude, V member)
Adds geospatial member.- Parameters:
longitude
- - longitude of objectlatitude
- - latitude of objectmember
- - 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 objectlatitude
- - latitude of objectmember
- - 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 objectlatitude
- - latitude of objectmember
- - 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 inGeoUnit
units.- Parameters:
firstMember
- - first objectsecondMember
- - second objectgeoUnit
- - 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)
-
-