接口 IGeoCache
- 所有超级接口:
AutoCloseable,IBaseCache,IRedisCache
- 所有已知子接口:
IGeoDbCache
- 所有已知实现类:
GeoCache,GeoDbCache
-
方法概要
修饰符和类型方法说明booleanaddOrUpdate(GeoInfo m, Object... args) 添加位置或更新booleanaddOrUpdate(String name, double lon, double lat, Object... args) 添加位置或更新booleanaddOrUpdate(String name, GeoPos pos, Object... args) 添加位置或更新longaddOrUpdate(List<GeoInfo> list, Object... args) 添加位置或更新boolean删除位置点获取坐标获取坐标long查询geo集合数量计算距离getGeoHash(String name, Object... args) 获取GeoHashgetGeoHash(List<String> names, Object... args) 获取GeoHashgetRadius(double lon, double lat, double radius, DistUnit unit, int count, Sort sort, int radiusOptions, Object... args) 查询指定坐标半径内的位置getRadius(String name, double radius, DistUnit unit, int count, Sort sort, int radiusOptions, Object... args) 查询指定位置名称半径内的位置从接口继承的方法 java.lang.AutoCloseable
close从接口继承的方法 cn.myafx.cache.base.IRedisCache
contains, expire, expire, getCacheDb, getCacheKey, getKeyConfig, ping, remove, setJsonMapper
-
方法详细资料
-
addOrUpdate
添加位置或更新- 参数:
name- 位置名称lon- 经度lat- 纬度args- key 参数- 返回:
- 抛出:
Exception
-
addOrUpdate
添加位置或更新- 参数:
name- 位置名称pos- 位置args- key 参数- 返回:
- 抛出:
Exception
-
addOrUpdate
添加位置或更新- 参数:
m- GeoInfoargs- key 参数- 返回:
- 抛出:
Exception
-
addOrUpdate
添加位置或更新- 参数:
list- List GeoInfoargs- key 参数- 返回:
- 抛出:
Exception
-
get
获取坐标- 参数:
name- 位置名称args- key 参数- 返回:
- GeoPos
- 抛出:
Exception
-
get
获取坐标- 参数:
names- 位置名称 Listargs- key 参数- 返回:
- List GeoPos
- 抛出:
Exception
-
getDist
计算距离- 参数:
firstName- 第一个坐标点名称secondName- 第二个坐标点名称unit- 距离单位args- key 参数- 返回:
- 坐标不存在返回null
- 抛出:
Exception
-
getGeoHash
获取GeoHash- 参数:
name- 位置名称args- key 参数- 返回:
- 抛出:
Exception
-
getGeoHash
获取GeoHash- 参数:
names- 位置名称 Listargs- key 参数- 返回:
- 抛出:
Exception
-
delete
删除位置点- 参数:
name- 位置名称args- key 参数- 返回:
- 抛出:
Exception
-
getRadius
List<GeoRadius> getRadius(String name, double radius, DistUnit unit, int count, Sort sort, int radiusOptions, Object... args) throws Exception 查询指定位置名称半径内的位置- 参数:
name- 位置名称radius- 半径unit- 半径单位count- 返回数量, -1返回所有sort- 排序,Asc 由近到远radiusOptions- 返回数据选项args- key 参数- 返回:
- 抛出:
Exception
-
getRadius
List<GeoRadius> getRadius(double lon, double lat, double radius, DistUnit unit, int count, Sort sort, int radiusOptions, Object... args) throws Exception 查询指定坐标半径内的位置- 参数:
lon- 经度lat- 纬度radius- 半径unit- 半径单位count- 返回数量, -1返回所有sort- 排序,Asc 由近到远radiusOptions- 返回数据选项args- key 参数- 返回:
- 抛出:
Exception
-
getCount
查询geo集合数量- 参数:
args- key 参数- 返回:
- 抛出:
Exception
-