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
from
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.
- Author:
- Mark Paluch, dengliming
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMigrateArgs.BuilderBuilder entry points forMigrateArgs. -
Constructor Summary
Constructors Constructor Description MigrateArgs() -
Method Summary
Modifier and Type Method Description MigrateArgs<K>auth(char[] password)Set AUTHpasswordoption.MigrateArgs<K>auth(CharSequence password)Set AUTHpasswordoption.MigrateArgs<K>auth2(CharSequence username, CharSequence password)Set AUTH2usernameandpasswordoption.<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.
-
Constructor Details
-
MigrateArgs
public MigrateArgs()
-
-
Method Details
-
copy
Do not remove the key from the local instance by settingCOPY.- Returns:
thisMigrateArgs.
-
replace
Replace existing key on the remote instance by settingREPLACE.- Returns:
thisMigrateArgs.
-
key
Migrate a singlekey.- Parameters:
key- must not benull.- Returns:
thisMigrateArgs.
-
keys
Migrate one or morekeys.- Parameters:
keys- must not benull.- Returns:
thisMigrateArgs.
-
keys
Migrate one or morekeys.- Parameters:
keys- must not benull.- Returns:
thisMigrateArgs.
-
auth
Set AUTHpasswordoption.- Parameters:
password- must not benull.- Returns:
thisMigrateArgs.- Since:
- 4.4.5
-
auth2
Set AUTH2usernameandpasswordoption.- Parameters:
username- must not benull.password- must not benull.- Returns:
thisMigrateArgs.- Since:
- 6.1
-
auth
Set AUTHpasswordoption.- Parameters:
password- must not benull.- Returns:
thisMigrateArgs.- Since:
- 4.4.5
-
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- Type Parameters:
K- Key type.V- Value type.- Parameters:
args- the command arguments, must not benull.
-