I am looking for an option to perform Redis BITOP using Spring RedisTemplate. I tried searching internet for an example but couldn't find anything similar. I was able to get the bitOp function from JedisStringCommands class but not sure how to use it.
The requirement is to do AND operation between values stored in two key's in REDIS and save it into a different key.
Looking for Spring Redis implementation for - https://redis.io/commands/bitop
I think I got a solution. Its not an elegant way but I was able to manage to get the bit operations performed on key. This is what I have used.
redisTemplate.getConnectionFactory().getConnection().bitOp(BitOperation.AND,JedisConverters.toBytes(destination), JedisConverters.toBytes(firstKey),JedisConverters.toBytes(lsecondKey));
Might be useful for someone with above issue.