Search in sources :

Example 1 with GeoWithinListOutput

use of io.lettuce.core.output.GeoWithinListOutput in project turms by turms-im.

the class TurmsRedisCommandBuilder method georadiusbymember.

// Geo
public <T> Command<ByteBuf, ByteBuf, List<GeoWithin<T>>> georadiusbymember(CommandType commandType, ByteBuf key, ByteBuf member, double distance, String unit, GeoArgs geoArgs) {
    CommandArgs<ByteBuf, ByteBuf> args = new CommandArgs<>(memberCodec).addKey(key).addValue(member).add(distance).add(unit);
    geoArgs.build(args);
    GeoWithinListOutput output = new GeoWithinListOutput<>(memberCodec, geoArgs.isWithDistance(), geoArgs.isWithHash(), geoArgs.isWithCoordinates());
    return createCommand(commandType, output, args);
}
Also used : CommandArgs(io.lettuce.core.protocol.CommandArgs) GeoWithinListOutput(io.lettuce.core.output.GeoWithinListOutput) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

GeoWithinListOutput (io.lettuce.core.output.GeoWithinListOutput)1 CommandArgs (io.lettuce.core.protocol.CommandArgs)1 ByteBuf (io.netty.buffer.ByteBuf)1