@Override public void rename(byte[] sourceKey, byte[] targetKey) { Assert.notNull(sourceKey, "Source key must not be null!"); Assert.notNull(targetKey, "Target key must not be null!"); try { if (isPipelined()) { pipeline(connection.newStatusResult(connection.getRequiredPipeline().rename(sourceKey, targetKey))); return; } if (isQueueing()) { transaction(connection.newStatusResult(connection.getRequiredTransaction().rename(sourceKey, targetKey))); return; } connection.getJedis().rename(sourceKey, targetKey); } catch (Exception ex) { throw connection.convertJedisAccessException(ex); } }
@Override Response<String> execute(Pipeline jedisPipeline) throws DynoException { return jedisPipeline.rename(oldkey, newkey); } }.execute(oldkey, OpName.RENAME);
@Override public Response<String> rename(byte[] oldkey, byte[] newkey) { String command = "rename"; return instrumented(command, () -> delegated.rename(oldkey, newkey)); }
@Override public Response<String> rename(String oldkey, String newkey) { String command = "rename"; return instrumented(command, () -> delegated.rename(oldkey, newkey)); }
@Override public void rename(byte[] sourceKey, byte[] targetKey) { Assert.notNull(sourceKey, "Source key must not be null!"); Assert.notNull(targetKey, "Target key must not be null!"); try { if (isPipelined()) { pipeline(connection.newStatusResult(connection.getRequiredPipeline().rename(sourceKey, targetKey))); return; } if (isQueueing()) { transaction(connection.newStatusResult(connection.getRequiredTransaction().rename(sourceKey, targetKey))); return; } connection.getJedis().rename(sourceKey, targetKey); } catch (Exception ex) { throw connection.convertJedisAccessException(ex); } }
@Override public void rename(byte[] sourceKey, byte[] targetKey) { Assert.notNull(sourceKey, "Source key must not be null!"); Assert.notNull(targetKey, "Target key must not be null!"); try { if (isPipelined()) { pipeline(connection.newStatusResult(connection.getRequiredPipeline().rename(sourceKey, targetKey))); return; } if (isQueueing()) { transaction(connection.newStatusResult(connection.getRequiredTransaction().rename(sourceKey, targetKey))); return; } connection.getJedis().rename(sourceKey, targetKey); } catch (Exception ex) { throw connection.convertJedisAccessException(ex); } }