Package io.lettuce.core.api.sync
Interface RedisGeoCommands<K,V>
-
- All Known Subinterfaces:
RedisAdvancedClusterCommands<K,V>
,RedisClusterCommands<K,V>
,RedisClusterPubSubCommands<K,V>
,RedisCommands<K,V>
,RedisPubSubCommands<K,V>
public interface RedisGeoCommands<K,V>
Synchronous executed commands for the Geo-API.- Since:
- 4.0
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateSyncApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Long
geoadd(K key, double longitude, double latitude, V member)
Single geo add.Long
geoadd(K key, double longitude, double latitude, V member, GeoAddArgs args)
Single geo add.Long
geoadd(K key, GeoAddArgs args, GeoValue<V>... values)
Multi geo add.Long
geoadd(K key, GeoAddArgs args, Object... lngLatMember)
Multi geo add.Long
geoadd(K key, GeoValue<V>... values)
Multi geo add.Long
geoadd(K key, Object... lngLatMember)
Multi geo add.Double
geodist(K key, V from, V to, GeoArgs.Unit unit)
Retrieve distance between pointsfrom
andto
.List<Value<String>>
geohash(K key, V... members)
Retrieve Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index.List<GeoCoordinates>
geopos(K key, V... members)
Get geo coordinates for themembers
.Set<V>
georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center oflongitude
andlatitude
.List<GeoWithin<V>>
georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Retrieve members selected by distance with the center oflongitude
andlatitude
.Long
georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Perform ageoradius(Object, double, double, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.Set<V>
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center ofmember
.List<GeoWithin<V>>
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Retrieve members selected by distance with the center ofmember
.Long
georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Perform ageoradiusbymember(Object, Object, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.Set<V>
geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate)
Retrieve members selected by distance with the center ofreference
the searchpredicate
.List<GeoWithin<V>>
geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs)
Retrieve members selected by distance with the center ofreference
the searchpredicate
.Long
geosearchstore(K destination, K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs, boolean storeDist)
Perform ageosearch(Object, GeoSearch.GeoRef, GeoSearch.GeoPredicate, GeoArgs)
query and store the results in a sorted set.
-
-
-
Method Detail
-
geoadd
Long geoadd(K key, double longitude, double latitude, V member)
Single geo add.- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.member
- the member to add.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geoadd
Long geoadd(K key, double longitude, double latitude, V member, GeoAddArgs args)
Single geo add.- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.member
- the member to add.args
- additional arguments.- Returns:
- Long integer-reply the number of elements that were added to the set.
- Since:
- 6.1
-
geoadd
Long geoadd(K key, Object... lngLatMember)
Multi geo add.- Parameters:
key
- the key of the geo set.lngLatMember
- triplets of double longitude, double latitude and V member.- Returns:
- Long integer-reply the number of elements that were added to the set.
-
geoadd
Long geoadd(K key, GeoValue<V>... values)
Multi geo add.- Parameters:
key
- the key of the geo set.values
-GeoValue
values to add.- Returns:
- Long integer-reply the number of elements that were added to the set.
- Since:
- 6.1
-
geoadd
Long geoadd(K key, GeoAddArgs args, Object... lngLatMember)
Multi geo add.- Parameters:
key
- the key of the geo set.args
- additional arguments.lngLatMember
- triplets of double longitude, double latitude and V member.- Returns:
- Long integer-reply the number of elements that were added to the set.
- Since:
- 6.1
-
geoadd
Long geoadd(K key, GeoAddArgs args, GeoValue<V>... values)
Multi geo add.- Parameters:
key
- the key of the geo set.args
- additional arguments.values
-GeoValue
values to add.- Returns:
- Long integer-reply the number of elements that were added to the set.
- Since:
- 6.1
-
geodist
Double geodist(K key, V from, V to, GeoArgs.Unit unit)
Retrieve distance between pointsfrom
andto
. If one or more elements are missingnull
is returned. Default in meters by, otherwise according tounit
- Parameters:
key
- the key of the geo set.from
- from member.to
- to member.unit
- distance unit.- Returns:
- distance between points
from
andto
. If one or more elements are missingnull
is returned.
-
geohash
List<Value<String>> geohash(K key, V... members)
Retrieve Geohash strings representing the position of one or more elements in a sorted set value representing a geospatial index.- Parameters:
key
- the key of the geo set.members
- the members.- Returns:
- bulk reply Geohash strings in the order of
members
. Returnsnull
if a member is not found.
-
geopos
List<GeoCoordinates> geopos(K key, V... members)
Get geo coordinates for themembers
.- Parameters:
key
- the key of the geo set.members
- the members.- Returns:
- a list of
GeoCoordinates
s representing the x,y position of each element specified in the arguments. For missing elementsnull
is returned.
-
georadius
Set<V> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center oflongitude
andlatitude
.- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.distance
- radius distance.unit
- distance unit.- Returns:
- bulk reply.
-
georadius
List<GeoWithin<V>> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Retrieve members selected by distance with the center oflongitude
andlatitude
.- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.distance
- radius distance.unit
- distance unit.geoArgs
- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithin
contains only fields which were requested byGeoArgs
.
-
georadius
Long georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Perform ageoradius(Object, double, double, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.- Parameters:
key
- the key of the geo set.longitude
- the longitude coordinate according to WGS84.latitude
- the latitude coordinate according to WGS84.distance
- radius distance.unit
- distance unit.geoRadiusStoreArgs
- args to store either the resulting elements with their distance or the resulting elements with their locations a sorted set.- Returns:
- Long integer-reply the number of elements in the result.
-
georadiusbymember
Set<V> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit)
Retrieve members selected by distance with the center ofmember
. The member itself is always contained in the results.- Parameters:
key
- the key of the geo set.member
- reference member.distance
- radius distance.unit
- distance unit.- Returns:
- set of members.
-
georadiusbymember
List<GeoWithin<V>> georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoArgs geoArgs)
Retrieve members selected by distance with the center ofmember
. The member itself is always contained in the results.
-
georadiusbymember
Long georadiusbymember(K key, V member, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs)
Perform ageoradiusbymember(Object, Object, double, GeoArgs.Unit, GeoArgs)
query and store the results in a sorted set.- Parameters:
key
- the key of the geo set.member
- reference member.distance
- radius distance.unit
- distance unit.geoRadiusStoreArgs
- args to store either the resulting elements with their distance or the resulting elements with their locations a sorted set.- Returns:
- Long integer-reply the number of elements in the result.
-
geosearch
Set<V> geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate)
Retrieve members selected by distance with the center ofreference
the searchpredicate
. UseGeoSearch
to create reference and predicate objects.- Parameters:
key
- the key of the geo set.reference
- the reference member or longitude/latitude coordinates.predicate
- the bounding box or radius to search in.- Returns:
- bulk reply.
- Since:
- 6.1
-
geosearch
List<GeoWithin<V>> geosearch(K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs)
Retrieve members selected by distance with the center ofreference
the searchpredicate
. UseGeoSearch
to create reference and predicate objects.- Parameters:
key
- the key of the geo set.reference
- the reference member or longitude/latitude coordinates.predicate
- the bounding box or radius to search in.geoArgs
- args to control the result.- Returns:
- nested multi-bulk reply. The
GeoWithin
contains only fields which were requested byGeoArgs
. - Since:
- 6.1
-
geosearchstore
Long geosearchstore(K destination, K key, GeoSearch.GeoRef<K> reference, GeoSearch.GeoPredicate predicate, GeoArgs geoArgs, boolean storeDist)
Perform ageosearch(Object, GeoSearch.GeoRef, GeoSearch.GeoPredicate, GeoArgs)
query and store the results in a sorted set.- Parameters:
destination
- the destination where to store results.key
- the key of the geo set.reference
- the reference member or longitude/latitude coordinates.predicate
- the bounding box or radius to search in.geoArgs
- args to control the result.storeDist
- stores the items in a sorted set populated with their distance from the center of the circle or box, as a floating-point number, in the same unit specified for that shape.- Returns:
- Long integer-reply the number of elements in the result.
- Since:
- 6.1
-
-