@Override public void pfMerge(byte[] destinationKey, byte[]... sourceKeys) { Assert.notNull(destinationKey, "Destination key must not be null"); Assert.notNull(sourceKeys, "Source keys must not be null"); Assert.noNullElements(sourceKeys, "Keys for PFMERGE must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfmerge(destinationKey, sourceKeys))); return; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfmerge(destinationKey, sourceKeys))); return; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); connection.pfmerge(destinationKey, sourceKeys); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public Long pfCount(byte[]... keys) { Assert.notEmpty(keys, "PFCOUNT requires at least one non 'null' key."); Assert.noNullElements(keys, "Keys for PFCOUNT must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfcount(keys))); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfcount(keys))); return null; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); return connection.pfcount(keys); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public Long pfAdd(byte[] key, byte[]... values) { Assert.notEmpty(values, "PFADD requires at least one non 'null' value."); Assert.noNullElements(values, "Values for PFADD must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfadd(key, values))); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfadd(key, values))); return null; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); return connection.pfadd(key, values); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public void pfMerge(byte[] destinationKey, byte[]... sourceKeys) { Assert.notNull(destinationKey, "Destination key must not be null"); Assert.notNull(sourceKeys, "Source keys must not be null"); Assert.noNullElements(sourceKeys, "Keys for PFMERGE must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfmerge(destinationKey, sourceKeys))); return; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfmerge(destinationKey, sourceKeys))); return; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); connection.pfmerge(destinationKey, sourceKeys); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public void pfMerge(byte[] destinationKey, byte[]... sourceKeys) { Assert.notNull(destinationKey, "Destination key must not be null"); Assert.notNull(sourceKeys, "Source keys must not be null"); Assert.noNullElements(sourceKeys, "Keys for PFMERGE must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfmerge(destinationKey, sourceKeys))); return; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfmerge(destinationKey, sourceKeys))); return; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); connection.pfmerge(destinationKey, sourceKeys); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public Long pfAdd(byte[] key, byte[]... values) { Assert.notEmpty(values, "PFADD requires at least one non 'null' value."); Assert.noNullElements(values, "Values for PFADD must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfadd(key, values))); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfadd(key, values))); return null; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); return connection.pfadd(key, values); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public Long pfAdd(byte[] key, byte[]... values) { Assert.notEmpty(values, "PFADD requires at least one non 'null' value."); Assert.noNullElements(values, "Values for PFADD must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfadd(key, values))); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfadd(key, values))); return null; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); return connection.pfadd(key, values); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public Long pfCount(byte[]... keys) { Assert.notEmpty(keys, "PFCOUNT requires at least one non 'null' key."); Assert.noNullElements(keys, "Keys for PFCOUNT must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfcount(keys))); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfcount(keys))); return null; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); return connection.pfcount(keys); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }
@Override public Long pfCount(byte[]... keys) { Assert.notEmpty(keys, "PFCOUNT requires at least one non 'null' key."); Assert.noNullElements(keys, "Keys for PFCOUNT must not contain 'null'."); try { if (isPipelined()) { pipeline(connection.newLettuceResult(getAsyncConnection().pfcount(keys))); return null; } if (isQueueing()) { transaction(connection.newLettuceResult(getAsyncConnection().pfcount(keys))); return null; } RedisHLLCommands<byte[], byte[]> connection = getConnection(); return connection.pfcount(keys); } catch (Exception ex) { throw convertLettuceAccessException(ex); } }