From 14aad8e0e0fb56efd0c037ff2c3d14ff35c4e879 Mon Sep 17 00:00:00 2001 From: Nikita Date: Wed, 18 Jul 2018 15:10:16 +0300 Subject: [PATCH] Added RGeoReactive. #1555 --- .../java/org/redisson/RedissonReactive.java | 12 + .../java/org/redisson/api/RGeoReactive.java | 549 ++++++++++++++++++ .../redisson/api/RedissonReactiveClient.java | 20 + .../reactive/RedissonGeoReactive.java | 431 ++++++++++++++ 4 files changed, 1012 insertions(+) create mode 100644 redisson/src/main/java/org/redisson/api/RGeoReactive.java create mode 100644 redisson/src/main/java/org/redisson/reactive/RedissonGeoReactive.java diff --git a/redisson/src/main/java/org/redisson/RedissonReactive.java b/redisson/src/main/java/org/redisson/RedissonReactive.java index b589ff3de..da2f99049 100644 --- a/redisson/src/main/java/org/redisson/RedissonReactive.java +++ b/redisson/src/main/java/org/redisson/RedissonReactive.java @@ -31,6 +31,7 @@ import org.redisson.api.RBitSetReactive; import org.redisson.api.RBlockingQueueReactive; import org.redisson.api.RBucketReactive; import org.redisson.api.RDequeReactive; +import org.redisson.api.RGeoReactive; import org.redisson.api.RHyperLogLogReactive; import org.redisson.api.RKeys; import org.redisson.api.RKeysReactive; @@ -70,6 +71,7 @@ import org.redisson.reactive.RedissonBitSetReactive; import org.redisson.reactive.RedissonBlockingQueueReactive; import org.redisson.reactive.RedissonBucketReactive; import org.redisson.reactive.RedissonDequeReactive; +import org.redisson.reactive.RedissonGeoReactive; import org.redisson.reactive.RedissonHyperLogLogReactive; import org.redisson.reactive.RedissonKeysReactive; import org.redisson.reactive.RedissonLexSortedSetReactive; @@ -120,6 +122,16 @@ public class RedissonReactive implements RedissonReactiveClient { codecProvider = config.getReferenceCodecProvider(); } + @Override + public RGeoReactive getGeo(String name) { + return new RedissonGeoReactive(commandExecutor, name); + } + + @Override + public RGeoReactive getGeo(String name, Codec codec) { + return new RedissonGeoReactive(codec, commandExecutor, name); + } + @Override public RLockReactive getFairLock(String name) { return new RedissonLockReactive(commandExecutor, name, new RedissonFairLock(commandExecutor, name)); diff --git a/redisson/src/main/java/org/redisson/api/RGeoReactive.java b/redisson/src/main/java/org/redisson/api/RGeoReactive.java new file mode 100644 index 000000000..01f6a6aaa --- /dev/null +++ b/redisson/src/main/java/org/redisson/api/RGeoReactive.java @@ -0,0 +1,549 @@ +/** + * Copyright 2018 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.api; + +import java.util.List; +import java.util.Map; + +import org.reactivestreams.Publisher; + +/** + * Geospatial items holder. + * + * @author Nikita Koksharov + * + * @param type of value + */ +public interface RGeoReactive extends RScoredSortedSetReactive { + + /** + * Adds geospatial member. + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param member - object itself + * @return number of elements added to the sorted set, + * not including elements already existing for which + * the score was updated + */ + Publisher add(double longitude, double latitude, V member); + + /** + * Adds geospatial members. + * + * @param entries - objects + * @return number of elements added to the sorted set, + * not including elements already existing for which + * the score was updated + */ + Publisher add(GeoEntry... entries); + + /** + * Returns distance between members in GeoUnit units. + * + * @param firstMember - first object + * @param secondMember - second object + * @param geoUnit - geo unit + * @return distance + */ + Publisher dist(V firstMember, V secondMember, GeoUnit geoUnit); + + /** + * Returns 11 characters Geohash string mapped by defined member. + * + * @param members - objects + * @return hash mapped by object + */ + Publisher> hash(V... members); + + /** + * Returns geo-position mapped by defined member. + * + * @param members - objects + * @return geo position mapped by object + */ + Publisher> pos(V... members); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units. + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return list of objects + */ + Publisher> radius(double longitude, double latitude, double radius, GeoUnit geoUnit); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units and limited by count + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return list of objects + */ + Publisher> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, int count); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units with GeoOrder + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - order of result + * @return list of objects + */ + Publisher> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units with GeoOrder + * and limited by count + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - order of result + * @param count - result limit + * @return list of objects + */ + Publisher> radius(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + + /** + * Returns the distance mapped by member, distance between member and the location. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units. + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return distance mapped by object + */ + Publisher> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit); + + /** + * Returns the distance mapped by member, distance between member and the location. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units and limited by count. + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return distance mapped by object + */ + Publisher> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, int count); + + /** + * Returns the distance mapped by member, distance between member and the location. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units with GeoOrder + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - order of result + * @return distance mapped by object + */ + Publisher> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder); + + /** + * Returns the distance mapped by member, distance between member and the location. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units with GeoOrder + * and limited by count + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - order of result + * @param count - result limit + * @return distance mapped by object + */ + Publisher> radiusWithDistance(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units. + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units and limited by count + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, int count); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units with GeoOrder + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo order + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units with GeoOrder + * and limited by count + * + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo order + * @param count - result limit + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units. + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return list of objects + */ + Publisher> radius(V member, double radius, GeoUnit geoUnit); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units and limited by count + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return list of objects + */ + Publisher> radius(V member, double radius, GeoUnit geoUnit, int count); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units with GeoOrder + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo order + * @return list of objects + */ + Publisher> radius(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder); + + /** + * Returns the members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units with GeoOrder + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo order + * @param count - result limit + * @return list of objects + */ + Publisher> radius(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + + /** + * Returns the distance mapped by member, distance between member and the defined member location. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units. + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return distance mapped by object + */ + Publisher> radiusWithDistance(V member, double radius, GeoUnit geoUnit); + + /** + * Returns the distance mapped by member, distance between member and the defined member location. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units and limited by count + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return distance mapped by object + */ + Publisher> radiusWithDistance(V member, double radius, GeoUnit geoUnit, int count); + + /** + * Returns the distance mapped by member, distance between member and the defined member location. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units with GeoOrder + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo + * @return distance mapped by object + */ + Publisher> radiusWithDistance(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder); + + /** + * Returns the distance mapped by member, distance between member and the defined member location. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units with GeoOrder + * and limited by count + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo + * @param count - result limit + * @return distance mapped by object + */ + Publisher> radiusWithDistance(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units. + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(V member, double radius, GeoUnit geoUnit); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units and limited by count + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(V member, double radius, GeoUnit geoUnit, int count); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units with GeoOrder + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo order + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder); + + /** + * Returns the geo-position mapped by member. + * Members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units with GeoOrder + * and limited by count + * + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo order + * @param count - result limit + * @return geo position mapped by object + */ + Publisher> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + + /** + * Finds the members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units. + * Store result to destName. + * + * @param destName - Geo object destination + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return length of result + */ + Publisher radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit); + + /** + * Finds the members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units and limited by count + * Store result to destName. + * + * @param destName - Geo object destination + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return length of result + */ + Publisher radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, int count); + + /** + * Finds the members of a sorted set, which are within the + * borders of the area specified with the center location + * and the maximum distance from the center (the radius) + * in GeoUnit units with GeoOrder + * and limited by count + * Store result to destName. + * + * @param destName - Geo object destination + * @param longitude - longitude of object + * @param latitude - latitude of object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - order of result + * @param count - result limit + * @return length of result + */ + Publisher radiusStoreTo(String destName, double longitude, double latitude, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + + /** + * Finds the members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units. + * Store result to destName. + * + * @param destName - Geo object destination + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @return length of result + */ + Publisher radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit); + + /** + * Finds the members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units and limited by count + * Store result to destName. + * + * @param destName - Geo object destination + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param count - result limit + * @return length of result + */ + Publisher radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, int count); + + /** + * Finds the members of a sorted set, which are within the + * borders of the area specified with the defined member location + * and the maximum distance from the defined member location (the radius) + * in GeoUnit units with GeoOrder + * Store result to destName. + * + * @param destName - Geo object destination + * @param member - object + * @param radius - radius in geo units + * @param geoUnit - geo unit + * @param geoOrder - geo order + * @param count - result limit + * @return length of result + */ + Publisher radiusStoreTo(String destName, V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder, int count); + +} diff --git a/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java b/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java index a9023ca2e..181953612 100644 --- a/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java +++ b/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java @@ -30,6 +30,26 @@ import org.redisson.config.Config; */ public interface RedissonReactiveClient { + /** + * Returns geospatial items holder instance by name. + * + * @param type of value + * @param name - name of object + * @return Geo object + */ + RGeoReactive getGeo(String name); + + /** + * Returns geospatial items holder instance by name + * using provided codec for geospatial members. + * + * @param type of value + * @param name - name of object + * @param codec - codec for value + * @return Geo object + */ + RGeoReactive getGeo(String name, Codec codec); + /** * Returns rate limiter instance by name * diff --git a/redisson/src/main/java/org/redisson/reactive/RedissonGeoReactive.java b/redisson/src/main/java/org/redisson/reactive/RedissonGeoReactive.java new file mode 100644 index 000000000..f8de937f4 --- /dev/null +++ b/redisson/src/main/java/org/redisson/reactive/RedissonGeoReactive.java @@ -0,0 +1,431 @@ +/** + * Copyright 2018 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.reactive; + +import java.util.List; +import java.util.Map; + +import org.reactivestreams.Publisher; +import org.redisson.RedissonGeo; +import org.redisson.api.GeoEntry; +import org.redisson.api.GeoOrder; +import org.redisson.api.GeoPosition; +import org.redisson.api.GeoUnit; +import org.redisson.api.RFuture; +import org.redisson.api.RGeoAsync; +import org.redisson.api.RGeoReactive; +import org.redisson.client.codec.Codec; +import org.redisson.command.CommandReactiveExecutor; + +import reactor.fn.Supplier; + +/** + * + * @author Nikita Koksharov + * + * @param value type + */ +public class RedissonGeoReactive extends RedissonScoredSortedSetReactive implements RGeoReactive { + + private final RGeoAsync instance; + + public RedissonGeoReactive(CommandReactiveExecutor commandExecutor, String name) { + this(commandExecutor, name, new RedissonGeo(commandExecutor, name, null)); + } + + public RedissonGeoReactive(CommandReactiveExecutor commandExecutor, String name, RGeoAsync instance) { + super(commandExecutor, name, instance); + this.instance = instance; + } + + public RedissonGeoReactive(Codec codec, CommandReactiveExecutor commandExecutor, String name) { + this(codec, commandExecutor, name, new RedissonGeo(codec, commandExecutor, name, null)); + } + + public RedissonGeoReactive(Codec codec, CommandReactiveExecutor commandExecutor, String name, RGeoAsync instance) { + super(codec, commandExecutor, name, instance); + this.instance = instance; + } + + @Override + public Publisher add(final double longitude, final double latitude, final V member) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.addAsync(longitude, latitude, member); + } + }); + } + + @Override + public Publisher add(final GeoEntry... entries) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.addAsync(entries); + } + }); + } + + @Override + public Publisher dist(final V firstMember, final V secondMember, final GeoUnit geoUnit) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.distAsync(firstMember, secondMember, geoUnit); + } + }); + } + + @Override + public Publisher> hash(final V... members) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.hashAsync(members); + } + }); + } + + @Override + public Publisher> pos(final V... members) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.posAsync(members); + } + }); + } + + @Override + public Publisher> radius(final double longitude, final double latitude, final double radius, final GeoUnit geoUnit) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(longitude, latitude, radius, geoUnit); + } + }); + } + + @Override + public Publisher> radius(final double longitude, final double latitude, final double radius, final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(longitude, latitude, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher> radius(final double longitude, final double latitude, final double radius, final GeoUnit geoUnit, + final GeoOrder geoOrder) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(longitude, latitude, radius, geoUnit, geoOrder); + } + }); + } + + @Override + public Publisher> radius(final double longitude, final double latitude, final double radius, final GeoUnit geoUnit, + final GeoOrder geoOrder, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(longitude, latitude, radius, geoUnit, geoOrder, count); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(longitude, latitude, radius, geoUnit); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(longitude, latitude, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final GeoOrder geoOrder) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(longitude, latitude, radius, geoUnit, geoOrder); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final GeoOrder geoOrder, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(longitude, latitude, radius, geoUnit, geoOrder, count); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(longitude, latitude, radius, geoUnit); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(longitude, latitude, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final GeoOrder geoOrder) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(longitude, latitude, radius, geoUnit, geoOrder); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final GeoOrder geoOrder, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(longitude, latitude, radius, geoUnit, geoOrder, count); + } + }); + } + + @Override + public Publisher> radius(final V member, final double radius, final GeoUnit geoUnit) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(member, radius, geoUnit); + } + }); + } + + @Override + public Publisher> radius(final V member, final double radius, final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(member, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher> radius(final V member, final double radius, final GeoUnit geoUnit, final GeoOrder geoOrder) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(member, radius, geoUnit, geoOrder); + } + }); + } + + @Override + public Publisher> radius(final V member, final double radius, final GeoUnit geoUnit, final GeoOrder geoOrder, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusAsync(member, radius, geoUnit, geoOrder, count); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final V member, final double radius, final GeoUnit geoUnit) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(member, radius, geoUnit); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final V member, final double radius, final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(member, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final V member, final double radius, final GeoUnit geoUnit, final GeoOrder geoOrder) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(member, radius, geoUnit, geoOrder); + } + }); + } + + @Override + public Publisher> radiusWithDistance(final V member, final double radius, final GeoUnit geoUnit, final GeoOrder geoOrder, + final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithDistanceAsync(member, radius, geoUnit, geoOrder, count); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final V member, final double radius, final GeoUnit geoUnit) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(member, radius, geoUnit); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final V member, final double radius, final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(member, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final V member, final double radius, final GeoUnit geoUnit, + final GeoOrder geoOrder) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(member, radius, geoUnit, geoOrder); + } + }); + } + + @Override + public Publisher> radiusWithPosition(final V member, final double radius, final GeoUnit geoUnit, + final GeoOrder geoOrder, final int count) { + return reactive(new Supplier>>() { + @Override + public RFuture> get() { + return instance.radiusWithPositionAsync(member, radius, geoUnit, geoOrder, count); + } + }); + } + + @Override + public Publisher radiusStoreTo(final String destName, final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit); + } + }); + } + + @Override + public Publisher radiusStoreTo(final String destName, final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher radiusStoreTo(final String destName, final double longitude, final double latitude, final double radius, + final GeoUnit geoUnit, final GeoOrder geoOrder, final int count) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.radiusStoreToAsync(destName, longitude, latitude, radius, geoUnit, geoOrder, count); + } + }); + } + + @Override + public Publisher radiusStoreTo(final String destName, final V member, final double radius, final GeoUnit geoUnit) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.radiusStoreToAsync(destName, member, radius, geoUnit); + } + }); + } + + @Override + public Publisher radiusStoreTo(final String destName, final V member, final double radius, final GeoUnit geoUnit, final int count) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.radiusStoreToAsync(destName, member, radius, geoUnit, count); + } + }); + } + + @Override + public Publisher radiusStoreTo(final String destName, final V member, final double radius, final GeoUnit geoUnit, final GeoOrder geoOrder, + final int count) { + return reactive(new Supplier>() { + @Override + public RFuture get() { + return instance.radiusStoreToAsync(destName, member, radius, geoUnit, geoOrder, count); + } + }); + } + + +}