public abstract class ScanStream extends Object
Flux.
ScanStream uses reactive command interfaces to scan over keys (SCAN), sets (SSCAN), sorted sets (
ZSCAN), and hashes (HSCAN).
Use ScanArgs.limit(long) to set the batch size.
Data structure scanning is progressive and stateful and demand-aware. It supports full iterations (until all received cursors are exhausted) and premature termination. Subsequent scan commands to fetch the cursor data get only issued if the subscriber signals demand.
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Flux<KeyValue<K,V>> |
hscan(RedisHashReactiveCommands<K,V> commands,
K key)
Sequentially iterate over entries in a hash identified by
key. |
static <K,V> Flux<KeyValue<K,V>> |
hscan(RedisHashReactiveCommands<K,V> commands,
K key,
ScanArgs scanArgs)
Sequentially iterate over entries in a hash identified by
key. |
static <K,V> Flux<K> |
scan(RedisKeyReactiveCommands<K,V> commands)
Sequentially iterate over keys in the keyspace.
|
static <K,V> Flux<K> |
scan(RedisKeyReactiveCommands<K,V> commands,
ScanArgs scanArgs)
Sequentially iterate over keys in the keyspace.
|
static <K,V> Flux<V> |
sscan(RedisSetReactiveCommands<K,V> commands,
K key)
Sequentially iterate over elements in a set identified by
key. |
static <K,V> Flux<V> |
sscan(RedisSetReactiveCommands<K,V> commands,
K key,
ScanArgs scanArgs)
Sequentially iterate over elements in a set identified by
key. |
static <K,V> Flux<ScoredValue<V>> |
zscan(RedisSortedSetReactiveCommands<K,V> commands,
K key)
Sequentially iterate over elements in a set identified by
key. |
static <K,V> Flux<ScoredValue<V>> |
zscan(RedisSortedSetReactiveCommands<K,V> commands,
K key,
ScanArgs scanArgs)
Sequentially iterate over elements in a set identified by
key. |
public static <K,V> Flux<K> scan(RedisKeyReactiveCommands<K,V> commands)
SCAN to perform an iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.Flux.public static <K,V> Flux<K> scan(RedisKeyReactiveCommands<K,V> commands, ScanArgs scanArgs)
SCAN to perform an iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.scanArgs - the scan arguments, must not be null.Flux.public static <K,V> Flux<KeyValue<K,V>> hscan(RedisHashReactiveCommands<K,V> commands, K key)
key. This method uses HSCAN to perform an
iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.key - the hash to scan.Flux.public static <K,V> Flux<KeyValue<K,V>> hscan(RedisHashReactiveCommands<K,V> commands, K key, ScanArgs scanArgs)
key. This method uses HSCAN to perform an
iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.key - the hash to scan.scanArgs - the scan arguments, must not be null.Flux.public static <K,V> Flux<V> sscan(RedisSetReactiveCommands<K,V> commands, K key)
key. This method uses SSCAN to perform an
iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.key - the set to scan.Flux.public static <K,V> Flux<V> sscan(RedisSetReactiveCommands<K,V> commands, K key, ScanArgs scanArgs)
key. This method uses SSCAN to perform an
iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.key - the set to scan.scanArgs - the scan arguments, must not be null.Flux.public static <K,V> Flux<ScoredValue<V>> zscan(RedisSortedSetReactiveCommands<K,V> commands, K key)
key. This method uses SSCAN to perform an
iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.key - the sorted set to scan.Flux.public static <K,V> Flux<ScoredValue<V>> zscan(RedisSortedSetReactiveCommands<K,V> commands, K key, ScanArgs scanArgs)
key. This method uses SSCAN to perform an
iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.key - the sorted set to scan.scanArgs - the scan arguments, must not be null.Flux.Copyright © 2021 lettuce.io. All rights reserved.