ValkeyClusterClientBase class abstract

The abstract base class for a cluster-aware Valkey client.

This interface automatically routes commands to the correct node based on the key's hash slot.

Implemented types
Implementers

Constructors

ValkeyClusterClientBase()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() Future<void>
Closes all pooled connections to all nodes in the cluster.
connect() Future<void>
Connects to the cluster using the provided initial node(s).
decr(String key) Future<int>
Decrements the number stored at key by one.
inherited
decrBy(String key, int amount) Future<int>
Decrements the number stored at key by amount.
inherited
del(String key) Future<int>
Deletes the specified key.
inherited
echo(String message) Future<String>
Echoes the given message back from the server.
inherited
exists(String key) Future<int>
Checks if key exists.
inherited
expire(String key, int seconds) Future<int>
Sets a timeout on key in seconds.
inherited
get(String key) Future<String?>
Gets the value of key.
inherited
hget(String key, String field) Future<String?>
Gets the value of field in the hash stored at key.
inherited
hgetall(String key) Future<Map<String, String>>
Gets all fields and values of the hash stored at key.
inherited
hset(String key, String field, String value) Future<int>
Sets field in the hash stored at key to value.
inherited
incr(String key) Future<int>
Increments the number stored at key by one.
inherited
incrBy(String key, int amount) Future<int>
Increments the number stored at key by amount.
inherited
lpop(String key) Future<String?>
Removes and returns the first element of the list stored at key.
inherited
lpush(String key, String value) Future<int>
Prepends value to the list stored at key.
inherited
lrange(String key, int start, int stop) Future<List<String?>>
Returns the specified elements of the list stored at key.
inherited
mget(List<String> keys) Future<List<String?>>
Gets the values of all specified keys.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pingAll([String? message]) Future<Map<String, String>>
PINGs all master nodes in the cluster.
rpop(String key) Future<String?>
Removes and returns the last element of the list stored at key.
inherited
rpush(String key, String value) Future<int>
Appends value to the list stored at key.
inherited
sadd(String key, String member) Future<int>
Adds member to the set stored at key.
inherited
set(String key, String value) Future<String>
Sets key to value.
inherited
smembers(String key) Future<List<String?>>
Returns all members of the set stored at key.
inherited
spublish(String channel, String message) Future<int>
Posts a message to the given channel using Sharded Pub/Sub. Returns the number of clients that received the message. Note: In Cluster mode, this command is routed to the specific node that owns the slot for channel.
inherited
srem(String key, String member) Future<int>
Removes member from the set stored at key.
inherited
ssubscribe(List<String> channels) Subscription
Subscribes the client to the specified channels using Sharded Pub/Sub.
inherited
sunsubscribe([List<String> channels = const []]) Future<void>
Unsubscribes from the given channels using Sharded Pub/Sub.
inherited
toString() String
A string representation of this object.
inherited
ttl(String key) Future<int>
Gets the remaining time to live of a key in seconds.
inherited
zadd(String key, double score, String member) Future<int>
Adds member with the specified score to the sorted set stored at key.
inherited
zrange(String key, int start, int stop) Future<List<String?>>
Returns the specified range of members in the sorted set stored at key, ordered from lowest to highest score.
inherited
zrem(String key, String member) Future<int>
Removes member from the sorted set stored at key.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited