本文整理了Java中redis.clients.jedis.Jedis.lpushx()
方法的一些代码示例,展示了Jedis.lpushx()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.lpushx()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:lpushx
暂无
代码示例来源:origin: sohutv/cachecloud
@Override
public Long execute(Jedis connection) {
return connection.lpushx(key, string);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Long execute(Jedis connection) {
return connection.lpushx(key, arg);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
public Long execute(Jedis connection) {
return connection.lpushx(keyByte, string);
}
}.runBinary(keyByte);
代码示例来源:origin: sohutv/cachecloud
@Override
public Long lpushx(String key, String... string) {
Jedis j = getShard(key);
return j.lpushx(key, string);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Long lpushx(byte[] key, byte[]... string) {
Jedis j = getShard(key);
return j.lpushx(key, string);
}
代码示例来源:origin: Netflix/conductor
@Override
public Long lpushx(String key, String... string) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.lpushx(key, string);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: caoxinyu/RedisClient
@Override
protected void command() {
jedis.select(db);
if (jedis.exists(key) && getValueType(key) != NodeType.LIST)
throw new RuntimeException(RedisClient.i18nFile.getText(I18nFile.LISTEXIST) + key);
beforeAdd();
for (String value : values) {
if (headTail && exist)
jedis.rpush(key, value);
else if (headTail && !exist)
jedis.rpushx(key, value);
else if (!headTail && exist)
jedis.lpush(key, value);
else
jedis.lpushx(key, value);
}
afterAdd();
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Long lPushX(byte[] key, byte[] value) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(value, "Value must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newJedisResult(connection.getRequiredPipeline().lpushx(key, value)));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().lpushx(key, value)));
return null;
}
return connection.getJedis().lpushx(key, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long execute(Jedis connection) {
return connection.lpushx(key, string);
}
}.run(key);
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.lpushx(key, string);
}
});
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.lpushx(key, string);
}
});
代码示例来源:origin: mindwind/craft-atom
private Long lpushx0(Jedis j, String key, String value) {
return j.lpushx(key, value);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long lpushx(final byte[] key, final byte[]... string) {
Jedis j = getShard(key);
return j.lpushx(key, string);
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public Long lpushx(String key, String... string) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.lpushx(key, string);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
public Long execute(final Jedis conn) throws Exception {
return conn.lpushx(SafeEncoder.encode(key), SafeEncoder.encodeMany(values));
}
});
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Long lpushx(String key, String... string) {
String command = "lpushx";
return instrumented(command, payloadSize(string), () -> delegated.lpushx(key, string));
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long lpushx(byte[] key, byte[]... string) {
Jedis jedis = getJedis();
try {
return jedis.lpushx(key, string);
} finally {Streams.safeClose(jedis);}
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long lpushx(String key, String... string) {
Jedis jedis = getJedis();
try {
return jedis.lpushx(key, string);
} finally {Streams.safeClose(jedis);}
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Long lpushx(byte[] key, byte[]... string) {
String command = "lpushx";
return instrumented(command, payloadSize(string), () -> delegated.lpushx(key, string));
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
public Long execute(final Jedis conn) throws Exception {
byte[][] bytes = new byte[values.length][];
for (int i = 0; i < values.length; i++) {
bytes[i] = getRedisBuffer().write(values[i]);
}
return conn.lpushx(SafeEncoder.encode(key), bytes);
}
});
内容来源于网络,如有侵权,请联系作者删除!