本文整理了Java中redis.clients.jedis.JedisCluster.geoadd()
方法的一些代码示例,展示了JedisCluster.geoadd()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCluster.geoadd()
方法的具体详情如下:
包路径:redis.clients.jedis.JedisCluster
类名称:JedisCluster
方法名:geoadd
暂无
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Long geoAdd(byte[] key, Map<byte[], Point> memberCoordinateMap) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(memberCoordinateMap, "MemberCoordinateMap must not be null!");
Map<byte[], GeoCoordinate> redisGeoCoordinateMap = new HashMap<>();
for (byte[] mapKey : memberCoordinateMap.keySet()) {
redisGeoCoordinateMap.put(mapKey, JedisConverters.toGeoCoordinate(memberCoordinateMap.get(mapKey)));
}
try {
return connection.getCluster().geoadd(key, redisGeoCoordinateMap);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Long geoAdd(byte[] key, Point point, byte[] member) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(point, "Point must not be null!");
Assert.notNull(member, "Member must not be null!");
try {
return connection.getCluster().geoadd(key, point.getX(), point.getY(), member);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Long geoAdd(byte[] key, Iterable<GeoLocation<byte[]>> locations) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(locations, "Locations must not be null!");
Map<byte[], redis.clients.jedis.GeoCoordinate> redisGeoCoordinateMap = new HashMap<>();
for (GeoLocation<byte[]> location : locations) {
redisGeoCoordinateMap.put(location.getName(), JedisConverters.toGeoCoordinate(location.getPoint()));
}
try {
return connection.getCluster().geoadd(key, redisGeoCoordinateMap);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: net.oschina.j2cache/j2cache-core
@Override
public Long geoadd(byte[] bytes, Map<byte[], GeoCoordinate> map) {
return cluster.geoadd(bytes, map);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long geoadd(byte[] key, double longitude, double latitude, byte[] member) {
return jedisCluster.geoadd(key, longitude, latitude, member);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long geoadd(String key, double longitude, double latitude, String member) {
return jedisCluster.geoadd(key, longitude, latitude, member);
}
代码示例来源:origin: net.oschina.j2cache/j2cache-core
@Override
public Long geoadd(byte[] bytes, double v, double v1, byte[] bytes1) {
return cluster.geoadd(bytes, v, v1, bytes1);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long geoadd(String key, Map<String, GeoCoordinate> memberCoordinateMap) {
return jedisCluster.geoadd(key, memberCoordinateMap);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long geoadd(byte[] key, Map<byte[], GeoCoordinate> memberCoordinateMap) {
return jedisCluster.geoadd(key, memberCoordinateMap);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long geoAdd(byte[] key, Map<byte[], Point> memberCoordinateMap) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(memberCoordinateMap, "MemberCoordinateMap must not be null!");
Map<byte[], GeoCoordinate> redisGeoCoordinateMap = new HashMap<>();
for (byte[] mapKey : memberCoordinateMap.keySet()) {
redisGeoCoordinateMap.put(mapKey, JedisConverters.toGeoCoordinate(memberCoordinateMap.get(mapKey)));
}
try {
return connection.getCluster().geoadd(key, redisGeoCoordinateMap);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public Long geoAdd(byte[] key, Map<byte[], Point> memberCoordinateMap) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(memberCoordinateMap, "MemberCoordinateMap must not be null!");
Map<byte[], GeoCoordinate> redisGeoCoordinateMap = new HashMap<>();
for (byte[] mapKey : memberCoordinateMap.keySet()) {
redisGeoCoordinateMap.put(mapKey, JedisConverters.toGeoCoordinate(memberCoordinateMap.get(mapKey)));
}
try {
return connection.getCluster().geoadd(key, redisGeoCoordinateMap);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public Long geoAdd(byte[] key, Point point, byte[] member) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(point, "Point must not be null!");
Assert.notNull(member, "Member must not be null!");
try {
return connection.getCluster().geoadd(key, point.getX(), point.getY(), member);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long geoAdd(byte[] key, Point point, byte[] member) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(point, "Point must not be null!");
Assert.notNull(member, "Member must not be null!");
try {
return connection.getCluster().geoadd(key, point.getX(), point.getY(), member);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public Long geoAdd(byte[] key, Iterable<GeoLocation<byte[]>> locations) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(locations, "Locations must not be null!");
Map<byte[], redis.clients.jedis.GeoCoordinate> redisGeoCoordinateMap = new HashMap<>();
for (GeoLocation<byte[]> location : locations) {
redisGeoCoordinateMap.put(location.getName(), JedisConverters.toGeoCoordinate(location.getPoint()));
}
try {
return connection.getCluster().geoadd(key, redisGeoCoordinateMap);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long geoAdd(byte[] key, Iterable<GeoLocation<byte[]>> locations) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(locations, "Locations must not be null!");
Map<byte[], redis.clients.jedis.GeoCoordinate> redisGeoCoordinateMap = new HashMap<>();
for (GeoLocation<byte[]> location : locations) {
redisGeoCoordinateMap.put(location.getName(), JedisConverters.toGeoCoordinate(location.getPoint()));
}
try {
return connection.getCluster().geoadd(key, redisGeoCoordinateMap);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
内容来源于网络,如有侵权,请联系作者删除!