Class RedisGeoCommands.GeoSearchStoreCommandArgs
java.lang.Object
org.springframework.data.redis.connection.RedisGeoCommands.GeoSearchStoreCommandArgs
- All Implemented Interfaces:
Cloneable
,RedisGeoCommands.GeoCommandArgs
- Enclosing interface:
- RedisGeoCommands
public static class RedisGeoCommands.GeoSearchStoreCommandArgs
extends Object
implements RedisGeoCommands.GeoCommandArgs, Cloneable
Additional arguments (like count/sort/...) to be used with
RedisGeoCommands
.- Since:
- 2.6
- Author:
- Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.redis.connection.RedisGeoCommands.GeoCommandArgs
RedisGeoCommands.GeoCommandArgs.GeoCommandFlag
-
Method Summary
Modifier and TypeMethodDescriptionclone()
getFlags()
getLimit()
org.springframework.data.domain.Sort.Direction
boolean
boolean
limit
(long count) Limit the results to the first N matching items.limit
(long count, boolean any) Limit the results to the first N matching items.Create newRedisGeoCommands.GeoSearchStoreCommandArgs
.sort
(org.springframework.data.domain.Sort.Direction direction) Apply a sort direction.Sort returned items from the nearest to the furthest, relative to the center.Sort returned items from the furthest to the nearest, relative to the center.Sets theRedisGeoCommands.GeoRadiusCommandArgs.Flag.STOREDIST
flag to also store the distance of the returned items from the specified center.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.data.redis.connection.RedisGeoCommands.GeoCommandArgs
hasFlags, hasLimit, hasSortDirection
-
Method Details
-
newGeoSearchStoreArgs
Create newRedisGeoCommands.GeoSearchStoreCommandArgs
.- Returns:
- never null.
-
storeDistance
Sets theRedisGeoCommands.GeoRadiusCommandArgs.Flag.STOREDIST
flag to also store the distance of the returned items from the specified center.- Returns:
- never null.
-
sort
public RedisGeoCommands.GeoSearchStoreCommandArgs sort(org.springframework.data.domain.Sort.Direction direction) Apply a sort direction.- Returns:
- never null.
-
sortAscending
Sort returned items from the nearest to the furthest, relative to the center.- Returns:
- never null.
-
sortDescending
Sort returned items from the furthest to the nearest, relative to the center.- Returns:
- never null.
-
limit
Limit the results to the first N matching items.- Parameters:
count
-- Returns:
- never null.
-
limit
Limit the results to the first N matching items.- Parameters:
count
-any
-- Returns:
- never null.
-
getFlags
- Specified by:
getFlags
in interfaceRedisGeoCommands.GeoCommandArgs
- Returns:
- never null.
-
getLimit
- Specified by:
getLimit
in interfaceRedisGeoCommands.GeoCommandArgs
- Returns:
- can be null.
-
getSortDirection
- Specified by:
getSortDirection
in interfaceRedisGeoCommands.GeoCommandArgs
- Returns:
- can be null.
-
isStoreDistance
public boolean isStoreDistance() -
hasAnyLimit
public boolean hasAnyLimit() -
clone
-