java.lang.Object
io.lettuce.core.ScanArgs
io.lettuce.core.KeyScanArgs
- All Implemented Interfaces:
CompositeArgument
public class KeyScanArgs extends ScanArgs
Argument list builder for the Redis
SCAN command. Static import the methods from
KeyScanArgs.Builder and chain the method calls: type("string").limit(2).
KeyScanArgs is a mutable object and instances should be used only once to avoid shared mutable state.
- Since:
- 6.1
- Author:
- Mykola Makhin
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKeyScanArgs.Builder -
Constructor Summary
Constructors Constructor Description KeyScanArgs() -
Method Summary
Modifier and Type Method Description <K, V> voidbuild(CommandArgs<K,V> args)Build command arguments and contribute arguments toCommandArgs.KeyScanArgslimit(long count)Limit the scan by countKeyScanArgsmatch(String match)Set the match filter.KeyScanArgsmatch(String match, Charset charset)Set the match filter along the givenCharset.KeyScanArgstype(String type)Return keys only of specified type.
-
Constructor Details
-
KeyScanArgs
public KeyScanArgs()
-
-
Method Details
-
type
Return keys only of specified type.- Parameters:
type- of keys as returned by TYPE command- Returns:
- this
KeyScanArgs.
-
match
Set the match filter. UsesUTF-8to encodematch. -
match
Set the match filter along the givenCharset. -
limit
Limit the scan by count -
build
Description copied from interface:CompositeArgumentBuild command arguments and contribute arguments toCommandArgs.Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.
- Specified by:
buildin interfaceCompositeArgument- Overrides:
buildin classScanArgs- Type Parameters:
K- Key type.V- Value type.- Parameters:
args- the command arguments, must not benull.
-