@Override public Long hDel(byte[] key, byte[]... fields) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(fields, "Fields must not be null!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().hdel(key, fields))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().hdel(key, fields))); return null; } return connection.getJedis().hdel(key, fields); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
private void hdel0(String key, String... fields) { t.hdel(key, fields); }
@Override public void hdel(byte[] key, byte[]... fields) { t.hdel(key, fields); }
((Transaction) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), relation);
((Transaction) connection).hdel(getEncodedBytes(rowKey), column); // delete
((Transaction) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), PropertyAccessorFactory.STRING.fromBytes(String.class, name));
@Override public void removeStage(@Nonnull Execution execution, @Nonnull String stageId) { RedisClientDelegate delegate = getRedisDelegate(execution); String key = executionKey(execution); String indexKey = format("%s:stageIndex", key); List<String> stageKeys = delegate.withCommandsClient(c -> { return c.hkeys(key).stream() .filter(k -> k.startsWith("stage." + stageId)) .collect(Collectors.toList()); }); delegate.withTransaction(tx -> { tx.lrem(indexKey, 0, stageId); tx.hdel(key, stageKeys.toArray(new String[0])); tx.exec(); }); }
private void storeStageInternal(RedisClientDelegate delegate, Stage stage, Boolean updateIndex) { String key = executionKey(stage); String indexKey = format("%s:stageIndex", key); Map<String, String> serializedStage = serializeStage(stage); List<String> keysToRemove = serializedStage.entrySet().stream() .filter(e -> e.getValue() == null) .map(Map.Entry::getKey) .collect(Collectors.toList()); serializedStage.values().removeIf(Objects::isNull); delegate.withTransaction(tx -> { tx.hmset(key, serializedStage); if (!keysToRemove.isEmpty()) { tx.hdel(key, keysToRemove.toArray(new String[0])); } if (updateIndex) { BinaryClient.LIST_POSITION pos = stage.getSyntheticStageOwner() == STAGE_BEFORE ? BEFORE : AFTER; tx.linsert(indexKey, pos, stage.getParentStageId(), stage.getId()); } tx.exec(); }); }
public static void doRemoveRecurringEnqueue(final Jedis jedis, final String namespace, final String queue, final String jobJson) { final String queueKey = JesqueUtils.createKey(namespace, QUEUE, queue); final String hashKey = JesqueUtils.createRecurringHashKey(queueKey); if (JedisUtils.canUseAsRecurringQueue(jedis, queueKey, hashKey)) { Transaction transaction = jedis.multi(); transaction.hdel(hashKey, jobJson); transaction.zrem(queueKey, jobJson); if (transaction.exec() == null) { throw new RuntimeException("cannot remove " + jobJson + " from recurring queue " + queue); } } else { throw new IllegalArgumentException(queue + " cannot be used as a recurring queue"); } }
@Override public Long hDel(byte[] key, byte[]... fields) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(fields, "Fields must not be null!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().hdel(key, fields))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().hdel(key, fields))); return null; } return connection.getJedis().hdel(key, fields); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long hDel(byte[] key, byte[]... fields) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(fields, "Fields must not be null!"); try { if (isPipelined()) { pipeline(connection.newJedisResult(connection.getRequiredPipeline().hdel(key, fields))); return null; } if (isQueueing()) { transaction(connection.newJedisResult(connection.getRequiredTransaction().hdel(key, fields))); return null; } return connection.getJedis().hdel(key, fields); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
((Transaction) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), relation);
tr.hdel(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE); } else { tr.hset(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE, state.name());
tr.hdel(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE); } else { tr.hset(queueUrl + "-" + shard + "-" + CQSConstants.REDIS_STATE, CQSConstants.REDIS_STATE, state.name());
tx.hdel(key, "config"); tx.hmset(key, filterValues(map, Objects::nonNull)); if (!execution.getStages().isEmpty()) {
((Transaction) connection).hdel(getEncodedBytes(rowKey), column); // delete
((Transaction) connection).hdel(getHashKey(entityMetadata.getTableName(), rowKey), PropertyAccessorFactory.STRING.fromBytes(String.class, name));