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
Geospatial items holder. Asynchronous interface.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionAdds geospatial member.Adds geospatial members.addIfExistsAsync
(double longitude, double latitude, V member) Adds geospatial member only if it's already exists.addIfExistsAsync
(GeoEntry... entries) Adds geospatial members only if it's already exists.Returns distance between members inGeoUnit
units.Returns 11 characters Geohash string mapped by defined member.Returns geo-position mapped by defined member.radiusAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.radiusAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.radiusAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusAsync
(V member, double radius, GeoUnit geoUnit) Deprecated.radiusAsync
(V member, double radius, GeoUnit geoUnit, int count) Deprecated.radiusAsync
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusAsync
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusStoreSortedToAsync
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.radiusStoreSortedToAsync
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.radiusStoreSortedToAsync
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusStoreSortedToAsync
(String destName, V member, double radius, GeoUnit geoUnit) Deprecated.radiusStoreSortedToAsync
(String destName, V member, double radius, GeoUnit geoUnit, int count) Deprecated.radiusStoreSortedToAsync
(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusStoreToAsync
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.radiusStoreToAsync
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.radiusStoreToAsync
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusStoreToAsync
(String destName, V member, double radius, GeoUnit geoUnit) Deprecated.radiusStoreToAsync
(String destName, V member, double radius, GeoUnit geoUnit, int count) Deprecated.radiusStoreToAsync
(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusWithDistanceAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.radiusWithDistanceAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.radiusWithDistanceAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusWithDistanceAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusWithDistanceAsync
(V member, double radius, GeoUnit geoUnit) Deprecated.radiusWithDistanceAsync
(V member, double radius, GeoUnit geoUnit, int count) Deprecated.radiusWithDistanceAsync
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusWithDistanceAsync
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusWithPositionAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.radiusWithPositionAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.radiusWithPositionAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusWithPositionAsync
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusWithPositionAsync
(V member, double radius, GeoUnit geoUnit) Deprecated.radiusWithPositionAsync
(V member, double radius, GeoUnit geoUnit, int count) Deprecated.radiusWithPositionAsync
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusWithPositionAsync
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.searchAsync
(GeoSearchArgs args) Returns the members of a sorted set, which are within the borders of specified search conditions.Returns the distance mapped by member of a sorted set, which are within the borders of specified search conditions.Returns the position mapped by member of a sorted set, which are within the borders of specified search conditions.storeSearchToAsync
(String destName, GeoSearchArgs args) Finds the members of a sorted set, which are within the borders of specified search conditions.storeSortedSearchToAsync
(String destName, GeoSearchArgs args) Finds the members of a sorted set, which are within the borders of specified search conditions.tryAddAsync
(double longitude, double latitude, V member) Adds geospatial member only if has not been added before.tryAddAsync
(GeoEntry... entries) Adds geospatial members only if has not been added before.Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods inherited from interface org.redisson.api.RObjectAsync
copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, 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, addAllIfAbsentAsync, addAllIfExistAsync, addAllIfGreaterAsync, addAllIfLessAsync, addAndGetRankAsync, addAndGetRevRankAsync, addAndGetRevRankAsync, addAsync, addIfAbsentAsync, addIfExistsAsync, addIfGreaterAsync, addIfLessAsync, addListenerAsync, addScoreAndGetRankAsync, addScoreAndGetRevRankAsync, addScoreAsync, containsAllAsync, containsAsync, countAsync, countIntersectionAsync, countIntersectionAsync, diffAsync, entryRangeAsync, entryRangeAsync, entryRangeAsync, entryRangeReversedAsync, entryRangeReversedAsync, entryRangeReversedAsync, firstAsync, firstEntryAsync, firstScoreAsync, getScoreAsync, getScoreAsync, intersectionAsync, intersectionAsync, intersectionAsync, intersectionAsync, lastAsync, lastEntryAsync, lastScoreAsync, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstAsync, pollFirstEntriesAsync, pollFirstEntriesAsync, pollFirstEntriesFromAnyAsync, pollFirstEntriesFromAnyAsync, pollFirstEntryAsync, pollFirstFromAnyAsync, pollFirstFromAnyAsync, pollFirstFromAnyAsync, pollLastAsync, pollLastAsync, pollLastAsync, pollLastAsync, pollLastEntriesAsync, pollLastEntriesAsync, pollLastEntriesFromAnyAsync, pollLastEntriesFromAnyAsync, pollLastEntryAsync, pollLastFromAnyAsync, pollLastFromAnyAsync, pollLastFromAnyAsync, randomAsync, randomAsync, randomEntriesAsync, rangeToAsync, rangeToAsync, rangeToAsync, rankAsync, rankEntryAsync, readAllAsync, readDiffAsync, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readIntersectionAsync, readUnionAsync, readUnionAsync, readUnionAsync, readUnionAsync, removeAllAsync, removeAsync, removeRangeByRankAsync, removeRangeByScoreAsync, replaceAsync, retainAllAsync, revRangeToAsync, revRangeToAsync, revRangeToAsync, revRankAsync, revRankAsync, revRankEntryAsync, 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 Details
-
addAsync
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
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
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
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
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
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
Returns distance between members inGeoUnit
units.- Parameters:
firstMember
- - first objectsecondMember
- - second objectgeoUnit
- - geo unit- Returns:
- distance
-
hashAsync
Returns 11 characters Geohash string mapped by defined member.- Parameters:
members
- - objects- Returns:
- hash mapped by object
-
posAsync
Returns geo-position mapped by defined member.- Parameters:
members
- - objects- Returns:
- geo position mapped by object
-
searchAsync
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
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
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithDistanceAsync
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithDistanceAsync
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithDistanceAsync
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
searchWithPositionAsync
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
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithPositionAsync
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithPositionAsync
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithPositionAsync
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radiusAsync
Deprecated. -
radiusAsync
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
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithDistanceAsync
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithDistanceAsync
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithDistanceAsync
@Deprecated RFuture<Map<V,Double>> radiusWithDistanceAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radiusWithPositionAsync
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithPositionAsync
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithPositionAsync
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithPositionAsync
@Deprecated RFuture<Map<V,GeoPosition>> radiusWithPositionAsync(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
storeSearchToAsync
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
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
@Deprecated RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radiusStoreSortedToAsync
@Deprecated RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusStoreSortedToAsync
@Deprecated RFuture<Long> radiusStoreSortedToAsync(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radiusStoreSortedToAsync
@Deprecated RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit) Deprecated. -
radiusStoreSortedToAsync
@Deprecated RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusStoreSortedToAsync
@Deprecated RFuture<Long> radiusStoreSortedToAsync(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.
-