接口 IGeoCache

所有超级接口:
AutoCloseable, IBaseCache, IRedisCache
所有已知子接口:
IGeoDbCache
所有已知实现类:
GeoCache, GeoDbCache

public interface IGeoCache extends IRedisCache
  • 方法详细资料

    • addOrUpdate

      boolean addOrUpdate(String name, double lon, double lat, Object... args) throws Exception
      添加位置或更新
      参数:
      name - 位置名称
      lon - 经度
      lat - 纬度
      args - key 参数
      返回:
      抛出:
      Exception
    • addOrUpdate

      boolean addOrUpdate(String name, GeoPos pos, Object... args) throws Exception
      添加位置或更新
      参数:
      name - 位置名称
      pos - 位置
      args - key 参数
      返回:
      抛出:
      Exception
    • addOrUpdate

      boolean addOrUpdate(GeoInfo m, Object... args) throws Exception
      添加位置或更新
      参数:
      m - GeoInfo
      args - key 参数
      返回:
      抛出:
      Exception
    • addOrUpdate

      long addOrUpdate(List<GeoInfo> list, Object... args) throws Exception
      添加位置或更新
      参数:
      list - List GeoInfo
      args - key 参数
      返回:
      抛出:
      Exception
    • get

      GeoPos get(String name, Object... args) throws Exception
      获取坐标
      参数:
      name - 位置名称
      args - key 参数
      返回:
      GeoPos
      抛出:
      Exception
    • get

      List<GeoPos> get(List<String> names, Object... args) throws Exception
      获取坐标
      参数:
      names - 位置名称 List
      args - key 参数
      返回:
      List GeoPos
      抛出:
      Exception
    • getDist

      Double getDist(String firstName, String secondName, DistUnit unit, Object... args) throws Exception
      计算距离
      参数:
      firstName - 第一个坐标点名称
      secondName - 第二个坐标点名称
      unit - 距离单位
      args - key 参数
      返回:
      坐标不存在返回null
      抛出:
      Exception
    • getGeoHash

      String getGeoHash(String name, Object... args) throws Exception
      获取GeoHash
      参数:
      name - 位置名称
      args - key 参数
      返回:
      抛出:
      Exception
    • getGeoHash

      List<String> getGeoHash(List<String> names, Object... args) throws Exception
      获取GeoHash
      参数:
      names - 位置名称 List
      args - key 参数
      返回:
      抛出:
      Exception
    • delete

      boolean delete(String name, Object... args) throws Exception
      删除位置点
      参数:
      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

      long getCount(Object... args) throws Exception
      查询geo集合数量
      参数:
      args - key 参数
      返回:
      抛出:
      Exception