public abstract class BatchStrategies extends Object
Modifier and Type | Method and Description |
---|---|
static BatchStrategy |
keys()
|
static BatchStrategy |
scan(int batchSize)
A
BatchStrategy using a SCAN cursors and potentially multiple DEL commands to remove all
matching keys. |
public static BatchStrategy keys()
BatchStrategy
using a single KEYS
and DEL
command to remove all matching keys.
KEYS
scans the entire keyspace of the Redis database and can block the Redis worker thread for a long time
on large keyspaces.
KEYS
is supported for standalone and clustered (sharded) Redis operation modes.
KEYS
.public static BatchStrategy scan(int batchSize)
BatchStrategy
using a SCAN
cursors and potentially multiple DEL
commands to remove all
matching keys. This strategy allows a configurable batch size to optimize for scan batching.
Note that using the SCAN
strategy might be not supported on all drivers and Redis operation modes.
SCAN
.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.