@ -53,8 +53,8 @@ import org.redisson.connection.decoder.MapGetAllDecoder;
* /
public class RedissonGeo < V > extends RedissonScoredSortedSet < V > implements RGeo < V > {
private final MultiDecoder < Map < Object , Object > > postitionDecoder = new ListMultiDecoder ( new CodecDecoder ( ) , new GeoPositionDecoder ( ) , new ObjectListReplayDecoder ( ListMultiDecoder . RESET ) , new GeoMapReplayDecoder ( ) ) ;
private final MultiDecoder < Map < Object , Object > > distanceDecoder = new ListMultiDecoder ( new GeoDistanceDecoder ( ) , new GeoMapReplayDecoder ( ) ) ;
private static final MultiDecoder < Map < Object , Object > > postitionDecoder = new ListMultiDecoder ( new CodecDecoder ( ) , new GeoPositionDecoder ( ) , new ObjectListReplayDecoder ( ListMultiDecoder . RESET ) , new GeoMapReplayDecoder ( ) ) ;
private static final MultiDecoder < Map < Object , Object > > distanceDecoder = new ListMultiDecoder ( new GeoDistanceDecoder ( ) , new GeoMapReplayDecoder ( ) ) ;
public RedissonGeo ( CommandAsyncExecutor connectionManager , String name , RedissonClient redisson ) {
super ( connectionManager , name , redisson ) ;
@ -146,7 +146,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS , getName ( ) , convert ( longitude ) , convert ( latitude ) , radius , geoUnit ) ;
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS _RO , getName ( ) , convert ( longitude ) , convert ( latitude ) , radius , geoUnit ) ;
}
@Override
@ -156,7 +156,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , int count ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS _RO , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "COUNT" , count ) ;
}
@ -167,7 +167,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , GeoOrder geoOrder ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS _RO , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , geoOrder ) ;
}
@ -178,7 +178,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , GeoOrder geoOrder , int count ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUS _RO , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "COUNT" , count , geoOrder ) ;
}
@ -189,7 +189,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", distanceDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "WITHDIST" ) ;
}
@ -201,7 +201,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , int count ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", distanceDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "WITHDIST" , "COUNT" , count ) ;
}
@ -213,7 +213,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , GeoOrder geoOrder ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", distanceDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "WITHDIST" , geoOrder ) ;
}
@ -225,7 +225,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , GeoOrder geoOrder , int count ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", distanceDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "WITHDIST" , "COUNT" , count , geoOrder ) ;
}
@ -237,7 +237,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) , radius , geoUnit , "WITHCOORD" ) ;
}
@ -248,7 +248,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , int count ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "WITHCOORD" , "COUNT" , count ) ;
}
@ -260,7 +260,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , GeoOrder geoOrder ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "WITHCOORD" , geoOrder ) ;
}
@ -272,7 +272,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( double longitude , double latitude , double radius , GeoUnit geoUnit , GeoOrder geoOrder , int count ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUS _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , convert ( longitude ) , convert ( latitude ) ,
radius , geoUnit , "WITHCOORD" , "COUNT" , count , geoOrder ) ;
}
@ -284,7 +284,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( V member , double radius , GeoUnit geoUnit ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER , getName ( ) , encode ( member ) , radius , geoUnit ) ;
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER _RO , getName ( ) , encode ( member ) , radius , geoUnit ) ;
}
@Override
@ -294,7 +294,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( V member , double radius , GeoUnit geoUnit , int count ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER , getName ( ) , encode ( member ) , radius , geoUnit , "COUNT" , count ) ;
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER _RO , getName ( ) , encode ( member ) , radius , geoUnit , "COUNT" , count ) ;
}
@Override
@ -304,7 +304,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( V member , double radius , GeoUnit geoUnit , GeoOrder geoOrder ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER , getName ( ) , encode ( member ) , radius , geoUnit , geoOrder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER _RO , getName ( ) , encode ( member ) , radius , geoUnit , geoOrder ) ;
}
@Override
@ -314,7 +314,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < List < V > > radiusAsync ( V member , double radius , GeoUnit geoUnit , GeoOrder geoOrder , int count ) {
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER , getName ( ) , encode ( member ) , radius , geoUnit , "COUNT" , count , geoOrder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , RedisCommands . GEORADIUSBYMEMBER _RO , getName ( ) , encode ( member ) , radius , geoUnit , "COUNT" , count , geoOrder ) ;
}
@Override
@ -324,7 +324,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( V member , double radius , GeoUnit geoUnit ) {
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER ", distanceDecoder ) ;
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHDIST" ) ;
}
@ -335,7 +335,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( V member , double radius , GeoUnit geoUnit , int count ) {
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER ", distanceDecoder ) ;
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHDIST" , "COUNT" , count ) ;
}
@ -346,7 +346,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( V member , double radius , GeoUnit geoUnit , GeoOrder geoOrder ) {
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER ", distanceDecoder ) ;
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHDIST" , geoOrder ) ;
}
@ -357,7 +357,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , Double > > radiusWithDistanceAsync ( V member , double radius , GeoUnit geoUnit , GeoOrder geoOrder , int count ) {
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER ", distanceDecoder ) ;
RedisCommand command = new RedisCommand ( "GEORADIUSBYMEMBER _RO ", distanceDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHDIST" , "COUNT" , count , geoOrder ) ;
}
@ -368,7 +368,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( V member , double radius , GeoUnit geoUnit ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHCOORD" ) ;
}
@ -379,7 +379,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( V member , double radius , GeoUnit geoUnit , int count ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHCOORD" , "COUNT" , count ) ;
}
@ -390,7 +390,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( V member , double radius , GeoUnit geoUnit , GeoOrder geoOrder ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHCOORD" , geoOrder ) ;
}
@ -401,7 +401,7 @@ public class RedissonGeo<V> extends RedissonScoredSortedSet<V> implements RGeo<V
@Override
public RFuture < Map < V , GeoPosition > > radiusWithPositionAsync ( V member , double radius , GeoUnit geoUnit , GeoOrder geoOrder , int count ) {
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER ", postitionDecoder ) ;
RedisCommand < Map < Object , Object > > command = new RedisCommand < Map < Object , Object > > ( "GEORADIUSBYMEMBER _RO ", postitionDecoder ) ;
return commandExecutor . readAsync ( getName ( ) , codec , command , getName ( ) , encode ( member ) , radius , geoUnit , "WITHCOORD" , "COUNT" , count , geoOrder ) ;
}