@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 { return connection.getCluster().lpushx(key, value); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
public Long lpushx(String key, String... string) { return jedisCluster.lpushx(key, string); }
/** * 将值 value 插入到列表 key 的表头 * @param key * @param value * @return 列表长度 */ public long lpushx(String key,String value){ return jedisCluster.lpushx(key, value); } /**
@Override public Long lpushx(byte[] bytes, byte[]... bytes1) { return cluster.lpushx(bytes, bytes1); }
public Long lpushx(byte[] key, byte[]... string) { return jedisCluster.lpushx(key, string); }
@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 { return connection.getCluster().lpushx(key, value); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@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 { return connection.getCluster().lpushx(key, value); } catch (Exception ex) { throw convertJedisAccessException(ex); } }
@Override public Long lpushx(String key, String... values) { return jedisCluster.lpushx(SafeEncoder.encode(key), SafeEncoder.encodeMany(values)); }
@Override public <T> Long lpushx(Class<T> clazz, String key, T... values) { try { byte[][] bytes = new byte[values.length][]; for (int i = 0; i < values.length; i++) { bytes[i] = getRedisBuffer().write(values[i]); } return jedisCluster.lpushx(SafeEncoder.encode(key), bytes); } catch (IOException e) { logger.error(e.getMessage(), e); return 0l; } }