Package io.quarkus.redis.datasource.geo
Class GeoSearchArgs<V>
- java.lang.Object
-
- io.quarkus.redis.datasource.geo.GeoSearchArgs<V>
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class GeoSearchArgs<V> extends Object implements RedisCommandExtraArguments
-
-
Constructor Summary
Constructors Constructor Description GeoSearchArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoSearchArgs<V>any()When ANY is provided the command will return as soon as enough matches are found, so the results may not be the ones closest to the specified point, but on the other hand, the effort invested by the server is significantly lower.GeoSearchArgs<V>ascending()UseASCorder (from small to large).GeoSearchArgs<V>byBox(double width, double height, GeoUnit unit)Search inside circular area according to givenradius.GeoSearchArgs<V>byRadius(double radius, GeoUnit unit)Search inside circular area according to givenradius.GeoSearchArgs<V>count(long count)By default all the matching items are returned.GeoSearchArgs<V>descending()UseDESCorder (from large to small).GeoSearchArgs<V>fromCoordinate(double longitude, double latitude)Use the givenlongitudeandlatitudeposition.GeoSearchArgs<V>fromMember(V member)Use the position of the given existingmemberin the sorted set.booleanhasCoordinates()booleanhasDistance()booleanhasHash()List<String>toArgs(Codec codec)GeoSearchArgs<V>withCoordinates()Also return the longitude,latitude coordinates of the matching items.GeoSearchArgs<V>withDistance()Also return the distance of the returned items from the specified center.GeoSearchArgs<V>withHash()Also return the raw geohash-encoded sorted set score of the item, in the form of a 52 bit unsigned integer.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
-
-
-
Method Detail
-
fromMember
public GeoSearchArgs<V> fromMember(V member)
Use the position of the given existingmemberin the sorted set.- Parameters:
member- the member, must not benull- Returns:
- the current
GeoSearchArgs
-
fromCoordinate
public GeoSearchArgs<V> fromCoordinate(double longitude, double latitude)
Use the givenlongitudeandlatitudeposition.- Parameters:
longitude- the longitudelatitude- the latitude- Returns:
- the current
GeoSearchArgs
-
byRadius
public GeoSearchArgs<V> byRadius(double radius, GeoUnit unit)
Search inside circular area according to givenradius.- Parameters:
radius- the radius valueunit- the unit- Returns:
- the current
GeoSearchArgs
-
byBox
public GeoSearchArgs<V> byBox(double width, double height, GeoUnit unit)
Search inside circular area according to givenradius.- Parameters:
width- the width of the boxheight- the height of the boxunit- the unit- Returns:
- the current
GeoSearchArgs
-
ascending
public GeoSearchArgs<V> ascending()
UseASCorder (from small to large).- Returns:
- the current
GeoRadiusArgs
-
descending
public GeoSearchArgs<V> descending()
UseDESCorder (from large to small).- Returns:
- the current
GeoRadiusArgs
-
withDistance
public GeoSearchArgs<V> withDistance()
Also return the distance of the returned items from the specified center. The distance is returned in the same unit as the unit specified as the radius argument of the command.- Returns:
- the current
GeoRadiusArgs
-
withCoordinates
public GeoSearchArgs<V> withCoordinates()
Also return the longitude,latitude coordinates of the matching items.- Returns:
- the current
GeoRadiusArgs
-
withHash
public GeoSearchArgs<V> withHash()
Also return the raw geohash-encoded sorted set score of the item, in the form of a 52 bit unsigned integer. This is only useful for low level hacks or debugging and is otherwise of little interest for the general user.- Returns:
- the current
GeoRadiusArgs
-
count
public GeoSearchArgs<V> count(long count)
By default all the matching items are returned. It is possible to limit the results to the first N matching items by using theCOUNT <count>option.- Parameters:
count- the count value- Returns:
- the current
GeoRadiusArgs
-
any
public GeoSearchArgs<V> any()
When ANY is provided the command will return as soon as enough matches are found, so the results may not be the ones closest to the specified point, but on the other hand, the effort invested by the server is significantly lower.Using
ANYrequirescountto be set.- Returns:
- the current
GeoRadiusArgs
-
toArgs
public List<String> toArgs(Codec codec)
- Specified by:
toArgsin interfaceRedisCommandExtraArguments- Parameters:
codec- an optional encoder to encode some of the values- Returns:
- the list of arguments, encoded as a list of String.
-
hasDistance
public boolean hasDistance()
-
hasHash
public boolean hasHash()
-
hasCoordinates
public boolean hasCoordinates()
-
-