@Override protected ScanIteration<byte[]> doScan(byte[] key, long cursorId, ScanOptions options) { if (isQueueing() || isPipelined()) { throw new UnsupportedOperationException("'SSCAN' cannot be called in pipeline / transaction mode."); } io.lettuce.core.ScanCursor scanCursor = connection.getScanCursor(cursorId); ScanArgs scanArgs = LettuceConverters.toScanArgs(options); ValueScanCursor<byte[]> valueScanCursor = getConnection().sscan(key, scanCursor, scanArgs); String nextCursorId = valueScanCursor.getCursor(); List<byte[]> values = connection.failsafeReadScanValues(valueScanCursor.getValues(), null); return new ScanIteration<>(Long.valueOf(nextCursorId), values); }
@Override protected ScanIteration<Tuple> doScan(byte[] key, long cursorId, ScanOptions options) { if (isQueueing() || isPipelined()) { throw new UnsupportedOperationException("'ZSCAN' cannot be called in pipeline / transaction mode."); } io.lettuce.core.ScanCursor scanCursor = connection.getScanCursor(cursorId); ScanArgs scanArgs = LettuceConverters.toScanArgs(options); ScoredValueScanCursor<byte[]> scoredValueScanCursor = getConnection().zscan(key, scanCursor, scanArgs); String nextCursorId = scoredValueScanCursor.getCursor(); List<ScoredValue<byte[]>> result = scoredValueScanCursor.getValues(); List<Tuple> values = connection.failsafeReadScanValues(result, LettuceConverters.scoredValuesToTupleList()); return new ScanIteration<>(Long.valueOf(nextCursorId), values); }
@Override protected ScanIteration<byte[]> doScan(byte[] key, long cursorId, ScanOptions options) { if (isQueueing() || isPipelined()) { throw new UnsupportedOperationException("'SSCAN' cannot be called in pipeline / transaction mode."); } io.lettuce.core.ScanCursor scanCursor = connection.getScanCursor(cursorId); ScanArgs scanArgs = LettuceConverters.toScanArgs(options); ValueScanCursor<byte[]> valueScanCursor = getConnection().sscan(key, scanCursor, scanArgs); String nextCursorId = valueScanCursor.getCursor(); List<byte[]> values = connection.failsafeReadScanValues(valueScanCursor.getValues(), null); return new ScanIteration<>(Long.valueOf(nextCursorId), values); }
@Override protected ScanIteration<byte[]> doScan(byte[] key, long cursorId, ScanOptions options) { if (isQueueing() || isPipelined()) { throw new UnsupportedOperationException("'SSCAN' cannot be called in pipeline / transaction mode."); } io.lettuce.core.ScanCursor scanCursor = connection.getScanCursor(cursorId); ScanArgs scanArgs = LettuceConverters.toScanArgs(options); ValueScanCursor<byte[]> valueScanCursor = getConnection().sscan(key, scanCursor, scanArgs); String nextCursorId = valueScanCursor.getCursor(); List<byte[]> values = connection.failsafeReadScanValues(valueScanCursor.getValues(), null); return new ScanIteration<>(Long.valueOf(nextCursorId), values); }
@Override protected ScanIteration<Tuple> doScan(byte[] key, long cursorId, ScanOptions options) { if (isQueueing() || isPipelined()) { throw new UnsupportedOperationException("'ZSCAN' cannot be called in pipeline / transaction mode."); } io.lettuce.core.ScanCursor scanCursor = connection.getScanCursor(cursorId); ScanArgs scanArgs = LettuceConverters.toScanArgs(options); ScoredValueScanCursor<byte[]> scoredValueScanCursor = getConnection().zscan(key, scanCursor, scanArgs); String nextCursorId = scoredValueScanCursor.getCursor(); List<ScoredValue<byte[]>> result = scoredValueScanCursor.getValues(); List<Tuple> values = connection.failsafeReadScanValues(result, LettuceConverters.scoredValuesToTupleList()); return new ScanIteration<>(Long.valueOf(nextCursorId), values); }
@Override protected ScanIteration<Tuple> doScan(byte[] key, long cursorId, ScanOptions options) { if (isQueueing() || isPipelined()) { throw new UnsupportedOperationException("'ZSCAN' cannot be called in pipeline / transaction mode."); } io.lettuce.core.ScanCursor scanCursor = connection.getScanCursor(cursorId); ScanArgs scanArgs = LettuceConverters.toScanArgs(options); ScoredValueScanCursor<byte[]> scoredValueScanCursor = getConnection().zscan(key, scanCursor, scanArgs); String nextCursorId = scoredValueScanCursor.getCursor(); List<ScoredValue<byte[]>> result = scoredValueScanCursor.getValues(); List<Tuple> values = connection.failsafeReadScanValues(result, LettuceConverters.scoredValuesToTupleList()); return new ScanIteration<>(Long.valueOf(nextCursorId), values); }