Package io.lettuce.core
Class GeoRadiusStoreArgs<K>
- java.lang.Object
-
- io.lettuce.core.GeoRadiusStoreArgs<K>
-
- All Implemented Interfaces:
CompositeArgument
public class GeoRadiusStoreArgs<K> extends Object implements CompositeArgument
Argument list builder for the Redis GEORADIUS command to store GEORADIUS results or GEORADIUS distances in a sorted set.GeoRadiusStoreArgs
is a mutable object and instances should be used only once to avoid shared mutable state.- Author:
- Mark Paluch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeoRadiusStoreArgs.Builder
Builder entry points forGeoRadiusStoreArgs
.
-
Constructor Summary
Constructors Constructor Description GeoRadiusStoreArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoRadiusStoreArgs
asc()
Sort results ascending.<K,V>
voidbuild(CommandArgs<K,V> args)
Build command arguments and contribute arguments toCommandArgs
.GeoRadiusStoreArgs
desc()
Sort results descending.K
getStoreDistKey()
K
getStoreKey()
GeoRadiusStoreArgs
sort(GeoArgs.Sort sort)
Sort results.GeoRadiusStoreArgs
withCount(long count)
Limit results tocount
entries.GeoRadiusStoreArgs
withStore(K storeKey)
Store the resulting members with their location in the new Geo setstoreKey
.GeoRadiusStoreArgs
withStoreDist(K storeKey)
Store the resulting members with their distance in the sorted setstoreKey
.
-
-
-
Method Detail
-
withStore
public GeoRadiusStoreArgs withStore(K storeKey)
Store the resulting members with their location in the new Geo setstoreKey
. Cannot be used together withwithStoreDist(Object)
.- Parameters:
storeKey
- the destination key.- Returns:
this
GeoRadiusStoreArgs
.
-
withStoreDist
public GeoRadiusStoreArgs withStoreDist(K storeKey)
Store the resulting members with their distance in the sorted setstoreKey
. Cannot be used together withwithStore(Object)
.- Parameters:
storeKey
- the destination key.- Returns:
this
GeoRadiusStoreArgs
.
-
withCount
public GeoRadiusStoreArgs withCount(long count)
Limit results tocount
entries.- Parameters:
count
- number greater 0.- Returns:
this
GeoRadiusStoreArgs
.
-
asc
public GeoRadiusStoreArgs asc()
Sort results ascending.- Returns:
this
GeoRadiusStoreArgs
.
-
desc
public GeoRadiusStoreArgs desc()
Sort results descending.- Returns:
this
GeoRadiusStoreArgs
.
-
getStoreKey
public K getStoreKey()
- Returns:
- the key for storing results
-
getStoreDistKey
public K getStoreDistKey()
- Returns:
- the key for storing distance results
-
sort
public GeoRadiusStoreArgs sort(GeoArgs.Sort sort)
Sort results.- Parameters:
sort
- sort order, must not benull
- Returns:
this
GeoRadiusStoreArgs
.
-
build
public <K,V> void build(CommandArgs<K,V> args)
Description copied from interface:CompositeArgument
Build command arguments and contribute arguments toCommandArgs
.Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
- Specified by:
build
in interfaceCompositeArgument
- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
args
- the command arguments, must not benull
.
-
-