T - Element typepublic abstract class ScanIterator<T> extends Object implements Iterator<T>
Iterator.
ScanIterator uses synchronous command interfaces to scan over keys (SCAN), sets (SSCAN), sorted sets
(ZSCAN), and hashes (HSCAN). A ScanIterator is stateful and not thread-safe. Instances can be used
only once to iterate over results.
| Constructor and Description |
|---|
ScanIterator() |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> ScanIterator<KeyValue<K,V>> |
hscan(RedisHashCommands<K,V> commands,
K key)
Sequentially iterate over entries in a hash identified by
key. |
static <K,V> ScanIterator<KeyValue<K,V>> |
hscan(RedisHashCommands<K,V> commands,
K key,
ScanArgs scanArgs)
Sequentially iterate over entries in a hash identified by
key. |
static <K,V> ScanIterator<K> |
scan(RedisKeyCommands<K,V> commands)
Sequentially iterate over keys in the keyspace.
|
static <K,V> ScanIterator<K> |
scan(RedisKeyCommands<K,V> commands,
ScanArgs scanArgs)
Sequentially iterate over keys in the keyspace.
|
static <K,V> ScanIterator<V> |
sscan(RedisSetCommands<K,V> commands,
K key)
Sequentially iterate over elements in a set identified by
key. |
static <K,V> ScanIterator<V> |
sscan(RedisSetCommands<K,V> commands,
K key,
ScanArgs scanArgs)
Sequentially iterate over elements in a set identified by
key. |
Stream<T> |
stream()
Returns a sequential
Stream with this ScanIterator as its source. |
static <K,V> ScanIterator<ScoredValue<V>> |
zscan(RedisSortedSetCommands<K,V> commands,
K key)
Sequentially iterate over scored values in a sorted set identified by
key. |
static <K,V> ScanIterator<ScoredValue<V>> |
zscan(RedisSortedSetCommands<K,V> commands,
K key,
ScanArgs scanArgs)
Sequentially iterate over scored values in a sorted set identified by
key. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, hasNext, next, removepublic static <K,V> ScanIterator<K> scan(RedisKeyCommands<K,V> commands)
SCAN to perform an iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.ScanIterator.public static <K,V> ScanIterator<K> scan(RedisKeyCommands<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.ScanIterator.public static <K,V> ScanIterator<KeyValue<K,V>> hscan(RedisHashCommands<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.ScanIterator.public static <K,V> ScanIterator<KeyValue<K,V>> hscan(RedisHashCommands<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.scanArgs - the scan arguments, must not be null.ScanIterator.public static <K,V> ScanIterator<V> sscan(RedisSetCommands<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.ScanIterator.public static <K,V> ScanIterator<V> sscan(RedisSetCommands<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.scanArgs - the scan arguments, must not be null.ScanIterator.public static <K,V> ScanIterator<ScoredValue<V>> zscan(RedisSortedSetCommands<K,V> commands, K key)
key. This method uses ZSCAN to
perform an iterative scan.K - Key type.V - Value type.commands - the commands interface, must not be null.ScanIterator.public static <K,V> ScanIterator<ScoredValue<V>> zscan(RedisSortedSetCommands<K,V> commands, K key, ScanArgs scanArgs)
key. This method uses ZSCAN 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.ScanIterator.public Stream<T> stream()
Stream with this ScanIterator as its source.Stream for this ScanIterator.Copyright © 2017 lettuce.io. All rights reserved.