Package org.redisson.api
Interface RGeoRx<V>
- Type Parameters:
V
- type of value
- All Superinterfaces:
RExpirableRx
,RObjectRx
,RScoredSortedSetRx<V>
,RSortableRx<Set<V>>
Geospatial items holder. Reactive interface.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single
<Long> Adds geospatial member.io.reactivex.rxjava3.core.Single
<Long> Adds geospatial members.io.reactivex.rxjava3.core.Single
<Long> addIfExists
(double longitude, double latitude, V member) Adds geospatial member only if it's already exists.io.reactivex.rxjava3.core.Single
<Long> addIfExists
(GeoEntry... entries) Adds geospatial members only if it's already exists.io.reactivex.rxjava3.core.Single
<Double> Returns distance between members inGeoUnit
units.Returns 11 characters Geohash string mapped by defined member.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> Returns geo-position mapped by defined member.Deprecated.Deprecated.Deprecated.radius
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreSortedTo
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreSortedTo
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreSortedTo
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreSortedTo
(String destName, V member, double radius, GeoUnit geoUnit) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreSortedTo
(String destName, V member, double radius, GeoUnit geoUnit, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreSortedTo
(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreTo
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreTo
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreTo
(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreTo
(String destName, V member, double radius, GeoUnit geoUnit) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreTo
(String destName, V member, double radius, GeoUnit geoUnit, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Long> radiusStoreTo
(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusWithDistance
(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.radiusWithDistance
(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.radiusWithDistance
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusWithDistance
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.radiusWithDistance
(V member, double radius, GeoUnit geoUnit) Deprecated.radiusWithDistance
(V member, double radius, GeoUnit geoUnit, int count) Deprecated.radiusWithDistance
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.radiusWithDistance
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(V member, double radius, GeoUnit geoUnit) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(V member, double radius, GeoUnit geoUnit, int count) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> radiusWithPosition
(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.search
(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.io.reactivex.rxjava3.core.Single
<Map<V, GeoPosition>> Returns the position mapped by member of a sorted set, which are within the borders of specified search conditions.io.reactivex.rxjava3.core.Single
<Long> storeSearchTo
(String destName, GeoSearchArgs args) Finds the members of a sorted set, which are within the borders of specified search conditions.storeSortedSearchTo
(String destName, GeoSearchArgs args) Finds the members of a sorted set, which are within the borders of specified search conditions.io.reactivex.rxjava3.core.Single
<Boolean> Adds geospatial member only if has not been added before.io.reactivex.rxjava3.core.Single
<Long> Adds geospatial members only if has not been added before.Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RObjectRx
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
Methods inherited from interface org.redisson.api.RScoredSortedSetRx
add, addAll, addAllIfAbsent, addAllIfExist, addAllIfGreater, addAllIfLess, addAndGetRank, addAndGetRevRank, addAndGetRevRank, addIfAbsent, addIfExists, addIfGreater, addIfLess, addListener, addScore, addScoreAndGetRank, addScoreAndGetRevRank, contains, containsAll, count, countIntersection, countIntersection, diff, entryIterator, entryIterator, entryIterator, entryIterator, entryRange, entryRange, entryRange, entryRangeReversed, entryRangeReversed, entryRangeReversed, first, firstEntry, firstScore, getScore, getScore, intersection, intersection, intersection, intersection, iterator, iterator, iterator, iterator, last, lastEntry, lastScore, pollFirst, pollFirst, pollFirst, pollFirst, pollFirstEntries, pollFirstEntries, pollFirstEntriesFromAny, pollFirstEntriesFromAny, pollFirstEntry, pollFirstFromAny, pollFirstFromAny, pollFirstFromAny, pollLast, pollLast, pollLast, pollLast, pollLastEntries, pollLastEntries, pollLastEntriesFromAny, pollLastEntriesFromAny, pollLastEntry, pollLastFromAny, pollLastFromAny, pollLastFromAny, random, random, randomEntries, rangeTo, rangeTo, rangeTo, rank, rankEntry, readAll, readDiff, readIntersection, readIntersection, readIntersection, readIntersection, readUnion, readUnion, readUnion, readUnion, remove, removeAll, removeRangeByRank, removeRangeByScore, replace, retainAll, revRangeTo, revRangeTo, revRangeTo, revRank, revRank, revRankEntry, size, takeFirst, takeFirstElements, takeLast, takeLastElements, tryAdd, union, union, union, union, valueRange, valueRange, valueRange, valueRangeReversed, valueRangeReversed, valueRangeReversed
Methods inherited from interface org.redisson.api.RSortableRx
readSorted, readSorted, readSorted, readSorted, readSorted, readSorted, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo
-
Method Details
-
add
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
-
add
Adds geospatial members.- Parameters:
entries
- - objects- Returns:
- number of elements added to the sorted set, not including elements already existing for which the score was updated
-
addIfExists
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
-
addIfExists
Adds geospatial members only if it's already exists.Requires Redis 6.2.0 and higher.
- Parameters:
entries
- - objects- Returns:
- number of elements added to the sorted set
-
tryAdd
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
-
tryAdd
Adds geospatial members only if has not been added before.Requires Redis 6.2.0 and higher.
- Parameters:
entries
- - objects- Returns:
- number of elements added to the sorted set
-
dist
Returns distance between members inGeoUnit
units.- Parameters:
firstMember
- - first objectsecondMember
- - second objectgeoUnit
- - geo unit- Returns:
- distance
-
hash
Returns 11 characters Geohash string mapped by defined member.- Parameters:
members
- - objects- Returns:
- hash mapped by object
-
pos
Returns geo-position mapped by defined member.- Parameters:
members
- - objects- Returns:
- geo position mapped by object
-
search
Returns the members of a sorted set, which are within the borders of specified search conditions.Usage examples:
List objects = geo.search(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS) .order(GeoOrder.ASC) .count(1)));
List objects = geo.search(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS)));
Requires Redis 3.2.10 and higher.
- Parameters:
args
- - search conditions object- Returns:
- list of memebers
-
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
searchWithDistance
Returns the distance mapped by member of a sorted set, which are within the borders of specified search conditions.Usage examples:
Map objects = geo.searchWithDistance(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS) .order(GeoOrder.ASC) .count(1)));
Map objects = geo.searchWithDistance(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS)));
Requires Redis 3.2.10 and higher.
- Parameters:
args
- - search conditions object- Returns:
- distance mapped by object
-
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
searchWithPosition
Returns the position mapped by member of a sorted set, which are within the borders of specified search conditions.Usage examples:
Map objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS) .order(GeoOrder.ASC) .count(1)));
Map objects = geo.searchWithPosition(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS)));
Requires Redis 3.2.10 and higher.
- Parameters:
args
- - search conditions object- Returns:
- position mapped by object
-
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(V member, double radius, GeoUnit geoUnit) Deprecated. -
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radius
@Deprecated io.reactivex.rxjava3.core.Single<List<V>> radius(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(V member, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithDistance
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,Double>> radiusWithDistance(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(V member, double radius, GeoUnit geoUnit) Deprecated. -
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder) Deprecated. -
radiusWithPosition
@Deprecated io.reactivex.rxjava3.core.Single<Map<V,GeoPosition>> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
storeSearchTo
Finds the members of a sorted set, which are within the borders of specified search conditions.Stores result to
destName
.Usage examples:
long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS) .order(GeoOrder.ASC) .count(1)));
long count = geo.storeSearchTo(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS)));
- Parameters:
args
- - search conditions object- Returns:
- length of result
-
radiusStoreTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radiusStoreTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusStoreTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radiusStoreTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit) Deprecated. -
radiusStoreTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusStoreTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
storeSortedSearchTo
Finds the members of a sorted set, which are within the borders of specified search conditions.Stores result to
destName
sorted by distance.Usage examples:
long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS) .order(GeoOrder.ASC) .count(1)));
long count = geo.storeSortedSearchTo(GeoSearchArgs.from(15, 37) .radius(200, GeoUnit.KILOMETERS)));
- Parameters:
args
- - search conditions object- Returns:
- length of result
-
radiusStoreSortedTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreSortedTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit) Deprecated. -
radiusStoreSortedTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreSortedTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusStoreSortedTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreSortedTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated. -
radiusStoreSortedTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreSortedTo(String destName, V member, double radius, GeoUnit geoUnit) Deprecated. -
radiusStoreSortedTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreSortedTo(String destName, V member, double radius, GeoUnit geoUnit, int count) Deprecated. -
radiusStoreSortedTo
@Deprecated io.reactivex.rxjava3.core.Single<Long> radiusStoreSortedTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count) Deprecated.
-