public class DefaultGeoOperationsX<M> extends Object implements IKeyNamingPolicy
| Constructor and Description |
|---|
DefaultGeoOperationsX(org.springframework.data.redis.core.RedisTemplate<String,M> template,
IKeyNamingPolicy keyNamingPolicy)
Creates new
DefaultGeoOperations. |
| Modifier and Type | Method and Description |
|---|---|
Long |
add(String key,
Iterable<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> geoLocations)
Add
RedisGeoCommands.GeoLocations to key |
Long |
add(String key,
Map<M,org.springframework.data.geo.Point> memberCoordinateMap)
Add
Map of member / Point pairs to key. |
Long |
add(String key,
org.springframework.data.geo.Point point,
M member)
Add
Point with given member name to key. |
Long |
add(String key,
org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M> location)
Add
RedisGeoCommands.GeoLocation to key. |
org.springframework.data.geo.Distance |
distance(String key,
M member1,
M member2)
Get the
Distance between member1 and member2. |
org.springframework.data.geo.Distance |
distance(String key,
M member1,
M member2,
org.springframework.data.geo.Metric metric)
Get the
Distance between member1 and member2 in the given Metric. |
String |
getKeyName(String key)
Get naming key
|
org.springframework.data.redis.core.RedisOperations<K,V> |
getOperations() |
List<String> |
hash(String key,
M... members)
Get Geohash representation of the position for one or more members.
|
List<org.springframework.data.geo.Point> |
position(String key,
M... members)
Get the
Point representation of positions for one or more members. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> |
radius(String key,
org.springframework.data.geo.Circle within)
Get the members within the boundaries of a given
Circle. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> |
radius(String key,
org.springframework.data.geo.Circle within,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the boundaries of a given
Circle applying RedisGeoCommands.GeoRadiusCommandArgs. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> |
radius(String key,
M member,
org.springframework.data.geo.Distance distance)
Get the members within the circle defined by the members coordinates and given
radius applying
Metric. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> |
radius(String key,
M member,
org.springframework.data.geo.Distance distance,
org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Get the members within the circle defined by the members coordinates and given
radius applying
Metric and RedisGeoCommands.GeoRadiusCommandArgs. |
org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> |
radius(String key,
M member,
double radius)
Get the members within the circle defined by the members coordinates and given
radius.
|
Long |
remove(String key,
M... members)
Remove the members.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKeyNames, getKeyNames, mapKeyNamingpublic DefaultGeoOperationsX(org.springframework.data.redis.core.RedisTemplate<String,M> template, IKeyNamingPolicy keyNamingPolicy)
DefaultGeoOperations.template - must not be null.keyNamingPolicy - key naming policypublic Long add(String key, org.springframework.data.geo.Point point, M member)
Point with given member name to key.add in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.point - must not be null.member - must not be null.public Long add(String key, org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M> location)
RedisGeoCommands.GeoLocation to key.add in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.location - must not be null.public Long add(String key, Map<M,org.springframework.data.geo.Point> memberCoordinateMap)
Map of member / Point pairs to key.add in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.memberCoordinateMap - must not be null.public Long add(String key, Iterable<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> geoLocations)
RedisGeoCommands.GeoLocations to keyadd in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.geoLocations - must not be null.public org.springframework.data.geo.Distance distance(String key, M member1, M member2)
Distance between member1 and member2.distance in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.member1 - must not be null.member2 - must not be null.public org.springframework.data.geo.Distance distance(String key, M member1, M member2, org.springframework.data.geo.Metric metric)
Distance between member1 and member2 in the given Metric.distance in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.member1 - must not be null.member2 - must not be null.metric - must not be null.public List<String> hash(String key, M... members)
hash in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.members - must not be null.public List<org.springframework.data.geo.Point> position(String key, M... members)
Point representation of positions for one or more members.position in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.members - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> radius(String key, org.springframework.data.geo.Circle within)
Circle.radius in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.within - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> radius(String key, org.springframework.data.geo.Circle within, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Circle applying RedisGeoCommands.GeoRadiusCommandArgs.radius in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.within - must not be null.args - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> radius(String key, M member, double radius)
radius in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.member - must not be null.radius - public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> radius(String key, M member, org.springframework.data.geo.Distance distance)
Metric.radius in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.member - must not be null.distance - must not be null.public org.springframework.data.geo.GeoResults<org.springframework.data.redis.connection.RedisGeoCommands.GeoLocation<M>> radius(String key, M member, org.springframework.data.geo.Distance distance, org.springframework.data.redis.connection.RedisGeoCommands.GeoRadiusCommandArgs args)
Metric and RedisGeoCommands.GeoRadiusCommandArgs.radius in interface org.springframework.data.redis.core.GeoOperations<String,M>key - must not be null.member - must not be null.distance - must not be null.args - must not be null.public String getKeyName(String key)
IKeyNamingPolicygetKeyName in interface IKeyNamingPolicypublic org.springframework.data.redis.core.RedisOperations<K,V> getOperations()
Copyright © 2020. All rights reserved.