I am trying to invoke hmset command from Lettuce Command Interface CommandsBut at runtime it gives error
Command HMSET requires at least 3 parameters but method declares 2 parameter(s). Offending method: public abstract java.lang.Void net.media.max.utils.LettuceCommandInterface.hmset(java.lang.String,java.util.Map<java.lang.String, java.lang.String>)
below is my class
import java.util.Map;import io.lettuce.core.dynamic.Commands;import io.lettuce.core.dynamic.annotation.Command;import io.lettuce.core.dynamic.batch.BatchExecutor;import io.lettuce.core.dynamic.batch.BatchSize;@BatchSize(1000)public interface LettuceCommandInterface extends Commands, BatchExecutor { @Command("HSET") void hset(String key, String hashKey, String value); @Command("ZADD") void zadd(String key, double score, String member); @Command("SET") void set(String key, String values); @Command("hmset") Void hmset(String key, Map<String,String> map);}
If I replace the void with String as the return type then it gives the following error
Batching command method public abstract java.lang.String net.media.max.utils.LettuceCommandInterface.hmset(java.lang.String,java.util.Map<java.lang.String, java.lang.String>) must declare either a Future or void return type