Interface BaseNodeSelectionAsyncCommands<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Known Subinterfaces:
NodeSelectionAsyncCommands<K,V>
public interface BaseNodeSelectionAsyncCommands<K,V>
Asynchronous executed commands on a node selection for basic commands.- Since:
- 4.0
- Author:
- Mark Paluch
- Generated class:
- by io.lettuce.apigenerator.CreateAsyncNodeSelectionClusterApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description <T> AsyncExecutions<T>
dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
Deprecated.since 6.2, asCommandOutput
is being reused for all responses of all nodes and that leads to unwanted behavior.<T> AsyncExecutions<T>
dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
Deprecated.since 6.2, asCommandOutput
is being reused for all responses of all nodes and that leads to unwanted behavior.<T> AsyncExecutions<T>
dispatch(ProtocolKeyword type, Supplier<CommandOutput<K,V,T>> outputSupplier)
Dispatch a command to the Redis Server.<T> AsyncExecutions<T>
dispatch(ProtocolKeyword type, Supplier<CommandOutput<K,V,T>> outputSupplier, CommandArgs<K,V> args)
Dispatch a command to the Redis Server.AsyncExecutions<V>
echo(V msg)
Echo the given string.AsyncExecutions<String>
ping()
Ping the server.AsyncExecutions<Long>
publish(K channel, V message)
Post a message to a channel.AsyncExecutions<List<K>>
pubsubChannels()
Lists the currently *active channels*.AsyncExecutions<List<K>>
pubsubChannels(K channel)
Lists the currently *active channels*.AsyncExecutions<Long>
pubsubNumpat()
Returns the number of subscriptions to patterns.AsyncExecutions<Map<K,Long>>
pubsubNumsub(K... channels)
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.AsyncExecutions<String>
quit()
Instructs Redis to disconnect the connection.AsyncExecutions<List<Object>>
role()
Return the role of the instance in the context of replication.AsyncExecutions<Long>
waitForReplication(int replicas, long timeout)
Wait for replication.
-
-
-
Method Detail
-
publish
AsyncExecutions<Long> publish(K channel, V message)
Post a message to a channel.- Parameters:
channel
- the channel type: key.message
- the message type: value.- Returns:
- Long integer-reply the number of clients that received the message.
-
pubsubChannels
AsyncExecutions<List<K>> pubsubChannels()
Lists the currently *active channels*.- Returns:
- List<K> array-reply a list of active channels, optionally matching the specified pattern.
-
pubsubChannels
AsyncExecutions<List<K>> pubsubChannels(K channel)
Lists the currently *active channels*.- Parameters:
channel
- the key.- Returns:
- List<K> array-reply a list of active channels, optionally matching the specified pattern.
-
pubsubNumsub
AsyncExecutions<Map<K,Long>> pubsubNumsub(K... channels)
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.- Parameters:
channels
- channel keys.- Returns:
- array-reply a list of channels and number of subscribers for every channel.
-
pubsubNumpat
AsyncExecutions<Long> pubsubNumpat()
Returns the number of subscriptions to patterns.- Returns:
- Long integer-reply the number of patterns all the clients are subscribed to.
-
echo
AsyncExecutions<V> echo(V msg)
Echo the given string.- Parameters:
msg
- the message type: value.- Returns:
- V bulk-string-reply.
-
role
AsyncExecutions<List<Object>> role()
Return the role of the instance in the context of replication.- Returns:
- List<Object> array-reply where the first element is one of master, slave, sentinel and the additional elements are role-specific.
-
ping
AsyncExecutions<String> ping()
Ping the server.- Returns:
- String simple-string-reply.
-
quit
AsyncExecutions<String> quit()
Instructs Redis to disconnect the connection. Note that if auto-reconnect is enabled then Lettuce will auto-reconnect if the connection was disconnected. UseStatefulConnection.close()
to close connections and release resources.- Returns:
- String simple-string-reply always OK.
-
waitForReplication
AsyncExecutions<Long> waitForReplication(int replicas, long timeout)
Wait for replication.- Parameters:
replicas
- minimum number of replicas.timeout
- timeout in milliseconds.- Returns:
- number of replicas.
-
dispatch
@Deprecated <T> AsyncExecutions<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output)
Deprecated.since 6.2, asCommandOutput
is being reused for all responses of all nodes and that leads to unwanted behavior. Usedispatch(ProtocolKeyword, Supplier)
instead.Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.output
- the command output, must not benull
.- Returns:
- the command response.
-
dispatch
<T> AsyncExecutions<T> dispatch(ProtocolKeyword type, Supplier<CommandOutput<K,V,T>> outputSupplier)
Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.outputSupplier
- the command output supplier, must not benull
.- Returns:
- the command response.
- Since:
- 6.2
-
dispatch
@Deprecated <T> AsyncExecutions<T> dispatch(ProtocolKeyword type, CommandOutput<K,V,T> output, CommandArgs<K,V> args)
Deprecated.since 6.2, asCommandOutput
is being reused for all responses of all nodes and that leads to unwanted behavior. Usedispatch(ProtocolKeyword, Supplier, CommandArgs)
instead.Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.output
- the command output, must not benull
.args
- the command arguments, must not benull
.- Returns:
- the command response.
-
dispatch
<T> AsyncExecutions<T> dispatch(ProtocolKeyword type, Supplier<CommandOutput<K,V,T>> outputSupplier, CommandArgs<K,V> args)
Dispatch a command to the Redis Server. Please note the command output type must fit to the command response.- Type Parameters:
T
- response type.- Parameters:
type
- the command, must not benull
.outputSupplier
- the command output supplier, must not benull
.args
- the command arguments, must not benull
.- Returns:
- the command response.
- Since:
- 6.2
-
-