@Override public void pipelineCommand(Pipeline pipeline, List<String> pipelineKeys) { for (String key : pipelineKeys) { Map<String,String> map = keyValueMap.get(key); pipeline.hmset(key, map); } }
@Override public void hMSet(byte[] key, Map<byte[], byte[]> hashes) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(hashes, "Hashes must not be null!"); try { if (isPipelined()) { pipeline(connection.newStatusResult(connection.getRequiredPipeline().hmset(key, hashes))); return; } if (isQueueing()) { transaction(connection.newStatusResult(connection.getRequiredTransaction().hmset(key, hashes))); return; } connection.getJedis().hmset(key, hashes); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Response<String> hmset(byte[] key, Map<byte[], byte[]> hash) { String command = "hmset"; return instrumented(command, () -> delegated.hmset(key, hash)); }
@Override public Response<String> hmset(String key, Map<String, String> hash) { String command = "hmset"; return instrumented(command, () -> delegated.hmset(key, hash)); }
@Override Response<String> execute(Pipeline jedisPipeline) throws DynoException { long startTime = System.nanoTime() / 1000; try { return jedisPipeline.hmset(key, hash); } finally { long duration = System.nanoTime() / 1000 - startTime; opMonitor.recordSendLatency(OpName.HMSET.name(), duration, TimeUnit.MICROSECONDS); } } }.execute(key, OpName.HMSET);
@Override Response<String> execute(Pipeline jedisPipeline) throws DynoException { long startTime = System.nanoTime() / 1000; try { return jedisPipeline.hmset(key, hash); } finally { long duration = System.nanoTime() / 1000 - startTime; opMonitor.recordSendLatency(OpName.HMSET.name(), duration, TimeUnit.MICROSECONDS); } } }.execute(key, OpName.HMSET);
data.clear(); data.put("k_"+i, "v_"+i); pipeline.hmset("k_"+i,data);
@Override String execute() { Pipeline pipeline = jedis.getShard(key).pipelined(); Response<String> result = pipeline.hmset(key, hash); pipeline.expire(key, expire); pipeline.sync(); return result.get(); } }.getResult();
pipeline.hmset(userResourceKey, redisValue);
pipeline.hmset(userResourceKey, redisValue);
@Override public void hMSet(byte[] key, Map<byte[], byte[]> hashes) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(hashes, "Hashes must not be null!"); try { if (isPipelined()) { pipeline(connection.newStatusResult(connection.getRequiredPipeline().hmset(key, hashes))); return; } if (isQueueing()) { transaction(connection.newStatusResult(connection.getRequiredTransaction().hmset(key, hashes))); return; } connection.getJedis().hmset(key, hashes); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public void hMSet(byte[] key, Map<byte[], byte[]> hashes) { Assert.notNull(key, "Key must not be null!"); Assert.notNull(hashes, "Hashes must not be null!"); try { if (isPipelined()) { pipeline(connection.newStatusResult(connection.getRequiredPipeline().hmset(key, hashes))); return; } if (isQueueing()) { transaction(connection.newStatusResult(connection.getRequiredTransaction().hmset(key, hashes))); return; } connection.getJedis().hmset(key, hashes); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
((Pipeline) connection).hmset(getEncodedBytes(hashKey), wrapper.getColumns());
((Pipeline) connection).hmset(getEncodedBytes(hashKey), wrapper.getColumns());