redis.clients.jedis.Pipeline.hmset()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(221)

本文整理了Java中redis.clients.jedis.Pipeline.hmset()方法的一些代码示例,展示了Pipeline.hmset()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Pipeline.hmset()方法的具体详情如下:
包路径:redis.clients.jedis.Pipeline
类名称:Pipeline
方法名:hmset

Pipeline.hmset介绍

暂无

代码示例

代码示例来源:origin: sohutv/cachecloud

@Override
public void pipelineCommand(Pipeline pipeline, List<String> pipelineKeys) {
  for (String key : pipelineKeys) {
    Map<String,String> map = keyValueMap.get(key);
    pipeline.hmset(key, map);
  }
}

代码示例来源:origin: spring-projects/spring-data-redis

@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);
  }
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Response<String> hmset(byte[] key, Map<byte[], byte[]> hash) {
 String command = "hmset";
 return instrumented(command, () -> delegated.hmset(key, hash));
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public Response<String> hmset(String key, Map<String, String> hash) {
 String command = "hmset";
 return instrumented(command, () -> delegated.hmset(key, hash));
}

代码示例来源:origin: com.netflix.dyno/dyno-jedis

@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);

代码示例来源:origin: com.netflix.dyno/dyno-jedis

@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);

代码示例来源:origin: hhfcyong/xxxx-dubbo

data.clear();
data.put("k_"+i, "v_"+i);
pipeline.hmset("k_"+i,data);

代码示例来源:origin: com.github.biezhi/unique-support-redis

@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();

代码示例来源:origin: com.netflix.spinnaker.fiat/fiat-roles

pipeline.hmset(userResourceKey, redisValue);

代码示例来源:origin: spinnaker/fiat

pipeline.hmset(userResourceKey, redisValue);

代码示例来源:origin: apache/servicemix-bundles

@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);
  }
}

代码示例来源:origin: org.springframework.data/spring-data-redis

@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);
  }
}

代码示例来源:origin: Impetus/Kundera

((Pipeline) connection).hmset(getEncodedBytes(hashKey), wrapper.getColumns());

代码示例来源:origin: com.impetus.client/kundera-redis

((Pipeline) connection).hmset(getEncodedBytes(hashKey), wrapper.getColumns());

相关文章

微信公众号

最新文章

更多

Pipeline类方法