public class MigrateArgs<K> extends Object implements CompositeArgument
MigrateArgs.Builder
and chain the method calls: copy().auth("foobar")
.
MigrateArgs
is a mutable object and instances should be used only once to avoid shared mutable state.
Modifier and Type | Class and Description |
---|---|
static class |
MigrateArgs.Builder
Builder entry points for
MigrateArgs . |
Constructor and Description |
---|
MigrateArgs() |
Modifier and Type | Method and Description |
---|---|
MigrateArgs<K> |
auth(char[] password)
Set AUTH
password option. |
MigrateArgs<K> |
auth(CharSequence password)
Set AUTH
password option. |
<K,V> void |
build(CommandArgs<K,V> args)
Build command arguments and contribute arguments to
CommandArgs . |
MigrateArgs<K> |
copy()
Do not remove the key from the local instance by setting
COPY . |
MigrateArgs<K> |
key(K key)
Migrate a single
key . |
MigrateArgs<K> |
keys(Iterable<K> keys)
Migrate one or more
keys . |
MigrateArgs<K> |
keys(K... keys)
Migrate one or more
keys . |
MigrateArgs<K> |
replace()
Replace existing key on the remote instance by setting
REPLACE . |
public MigrateArgs<K> copy()
COPY
.this
MigrateArgs
.public MigrateArgs<K> replace()
REPLACE
.this
MigrateArgs
.public MigrateArgs<K> key(K key)
key
.key
- must not be null.this
MigrateArgs
.@SafeVarargs public final MigrateArgs<K> keys(K... keys)
keys
.keys
- must not be null.this
MigrateArgs
.public MigrateArgs<K> keys(Iterable<K> keys)
keys
.keys
- must not be null.this
MigrateArgs
.public MigrateArgs<K> auth(CharSequence password)
password
option.password
- must not be null.this
MigrateArgs
.public MigrateArgs<K> auth(char[] password)
password
option.password
- must not be null.this
MigrateArgs
.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 © 2019 lettuce.io. All rights reserved.