Hi Sindhu,
Redis accepts commands that consist of a command type (or multiple command keywords) and a list of arguments. CommandArgs doesn't distinguish whether the actual target data type is a map, list, set, …, rather it's an enumeration of arguments. CommandArgs distinguishes only on the argument level between String, byte[], integer/double, keys and values (applying RedisCodec).
Let's take your map example. The command for storing multiple map entries in Redis is HMSET, so this goes something along the lines of:
HMSET key map-field1 map-value1 map-field2 map-value2
Translating to the Lettuce API, you end up with something like:
new Command<>(CommandType.HMSET, …, new CommandArgs<>(StringCodec.UTF8).add("key").add("map-field1").add("map-value1").add("map-field2").add("map-value2"));
Hope this helps.
Cheers,
Mark