类 GeoCache
java.lang.Object
cn.myafx.cache.base.BaseCache
cn.myafx.cache.base.RedisCache
cn.myafx.cache.base.GeoCache
- 所有已实现的接口:
IBaseCache,IGeoCache,IRedisCache,AutoCloseable
- 直接已知子类:
GeoDbCache
-
字段概要
从类继承的字段 cn.myafx.cache.base.RedisCache
DefaultJsonMapper, keyConfig, mapper, nodeName, prefix, redis -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明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) 查询指定位置名称半径内的位置从类继承的方法 cn.myafx.cache.base.RedisCache
close, contains, deserialize, expire, expire, getBytes, getCacheDb, getCacheKey, getDefault, getKeyConfig, getString, ping, remove, serialize, setJsonMapper从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 java.lang.AutoCloseable
close从接口继承的方法 cn.myafx.cache.base.IRedisCache
contains, expire, expire, getCacheDb, getCacheKey, getKeyConfig, ping, remove, setJsonMapper
-
构造器详细资料
-
GeoCache
public GeoCache(String node, String item, org.springframework.data.redis.connection.RedisConnection redisConnection, ICacheKey cacheKey, String prefix) throws Exception GeoCache- 参数:
node- 缓存key配置db节点item- 缓存key配置项redisConnection- RedisConnectioncacheKey- ICacheKeyprefix- 缓存前缀- 抛出:
Exception
-
-
方法详细资料
-
addOrUpdate
添加位置或更新- 指定者:
addOrUpdate在接口中IGeoCache- 参数:
name- 位置名称lon- 经度lat- 纬度args- key 参数- 返回:
- 抛出:
Exception
-
addOrUpdate
添加位置或更新- 指定者:
addOrUpdate在接口中IGeoCache- 参数:
name- 位置名称pos- 位置args- key 参数- 返回:
- 抛出:
Exception
-
addOrUpdate
添加位置或更新- 指定者:
addOrUpdate在接口中IGeoCache- 参数:
m- GeoInfoargs- key 参数- 返回:
- 抛出:
Exception
-
addOrUpdate
添加位置或更新- 指定者:
addOrUpdate在接口中IGeoCache- 参数:
list- List GeoInfoargs- key 参数- 返回:
- 抛出:
Exception
-
get
获取坐标 -
get
获取坐标 -
getDist
public Double getDist(String firstName, String secondName, DistUnit unit, Object... args) throws Exception 计算距离 -
getGeoHash
获取GeoHash- 指定者:
getGeoHash在接口中IGeoCache- 参数:
name- 位置名称args- key 参数- 返回:
- 抛出:
Exception
-
getGeoHash
获取GeoHash- 指定者:
getGeoHash在接口中IGeoCache- 参数:
names- 位置名称 Listargs- key 参数- 返回:
- 抛出:
Exception
-
delete
删除位置点 -
getRadius
public List<GeoRadius> getRadius(String name, double radius, DistUnit unit, int count, Sort sort, int radiusOptions, Object... args) throws Exception 查询指定位置名称半径内的位置 -
getRadius
public List<GeoRadius> getRadius(double lon, double lat, double radius, DistUnit unit, int count, Sort sort, int radiusOptions, Object... args) throws Exception 查询指定坐标半径内的位置 -
getCount
查询geo集合数量
-