java.lang.Object
io.lettuce.core.AclSetuserArgs
- All Implemented Interfaces:
CompositeArgument
public class AclSetuserArgs extends Object implements CompositeArgument
Argument list builder for the Redis ACL SETUSER command.
AclSetuserArgs is a mutable object and instances should be used only once to avoid shared mutable state.
- Since:
- 6.1
- Author:
- Mikhael Sokolov
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAclSetuserArgs.BuilderBuilder entry points forAclSetuserArgs. -
Constructor Summary
Constructors Constructor Description AclSetuserArgs() -
Method Summary
Modifier and Type Method Description AclSetuserArgsaddCategory(AclCategory category)Adds all the commands in the specified category to the list of commands the user is able to execute.AclSetuserArgsaddCommand(CommandType command)Adds this command to the list of the commands the user can call.AclSetuserArgsaddCommand(CommandType command, ProtocolKeyword subCommand)Adds all the commands there are in the server.AclSetuserArgsaddHashedPassword(String hashedPassword)Adds the specified hashed password to the list of user passwords.AclSetuserArgsaddPassword(String password)Adds the specified clear text password as an hashed password in the list of the users passwords.AclSetuserArgsallChannels()Allows the user to access all the Pub/Sub channels.AclSetuserArgsallCommands()Adds all the commands there are in the server.AclSetuserArgsallKeys()Allows the user to access all the keys.<K, V> voidbuild(CommandArgs<K,V> args)Build command arguments and contribute arguments toCommandArgs.AclSetuserArgschannelPattern(String channelPattern)Adds accessible channel pattern.AclSetuserArgskeyPattern(String keyPattern)Adds accessible key pattern.AclSetuserArgsnoCommands()Removes all the commands the user can execute.AclSetuserArgsnopass()Sets the user as a "no password".AclSetuserArgsoff()Set user inactive.AclSetuserArgson()Set user active.AclSetuserArgsremoveCategory(AclCategory category)Removes all the commands in the specified category to the list of commands the user is able to execute.AclSetuserArgsremoveCommand(CommandType command)Removes this command to the list of the commands the user can call.AclSetuserArgsremoveCommand(CommandType command, ProtocolKeyword subCommand)Removes the specified command to the list of the commands the user can execute.AclSetuserArgsremoveHashedPassword(String hashedPassword)Removes the specified hashed password to the list of user passwords.AclSetuserArgsremovePassword(String password)Removes the specified clear text password as an hashed password in the list of the users passwords.AclSetuserArgsreset()Removes any capability from the user.AclSetuserArgsresetChannels()Removes all channel patterns from the list of Pub/Sub channel patterns the user can access.AclSetuserArgsresetKeys()Removes all the key patterns from the list of key patterns the user can access.
-
Constructor Details
-
AclSetuserArgs
public AclSetuserArgs()
-
-
Method Details
-
on
Set user active.- Returns:
this
-
off
Set user inactive.- Returns:
this
-
keyPattern
Adds accessible key pattern.- Parameters:
keyPattern- accessible key pattern- Returns:
this
-
allKeys
Allows the user to access all the keys.- Returns:
this
-
resetKeys
Removes all the key patterns from the list of key patterns the user can access.- Returns:
this
-
channelPattern
Adds accessible channel pattern.- Parameters:
channelPattern- accessible channel pattern- Returns:
this
-
allChannels
Allows the user to access all the Pub/Sub channels.- Returns:
this
-
resetChannels
Removes all channel patterns from the list of Pub/Sub channel patterns the user can access.- Returns:
this
-
addCommand
Adds this command to the list of the commands the user can call.- Parameters:
command- accessible command- Returns:
this
-
addCommand
Adds all the commands there are in the server.- Returns:
this
-
allCommands
Adds all the commands there are in the server.- Returns:
this
-
removeCommand
Removes this command to the list of the commands the user can call.- Parameters:
command- inaccessible command- Returns:
this
-
removeCommand
Removes the specified command to the list of the commands the user can execute.- Parameters:
command- inaccessible commandsubCommand- inaccessible subcommand- Returns:
this
-
noCommands
Removes all the commands the user can execute.- Returns:
this
-
addCategory
Adds all the commands in the specified category to the list of commands the user is able to execute.- Parameters:
category- specified category- Returns:
this
-
removeCategory
Removes all the commands in the specified category to the list of commands the user is able to execute.- Parameters:
category- specified category- Returns:
this
-
nopass
Sets the user as a "no password".- Returns:
this
-
addPassword
Adds the specified clear text password as an hashed password in the list of the users passwords.- Parameters:
password- clear text password- Returns:
this
-
addHashedPassword
Adds the specified hashed password to the list of user passwords.- Parameters:
hashedPassword- hashed password- Returns:
this
-
removePassword
Removes the specified clear text password as an hashed password in the list of the users passwords.- Parameters:
password- clear text password- Returns:
this
-
removeHashedPassword
Removes the specified hashed password to the list of user passwords.- Parameters:
hashedPassword- hashed password- Returns:
this
-
reset
Removes any capability from the user.- Returns:
this
-
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.
-