/** * Execute an arbitrary on the supplied {@link Jedis} instance. * * @param command the command. * @param keys must not be {@literal null}, may be empty. * @param args must not be {@literal null}, may be empty. * @param jedis must not be {@literal null}. * @param responseMapper must not be {@literal null}. * @return the response, can be be {@literal null}. * @since 2.1 */ static <T> T execute(String command, byte[][] keys, byte[][] args, Supplier<Jedis> jedis, Function<Client, T> responseMapper) { byte[][] commandArgs = getCommandArguments(keys, args); Client client = sendCommand(command, commandArgs, jedis.get()); return responseMapper.apply(client); }
/** * Execute an arbitrary on the supplied {@link Jedis} instance. * * @param command the command. * @param keys must not be {@literal null}, may be empty. * @param args must not be {@literal null}, may be empty. * @param jedis must not be {@literal null}. * @param responseMapper must not be {@literal null}. * @return the response, can be be {@literal null}. * @since 2.1 */ static <T> T execute(String command, byte[][] keys, byte[][] args, Supplier<Jedis> jedis, Function<Client, T> responseMapper) { byte[][] commandArgs = getCommandArguments(keys, args); Client client = sendCommand(command, commandArgs, jedis.get()); return responseMapper.apply(client); }
/** * Execute an arbitrary on the supplied {@link Jedis} instance. * * @param command the command. * @param keys must not be {@literal null}, may be empty. * @param args must not be {@literal null}, may be empty. * @param jedis must not be {@literal null}. * @param responseMapper must not be {@literal null}. * @return the response, can be be {@literal null}. * @since 2.1 */ static <T> T execute(String command, byte[][] keys, byte[][] args, Supplier<Jedis> jedis, Function<Client, T> responseMapper) { byte[][] commandArgs = getCommandArguments(keys, args); Client client = sendCommand(command, commandArgs, jedis.get()); return responseMapper.apply(client); }