Package io.quarkus.redis.datasource.geo
Class GeoRadiusStoreArgs<K>
- java.lang.Object
-
- io.quarkus.redis.datasource.geo.GeoRadiusStoreArgs<K>
-
- All Implemented Interfaces:
RedisCommandExtraArguments
public class GeoRadiusStoreArgs<K> extends Object implements RedisCommandExtraArguments
-
-
Constructor Summary
Constructors Constructor Description GeoRadiusStoreArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoRadiusStoreArgs<K>
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.GeoRadiusStoreArgs<K>
ascending()
UseASC
order (from small to large).GeoRadiusStoreArgs<K>
count(long count)
By default, all the matching items are returned.GeoRadiusStoreArgs<K>
descending()
UseDESC
order (from large to small).boolean
hasCoordinates()
boolean
hasDistance()
boolean
hasHash()
GeoRadiusStoreArgs<K>
storeDistKey(K storeDistKey)
Store the items in a sorted set populated with their distance from the center as a floating point number, in the same unit specified in the radius.GeoRadiusStoreArgs<K>
storeKey(K storeKey)
Store the items in a sorted set populated with their geospatial information.<T> List<String>
toArgs(Codec<T> codec)
GeoRadiusStoreArgs<K>
withCoordinates()
Also return the longitude,latitude coordinates of the matching items.GeoRadiusStoreArgs<K>
withDistance()
Also return the distance of the returned items from the specified center.GeoRadiusStoreArgs<K>
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
-
ascending
public GeoRadiusStoreArgs<K> ascending()
UseASC
order (from small to large).- Returns:
- the current
GeoRadiusStoreArgs
-
descending
public GeoRadiusStoreArgs<K> descending()
UseDESC
order (from large to small).- Returns:
- the current
GeoRadiusStoreArgs
-
withDistance
public GeoRadiusStoreArgs<K> 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
GeoRadiusStoreArgs
-
withCoordinates
public GeoRadiusStoreArgs<K> withCoordinates()
Also return the longitude,latitude coordinates of the matching items.- Returns:
- the current
GeoRadiusStoreArgs
-
withHash
public GeoRadiusStoreArgs<K> 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
GeoRadiusStoreArgs
-
count
public GeoRadiusStoreArgs<K> 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
GeoRadiusStoreArgs
-
any
public GeoRadiusStoreArgs<K> 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. UsingANY
requirescount
to be set.- Returns:
- the current
GeoRadiusStoreArgs
-
storeKey
public GeoRadiusStoreArgs<K> storeKey(K storeKey)
Store the items in a sorted set populated with their geospatial information.- Parameters:
storeKey
- the storeKey value- Returns:
- the current
GeoRadiusStoreArgs
-
storeDistKey
public GeoRadiusStoreArgs<K> storeDistKey(K storeDistKey)
Store the items in a sorted set populated with their distance from the center as a floating point number, in the same unit specified in the radius.- Parameters:
storeDistKey
- the storeDistKey value- Returns:
- the current
GeoRadiusStoreArgs
-
toArgs
public <T> List<String> toArgs(Codec<T> codec)
- Specified by:
toArgs
in 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()
-
-