Package io.lettuce.core
Class KillArgs
- java.lang.Object
-
- io.lettuce.core.KillArgs
-
- All Implemented Interfaces:
CompositeArgument
public class KillArgs extends Object implements CompositeArgument
Argument list builder for the Redis CLIENT KILL command. Static import the methods fromKillArgs.Builder
and chain the method calls:id(1).skipme()
.KillArgs
is a mutable object and instances should be used only once to avoid shared mutable state.- Since:
- 3.0
- Author:
- Mark Paluch, dengliming
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KillArgs.Builder
Builder entry points forKillArgs
.
-
Constructor Summary
Constructors Constructor Description KillArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KillArgs
addr(String addr)
Kill the client ataddr
(Remote Address).<K,V>
voidbuild(CommandArgs<K,V> args)
Build command arguments and contribute arguments toCommandArgs
.KillArgs
id(long id)
Kill the client with its clientid
.KillArgs
laddr(String laddr)
Kill the client atladdr
(Local Address).KillArgs
skipme()
By default this option is enabled, that is, the client calling the command will not get killed, however setting this option to no will have the effect of also killing the client calling the command.KillArgs
skipme(boolean state)
By default this option is enabled, that is, the client calling the command will not get killed, however setting this option to no will have the effect of also killing the client calling the command.KillArgs
type(io.lettuce.core.KillArgs.Type type)
This closes the connections of all the clients in the specifiedKillArgs.Type
.KillArgs
user(String username)
Closes all the connections that are authenticated with the specified ACLusername
.
-
-
-
Method Detail
-
skipme
public KillArgs skipme()
By default this option is enabled, that is, the client calling the command will not get killed, however setting this option to no will have the effect of also killing the client calling the command.- Returns:
this
MigrateArgs
.
-
skipme
public KillArgs skipme(boolean state)
By default this option is enabled, that is, the client calling the command will not get killed, however setting this option to no will have the effect of also killing the client calling the command.- Parameters:
state
-- Returns:
this
KillArgs
.
-
addr
public KillArgs addr(String addr)
Kill the client ataddr
(Remote Address).- Parameters:
addr
- must not benull
.- Returns:
this
KillArgs
.
-
laddr
public KillArgs laddr(String laddr)
Kill the client atladdr
(Local Address).- Parameters:
laddr
- must not benull
.- Returns:
this
KillArgs
.- Since:
- 6.1
-
id
public KillArgs id(long id)
Kill the client with its clientid
.- Parameters:
id
-- Returns:
this
KillArgs
.
-
type
public KillArgs type(io.lettuce.core.KillArgs.Type type)
This closes the connections of all the clients in the specifiedKillArgs.Type
. Note that clients blocked into the MONITOR command are considered to belong to the normal class.- Parameters:
type
- must not benull
.- Returns:
this
KillArgs
.
-
user
public KillArgs user(String username)
Closes all the connections that are authenticated with the specified ACLusername
.- Parameters:
username
- must not benull
.- Returns:
this
KillArgs
.- Since:
- 6.1
-
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
.
-
-