public class ScanArgs extends Object implements CompositeArgument
ScanArgs.Builder
and chain the method calls: matches("weight_*").limit(2)
.
ScanArgs
is a mutable object and instances should be used only once to avoid shared mutable state.
Modifier and Type | Class and Description |
---|---|
static class |
ScanArgs.Builder
Builder entry points for
ScanArgs . |
Constructor and Description |
---|
ScanArgs() |
Modifier and Type | Method and Description |
---|---|
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs . |
ScanArgs |
limit(long count)
Limit the scan by count
|
ScanArgs |
match(byte[] match)
Set the match filter.
|
ScanArgs |
match(String match)
Set the match filter.
|
ScanArgs |
match(String match,
Charset charset)
Set the match filter along the given
Charset . |
public ScanArgs match(String match)
UTF-8
to encode match
.match
- the filter, must not be null
.ScanArgs
.public ScanArgs match(String match, Charset charset)
Charset
.match
- the filter, must not be null
.charset
- the charset for match, must not be null
.ScanArgs
.public ScanArgs match(byte[] match)
match
- the filter, must not be null
.ScanArgs
.public ScanArgs limit(long count)
count
- number of elements to scanScanArgs
.public <K,V> void build(CommandArgs<K,V> args)
CompositeArgument
CommandArgs
.
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.
build
in interface CompositeArgument
K
- Key type.V
- Value type.args
- the command arguments, must not be null
.Copyright © 2023 lettuce.io. All rights reserved.