Java Code Examples for redis.clients.jedis.Client#LIST_POSITION
The following examples show how to use
redis.clients.jedis.Client#LIST_POSITION .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RedisList.java From litchi with Apache License 2.0 | 5 votes |
/** * 在列表的元素前或者后插入元素 * @param key * @param where * @param pivot * @param value * @return */ public Long insert(String key, Client.LIST_POSITION where, String pivot, String value) { try { return jedis.linsert(key, where, pivot, value); } catch (Exception e) { LOGGER.error("", e); } finally { if (autoClose) { close(); } } return -1L; }
Example 2
Source File: EnhancedJedisCluster.java From super-cloudops with Apache License 2.0 | 5 votes |
@Override public Long linsert(final byte[] key, final Client.LIST_POSITION where, final byte[] pivot, final byte[] value) { checkArgumentsSpecification(key); return new EnhancedJedisClusterCommand<Long>(connectionHandler, maxAttempts) { @Override public Long doExecute(Jedis connection) { return connection.linsert(key, where, pivot, value); } }.runBinary(key); }