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

x33g5p2x  于2022-01-21 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(162)

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

Jedis.getrange介绍

暂无

代码示例

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

@Override
 public String execute(Jedis connection) {
  return connection.getrange(key, startOffset, endOffset);
 }
}.run(key);

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

public byte[] execute(Jedis connection) {
    return connection.getrange(keyByte, startOffset, endOffset);
  }
}.runBinary(keyByte);

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

@Override
 public byte[] execute(Jedis connection) {
  return connection.getrange(key, startOffset, endOffset);
 }
}.runBinary(key);

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

@Override
public byte[] getrange(byte[] key, long startOffset, long endOffset) {
 Jedis j = getShard(key);
 return j.getrange(key, startOffset, endOffset);
}

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

@Override
public String getrange(String key, long startOffset, long endOffset) {
 Jedis j = getShard(key);
 return j.getrange(key, startOffset, endOffset);
}

代码示例来源:origin: Netflix/conductor

@Override
public String getrange(String key, long startOffset, long endOffset) {
 Jedis jedis = null;
 try {
  jedis = jedisPool.getResource();
  return jedis.getrange(key, startOffset, endOffset);
 } finally {
  if (jedis != null)
   jedis.close();
 }
}

代码示例来源:origin: apache/ignite

/**
 * @throws Exception If failed.
 */
@Test
public void testGetRange() throws Exception {
  try (Jedis jedis = pool.getResource()) {
    Assert.assertEquals("", jedis.getrange("getRangeKeyNonExisting", 0, 0));
    jcache().put("getRangeKey", "This is a string");
    Assert.assertEquals("This", jedis.getrange("getRangeKey", 0, 3));
    Assert.assertEquals("ing", jedis.getrange("getRangeKey", -3, -1));
    Assert.assertEquals("This is a string", jedis.getrange("getRangeKey", 0, -1));
    Assert.assertEquals("string", jedis.getrange("getRangeKey", 10, 100));
    jcache().put("setDataTypeKey", new HashSet<String>(Arrays.asList("1", "2")));
    try {
      jedis.getrange("setDataTypeKey", 0, 1);
      assert false : "Exception has to be thrown!";
    }
    catch (JedisDataException e) {
      assertTrue(e.getMessage().startsWith("WRONGTYPE"));
    }
  }
}

代码示例来源:origin: io.leopard/leopard-redis

@Override
  public Object execute(Jedis jedis) {
    return jedis.getrange(key, startOffset, endOffset);
  }
});

代码示例来源:origin: io.leopard/leopard-redis

@Override
public String getrange(String key, long startOffset, long endOffset) {
  return jedis.getrange(key, startOffset, endOffset);
}

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

@Override
 public byte[] execute(Jedis connection) {
  return connection.getrange(key, startOffset, endOffset);
 }
}.runBinary(key);

代码示例来源:origin: yrain/smart-cache

@Override
  String doInJedis(Jedis jedis) {
    return jedis.getrange(key, startOffset, endOffset);
  }
});

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

@Override
 public String execute(Jedis connection) {
  return connection.getrange(key, startOffset, endOffset);
 }
}.run(key);

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

@Override
public String getrange(final String key, final long startOffset, final long endOffset) {
 Jedis j = getShard(key);
 return j.getrange(key, startOffset, endOffset);
}

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

@Override
public byte[] getrange(byte[] key, long startOffset, long endOffset) {
 String command = "getrange";
 return instrumented(command, () -> delegated.getrange(key, startOffset, endOffset));
}

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

@Override
public String getrange(String key, long startOffset, long endOffset) {
 String command = "getrange";
 return instrumented(command, () -> delegated.getrange(key, startOffset, endOffset));
}

代码示例来源:origin: org.tinygroup/org.tinygroup.jedis

public String getrange(String key, long startOffset, long endOffset) {
  Jedis j = getReadShard(key);
  return j.getrange(key, startOffset, endOffset);
}

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

@Override
public byte[] getrange(final byte[] key, final long startOffset, final long endOffset) {
 Jedis j = getShard(key);
 return j.getrange(key, startOffset, endOffset);
}

代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence

@Override
public String getrange(String key, long startOffset, long endOffset) {
 Jedis jedis = null;
 try {
  jedis = jedisPool.getResource();
  return jedis.getrange(key, startOffset, endOffset);
 } finally {
  if (jedis != null)
   jedis.close();
 }
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public byte[] getrange(byte[] key, long startOffset, long endOffset) {
  Jedis jedis = getJedis();
  try {
    return jedis.getrange(key, startOffset, endOffset);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public String getrange(String key, long startOffset, long endOffset) {
  Jedis jedis = getJedis();
  try {
    return jedis.getrange(key, startOffset, endOffset);
  } finally {Streams.safeClose(jedis);}
}

相关文章

Jedis类方法