public class GeoTypeHandler extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
Long |
add(String key,
Map<String,org.springframework.data.geo.Point> params)
添加字符串
GEOADD key longitude latitude member [longitude latitude member ...]
|
Long |
add(String key,
org.springframework.data.geo.Point point,
String value)
添加字符串
GEOADD key longitude latitude member [longitude latitude member ...]
|
Long |
addAsObj(String key,
Map<Object,org.springframework.data.geo.Point> params)
添加对象
GEOADD key longitude latitude member [longitude latitude member ...]
|
Long |
addAsObj(String key,
org.springframework.data.geo.Point point,
Object value)
添加对象
GEOADD key longitude latitude member [longitude latitude member ...]
|
org.springframework.data.geo.Distance |
distance(String key,
String member1,
String member2)
字符串距离
GEODIST key member1 member2 [unit]
|
org.springframework.data.geo.Distance |
distance(String key,
String member1,
String member2,
org.springframework.data.geo.Metric metric)
字符串距离
GEODIST key member1 member2 [unit]
|
org.springframework.data.geo.Distance |
distanceAsObj(String key,
Object member1,
Object member2)
对象距离
GEODIST key member1 member2 [unit]
|
org.springframework.data.geo.Distance |
distanceAsObj(String key,
Object member1,
Object member2,
org.springframework.data.geo.Metric metric)
对象距离
GEODIST key member1 member2 [unit]
|
static GeoTypeHandler |
getInstance(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate,
org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate)
获取实例
|
org.springframework.data.redis.core.RedisTemplate |
getRedisTemplate()
获取spring redis模板
|
org.springframework.data.redis.core.StringRedisTemplate |
getStringRedisTemplate()
获取spring string redis模板
|
List<String> |
hash(String key,
String... values)
字符串地理位置哈希码
GEOHASH key member [member ...]
|
List<String> |
hashAsObj(String key,
Object... values)
对象地理位置哈希码
GEOHASH key member [member ...]
|
List<org.springframework.data.geo.Point> |
position(String key,
String... values)
定位字符串
GEOPOS key member [member ...]
|
List<org.springframework.data.geo.Point> |
positionAsObj(String key,
Object... values)
定位对象
GEOPOS key member [member ...]
|
Map<String,org.springframework.data.geo.Point> |
radius(String key,
org.springframework.data.geo.Circle within)
中心范围内的字符串
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<String,org.springframework.data.geo.Point> |
radius(String key,
org.springframework.data.geo.Circle within,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的字符串
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<Object,org.springframework.data.geo.Point> |
radiusAsObj(String key,
org.springframework.data.geo.Circle within)
中心范围内的对象
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<Object,org.springframework.data.geo.Point> |
radiusAsObj(String key,
org.springframework.data.geo.Circle within,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的对象
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> |
radiusAsObjWithResult(String key,
org.springframework.data.geo.Circle within)
中心范围内的对象(带详细信息)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> |
radiusAsObjWithResult(String key,
org.springframework.data.geo.Circle within,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的对象(带详细信息)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<String,org.springframework.data.geo.Point> |
radiusByMember(String key,
String value,
org.springframework.data.geo.Distance distance)
中心范围内的字符串
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<String,org.springframework.data.geo.Point> |
radiusByMember(String key,
String value,
org.springframework.data.geo.Distance distance,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的字符串
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<String,org.springframework.data.geo.Point> |
radiusByMember(String key,
String value,
Double radius)
中心范围内的字符串
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<Object,org.springframework.data.geo.Point> |
radiusByMemberAsObj(String key,
Object value,
org.springframework.data.geo.Distance distance)
中心范围内的对象
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<Object,org.springframework.data.geo.Point> |
radiusByMemberAsObj(String key,
Object value,
org.springframework.data.geo.Distance distance,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的对象
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Map<Object,org.springframework.data.geo.Point> |
radiusByMemberAsObj(String key,
Object value,
Double radius)
中心范围内的对象
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> |
radiusByMemberAsObjWithResult(String key,
Object value,
org.springframework.data.geo.Distance distance,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的对象(带详细信息)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> |
radiusByMemberAsObjWithResult(String key,
Object value,
Double radius)
中心范围内的对象(带详细信息)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> |
radiusByMemberWithResult(String key,
String value,
org.springframework.data.geo.Distance distance)
中心范围内的字符串(带详细信息)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> |
radiusByMemberWithResult(String key,
String value,
org.springframework.data.geo.Distance distance,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的字符串(带详细信息)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> |
radiusByMemberWithResult(String key,
String value,
Double radius)
中心范围内的字符串(带详细信息)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> |
radiusByMemberWithResultAsObj(String key,
Object value,
org.springframework.data.geo.Distance distance)
中心范围内的对象(带详细信息)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> |
radiusWithResult(String key,
org.springframework.data.geo.Circle within)
中心范围内的字符串(带详细信息)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> |
radiusWithResult(String key,
org.springframework.data.geo.Circle within,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
中心范围内的字符串(带详细信息)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
|
Long |
remove(String key,
String... members)
移除字符串
ZREM key member [member ...]
|
Long |
removeAsObj(String key,
String... members)
移除对象
ZREM key member [member ...]
|
public static GeoTypeHandler getInstance(org.springframework.data.redis.core.RedisTemplate<String,Object> redisTemplate, org.springframework.data.redis.core.StringRedisTemplate stringRedisTemplate)
redisTemplate - 对象模板stringRedisTemplate - 字符串模板public Long addAsObj(String key, org.springframework.data.geo.Point point, Object value)
GEOADD key longitude latitude member [longitude latitude member ...]
key - 键point - 坐标value - 对象public Long add(String key, org.springframework.data.geo.Point point, String value)
GEOADD key longitude latitude member [longitude latitude member ...]
key - 键point - 坐标value - 字符串public Long addAsObj(String key, Map<Object,org.springframework.data.geo.Point> params)
GEOADD key longitude latitude member [longitude latitude member ...]
key - 键params - 参数,键为待添加对象,值为待添加坐标public Long add(String key, Map<String,org.springframework.data.geo.Point> params)
GEOADD key longitude latitude member [longitude latitude member ...]
key - 键params - 参数,键为待添加字符串,值为待添加坐标public List<org.springframework.data.geo.Point> positionAsObj(String key, Object... values)
GEOPOS key member [member ...]
key - 键values - 对象public List<org.springframework.data.geo.Point> position(String key, String... values)
GEOPOS key member [member ...]
key - 键values - 字符串public List<String> hashAsObj(String key, Object... values)
GEOHASH key member [member ...]
key - 键values - 对象public List<String> hash(String key, String... values)
GEOHASH key member [member ...]
key - 键values - 对象public org.springframework.data.geo.Distance distanceAsObj(String key, Object member1, Object member2)
GEODIST key member1 member2 [unit]
key - 键member1 - 对象1member2 - 对象2public org.springframework.data.geo.Distance distance(String key, String member1, String member2)
GEODIST key member1 member2 [unit]
key - 键member1 - 字符串1member2 - 字符串2public org.springframework.data.geo.Distance distanceAsObj(String key, Object member1, Object member2, org.springframework.data.geo.Metric metric)
GEODIST key member1 member2 [unit]
key - 键member1 - 对象1member2 - 对象2metric - 单位public org.springframework.data.geo.Distance distance(String key, String member1, String member2, org.springframework.data.geo.Metric metric)
GEODIST key member1 member2 [unit]
key - 键member1 - 字符串1member2 - 字符串2metric - 单位public Map<Object,org.springframework.data.geo.Point> radiusByMemberAsObj(String key, Object value, org.springframework.data.geo.Distance distance)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 对象distance - 距离public Map<String,org.springframework.data.geo.Point> radiusByMember(String key, String value, org.springframework.data.geo.Distance distance)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 字符串distance - 距离public Map<Object,org.springframework.data.geo.Point> radiusByMemberAsObj(String key, Object value, Double radius)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 对象radius - 半径public Map<String,org.springframework.data.geo.Point> radiusByMember(String key, String value, Double radius)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 字符串radius - 半径public Map<Object,org.springframework.data.geo.Point> radiusByMemberAsObj(String key, Object value, org.springframework.data.geo.Distance distance, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 对象distance - 距离args - 命令参数public Map<String,org.springframework.data.geo.Point> radiusByMember(String key, String value, org.springframework.data.geo.Distance distance, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 字符串distance - 距离args - 命令参数public Map<Object,org.springframework.data.geo.Point> radiusAsObj(String key, org.springframework.data.geo.Circle within)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆public Map<String,org.springframework.data.geo.Point> radius(String key, org.springframework.data.geo.Circle within)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆public Map<Object,org.springframework.data.geo.Point> radiusAsObj(String key, org.springframework.data.geo.Circle within, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆args - 命令参数public Map<String,org.springframework.data.geo.Point> radius(String key, org.springframework.data.geo.Circle within, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆args - 命令参数public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> radiusByMemberWithResultAsObj(String key, Object value, org.springframework.data.geo.Distance distance)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 对象distance - 距离public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> radiusByMemberWithResult(String key, String value, org.springframework.data.geo.Distance distance)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 字符串distance - 距离public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> radiusByMemberAsObjWithResult(String key, Object value, Double radius)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 对象radius - 半径public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> radiusByMemberWithResult(String key, String value, Double radius)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 字符串radius - 半径public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> radiusByMemberAsObjWithResult(String key, Object value, org.springframework.data.geo.Distance distance, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 对象distance - 距离args - 命令参数public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> radiusByMemberWithResult(String key, String value, org.springframework.data.geo.Distance distance, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键value - 字符串distance - 距离args - 命令参数public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> radiusAsObjWithResult(String key, org.springframework.data.geo.Circle within)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> radiusWithResult(String key, org.springframework.data.geo.Circle within)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<Object>> radiusAsObjWithResult(String key, org.springframework.data.geo.Circle within, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆args - 命令参数public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<String>> radiusWithResult(String key, org.springframework.data.geo.Circle within, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
GEORADIUS key longitude latitude radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key]
key - 键within - 圆args - 命令参数public Long removeAsObj(String key, String... members)
ZREM key member [member ...]
key - 键members - 对象public Long remove(String key, String... members)
ZREM key member [member ...]
key - 键members - 字符串public org.springframework.data.redis.core.RedisTemplate getRedisTemplate()
public org.springframework.data.redis.core.StringRedisTemplate getStringRedisTemplate()
Copyright © 2019. All rights reserved.