@Override public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) { Assert.notNull(op, "BitOperation must not be null!"); Assert.notNull(destination, "Destination key must not be null!"); byte[][] allKeys = ByteUtils.mergeArrays(destination, keys); if (ClusterSlotHashUtil.isSameSlotForAllKeys(allKeys)) { try { return connection.getCluster().bitop(JedisConverters.toBitOp(op), destination, keys); } catch (Exception ex) { throw convertJedisAccessException(ex); } } throw new InvalidDataAccessApiUsageException("BITOP is only supported for same slot keys in cluster mode."); }
@Override public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) { Assert.notNull(op, "BitOperation must not be null!"); Assert.notNull(destination, "Destination key must not be null!"); if (op == BitOperation.NOT && keys.length > 1) { throw new UnsupportedOperationException("Bitop NOT should only be performed against one key"); } try { if (isPipelined()) { pipeline(connection .newJedisResult(connection.getRequiredPipeline().bitop(JedisConverters.toBitOp(op), destination, keys))); return null; } if (isQueueing()) { transaction(connection .newJedisResult(connection.getRequiredTransaction().bitop(JedisConverters.toBitOp(op), destination, keys))); return null; } return connection.getJedis().bitop(JedisConverters.toBitOp(op), destination, keys); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) { Assert.notNull(op, "BitOperation must not be null!"); Assert.notNull(destination, "Destination key must not be null!"); byte[][] allKeys = ByteUtils.mergeArrays(destination, keys); if (ClusterSlotHashUtil.isSameSlotForAllKeys(allKeys)) { try { return connection.getCluster().bitop(JedisConverters.toBitOp(op), destination, keys); } catch (Exception ex) { throw convertJedisAccessException(ex); } } throw new InvalidDataAccessApiUsageException("BITOP is only supported for same slot keys in cluster mode."); }
@Override public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) { Assert.notNull(op, "BitOperation must not be null!"); Assert.notNull(destination, "Destination key must not be null!"); byte[][] allKeys = ByteUtils.mergeArrays(destination, keys); if (ClusterSlotHashUtil.isSameSlotForAllKeys(allKeys)) { try { return connection.getCluster().bitop(JedisConverters.toBitOp(op), destination, keys); } catch (Exception ex) { throw convertJedisAccessException(ex); } } throw new InvalidDataAccessApiUsageException("BITOP is only supported for same slot keys in cluster mode."); }
@Override public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) { Assert.notNull(op, "BitOperation must not be null!"); Assert.notNull(destination, "Destination key must not be null!"); if (op == BitOperation.NOT && keys.length > 1) { throw new UnsupportedOperationException("Bitop NOT should only be performed against one key"); } try { if (isPipelined()) { pipeline(connection .newJedisResult(connection.getRequiredPipeline().bitop(JedisConverters.toBitOp(op), destination, keys))); return null; } if (isQueueing()) { transaction(connection .newJedisResult(connection.getRequiredTransaction().bitop(JedisConverters.toBitOp(op), destination, keys))); return null; } return connection.getJedis().bitop(JedisConverters.toBitOp(op), destination, keys); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long bitOp(BitOperation op, byte[] destination, byte[]... keys) { Assert.notNull(op, "BitOperation must not be null!"); Assert.notNull(destination, "Destination key must not be null!"); if (op == BitOperation.NOT && keys.length > 1) { throw new UnsupportedOperationException("Bitop NOT should only be performed against one key"); } try { if (isPipelined()) { pipeline(connection .newJedisResult(connection.getRequiredPipeline().bitop(JedisConverters.toBitOp(op), destination, keys))); return null; } if (isQueueing()) { transaction(connection .newJedisResult(connection.getRequiredTransaction().bitop(JedisConverters.toBitOp(op), destination, keys))); return null; } return connection.getJedis().bitop(JedisConverters.toBitOp(op), destination, keys); } catch (Exception ex) { throw convertJedisAccessException(ex); } }