-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cluster API does not implement the Geo commands interface #154
Comments
Hi @IdanFridman |
Could you show an example how what exactly to cast? btw: do I need to add into it all the cluster ip's nodes?(by constructing it with list of RedisURI's or one uri of the host would be enough to enable the cluster)? thank you. |
To your first question: RedisClusterClient clusterClient = new RedisClusterClient(new RedisURI(
REDIS_HOST,REDIS_PORT,60, TimeUnit.SECONDS));
StatefulRedisClusterConnection<String, String> clusterConnection = redisClusterClient.connect();
RedisGeoAsyncCommands<String, String> geoAsync =
(RedisGeoAsyncCommands<String, String>) clusterConnection.async();
geoAsync.geoadd(...); Second question: |
The Cluster APIs (deprecated Connection API and regular Command API) did not declare the Geo commands/connection interface in the extension list. Altough the Geo commands were available on the async/reactive API (because the API object implements all Geo methods) the API was not exposed and the Geo methods were not usable. This commit adds the GeoCommands/GeoConnection interfaces to the cluster commands/connection interfaces.
The Cluster APIs (deprecated Connection API and regular Command API) did not declare the Geo commands/connection interface in the extension list. Altough the Geo commands were available on the async/reactive API (because the API object implements all Geo methods) the API was not exposed and the Geo methods were not usable. This commit adds the GeoCommands/GeoConnection interfaces to the cluster commands/connection interfaces.
Fixed, will be released with 4.0.1.Final end of November. |
Released 4.0.1.Final to Maven Central |
I am trying to figure out how to use the geolocation async cluster client of your library.
before geolocation I used it this way:
RedisClient client = new RedisClient(REDIS_HOST, REDIS_PORT);
RedisGeoAsyncCommands<String, String> geoAsyncCommand = client.connect().async();;
.....
I cant figure out how to do it using the RedisClusterClient. Tried this:
RedisClusterClient clusterClient = new RedisClusterClient(new RedisURI(REDIS_HOST,REDIS_PORT,60, TimeUnit.SECONDS));
//doesnt compile
geoAsyncCommand = clusterClient.connect().async();
//
the async client return RedisAdvancedClusterAsyncCommands which RedisGeoAsyncCommands doesnt support
Thanks,
Idan.
The text was updated successfully, but these errors were encountered: