Package io.lettuce.core
Class MigrateArgs<K>
- java.lang.Object
-
- io.lettuce.core.MigrateArgs<K>
-
- All Implemented Interfaces:
CompositeArgument
public class MigrateArgs<K> extends Object implements CompositeArgument
Argument list builder for the Redis MIGRATE command. Static import the methods fromMigrateArgs.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.- Author:
- Mark Paluch, dengliming
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MigrateArgs.Builder
Builder entry points forMigrateArgs
.
-
Constructor Summary
Constructors Constructor Description MigrateArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MigrateArgs<K>
auth(char[] password)
Set AUTHpassword
option.MigrateArgs<K>
auth(CharSequence password)
Set AUTHpassword
option.MigrateArgs<K>
auth2(CharSequence username, CharSequence password)
Set AUTH2username
andpassword
option.<K,V>
voidbuild(CommandArgs<K,V> args)
Build command arguments and contribute arguments toCommandArgs
.MigrateArgs<K>
copy()
Do not remove the key from the local instance by settingCOPY
.MigrateArgs<K>
key(K key)
Migrate a singlekey
.MigrateArgs<K>
keys(Iterable<K> keys)
Migrate one or morekeys
.MigrateArgs<K>
keys(K... keys)
Migrate one or morekeys
.MigrateArgs<K>
replace()
Replace existing key on the remote instance by settingREPLACE
.
-
-
-
Method Detail
-
copy
public MigrateArgs<K> copy()
Do not remove the key from the local instance by settingCOPY
.- Returns:
this
MigrateArgs
.
-
replace
public MigrateArgs<K> replace()
Replace existing key on the remote instance by settingREPLACE
.- Returns:
this
MigrateArgs
.
-
key
public MigrateArgs<K> key(K key)
Migrate a singlekey
.- Parameters:
key
- must not benull
.- Returns:
this
MigrateArgs
.
-
keys
@SafeVarargs public final MigrateArgs<K> keys(K... keys)
Migrate one or morekeys
.- Parameters:
keys
- must not benull
.- Returns:
this
MigrateArgs
.
-
keys
public MigrateArgs<K> keys(Iterable<K> keys)
Migrate one or morekeys
.- Parameters:
keys
- must not benull
.- Returns:
this
MigrateArgs
.
-
auth
public MigrateArgs<K> auth(CharSequence password)
Set AUTHpassword
option.- Parameters:
password
- must not benull
.- Returns:
this
MigrateArgs
.- Since:
- 4.4.5
-
auth2
public MigrateArgs<K> auth2(CharSequence username, CharSequence password)
Set AUTH2username
andpassword
option.- Parameters:
username
- must not benull
.password
- must not benull
.- Returns:
this
MigrateArgs
.- Since:
- 6.1
-
auth
public MigrateArgs<K> auth(char[] password)
Set AUTHpassword
option.- Parameters:
password
- must not benull
.- Returns:
this
MigrateArgs
.- Since:
- 4.4.5
-
build
public <K,V> void build(CommandArgs<K,V> args)
Description copied from interface:CompositeArgument
Build 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:
build
in interfaceCompositeArgument
- Type Parameters:
K
- Key type.V
- Value type.- Parameters:
args
- the command arguments, must not benull
.
-
-