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 classGeoRadiusStoreArgs.BuilderBuilder entry points forGeoRadiusStoreArgs. -
Constructor Summary
Constructors Constructor Description GeoRadiusStoreArgs() -
Method Summary
Modifier and Type Method Description GeoRadiusStoreArgsasc()Sort results ascending.<K, V> voidbuild(CommandArgs<K,V> args)Build command arguments and contribute arguments toCommandArgs.GeoRadiusStoreArgsdesc()Sort results descending.KgetStoreDistKey()KgetStoreKey()GeoRadiusStoreArgssort(GeoArgs.Sort sort)Sort results.GeoRadiusStoreArgswithCount(long count)Limit results tocountentries.GeoRadiusStoreArgswithStore(K storeKey)Store the resulting members with their location in the new Geo setstoreKey.GeoRadiusStoreArgswithStoreDist(K storeKey)Store the resulting members with their distance in the sorted setstoreKey.
-
Constructor Details
-
GeoRadiusStoreArgs
public GeoRadiusStoreArgs()
-
-
Method Details
-
withStore
Store the resulting members with their location in the new Geo setstoreKey. Cannot be used together withwithStoreDist(Object).- Parameters:
storeKey- the destination key.- Returns:
thisGeoRadiusStoreArgs.
-
withStoreDist
Store the resulting members with their distance in the sorted setstoreKey. Cannot be used together withwithStore(Object).- Parameters:
storeKey- the destination key.- Returns:
thisGeoRadiusStoreArgs.
-
withCount
Limit results tocountentries.- Parameters:
count- number greater 0.- Returns:
thisGeoRadiusStoreArgs.
-
asc
Sort results ascending.- Returns:
thisGeoRadiusStoreArgs.
-
desc
Sort results descending.- Returns:
thisGeoRadiusStoreArgs.
-
getStoreKey
- Returns:
- the key for storing results
-
getStoreDistKey
- Returns:
- the key for storing distance results
-
sort
Sort results.- Parameters:
sort- sort order, must not benull- Returns:
thisGeoRadiusStoreArgs.
-
build
Description copied from interface:CompositeArgumentBuild 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:
buildin interfaceCompositeArgument- Type Parameters:
K- Key type.V- Value type.- Parameters:
args- the command arguments, must not benull.
-