Class ValkeyGlideClusterServerCommands
java.lang.Object
io.valkey.springframework.data.valkey.connection.valkeyglide.ValkeyGlideClusterServerCommands
- All Implemented Interfaces:
ValkeyClusterServerCommands,ValkeyServerCommands
Implementation of
ValkeyClusterServerCommands for Valkey-Glide.
Uses the elegant execute(Route, ...) pattern for cluster command routing.- Since:
- 2.0
- Author:
- Ilia Kolominsky
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.valkey.springframework.data.valkey.connection.ValkeyServerCommands
ValkeyServerCommands.FlushOption, ValkeyServerCommands.MigrateOption, ValkeyServerCommands.ShutdownOption -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStart an Append Only File rewrite process on server.voidvoidbgSave()Start background saving of db on server.voidbgSave(ValkeyClusterNode node) dbSize()Get the total number of available keys in currently selected database.dbSize(ValkeyClusterNode node) voidflushAll()Delete all all keys from all databases.voidflushAll(ValkeyClusterNode node) voidflushAll(ValkeyClusterNode node, ValkeyServerCommands.FlushOption option) voidDelete all all keys from all databases using the specifiedValkeyServerCommands.FlushOption.voidflushDb()Delete all keys of the currently selected database.voidflushDb(ValkeyClusterNode node) voidflushDb(ValkeyClusterNode node, ValkeyServerCommands.FlushOption option) voidDelete all keys of the currently selected database using the specifiedValkeyServerCommands.FlushOption.Request information and statistics about connected clients.Returns the name of the current connection.getConfig(ValkeyClusterNode node, String pattern) Load configuration parameters for givenpatternfrom server.info()Load default server information like memory cpu utilization replicationinfo(ValkeyClusterNode node) info(ValkeyClusterNode node, String section) Load server information for givenselection.voidkillClient(String host, int port) Closes a given client connection identified by host:port.lastSave()Get time of lastValkeyServerCommands.bgSave()operation in seconds.lastSave(ValkeyClusterNode node) voidmigrate(byte[] key, ValkeyNode target, int dbIndex, ValkeyServerCommands.MigrateOption option) Atomically transfer a key from a source Valkey instance to a destination Valkey instance.voidmigrate(byte[] key, ValkeyNode target, int dbIndex, ValkeyServerCommands.MigrateOption option, long timeout) Atomically transfer a key from a source Valkey instance to a destination Valkey instance.voidChange valkey replication setting to new master.voidChange server into master.voidReset statistic counters on server.voidvoidRewrites thevalkey.conffile.voidvoidsave()Synchronous save current db snapshot on server.voidsave(ValkeyClusterNode node) voidsetClientName(byte[] name) Assign given name to current connection.voidsetConfig(ValkeyClusterNode node, String param, String value) voidSet server configuration forparamtovalue.voidshutdown()Shutdown server.voidshutdown(ValkeyClusterNode node) voidShutdown server.time(ValkeyClusterNode node, TimeUnit timeUnit) Request server timestamp usingTIMEcommand.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.valkey.springframework.data.valkey.connection.ValkeyClusterServerCommands
timeMethods inherited from interface io.valkey.springframework.data.valkey.connection.ValkeyServerCommands
time
-
Constructor Details
-
ValkeyGlideClusterServerCommands
Create a newValkeyGlideClusterServerCommands.- Parameters:
connection- must not be null.
-
-
Method Details
-
bgReWriteAof
public void bgReWriteAof()Description copied from interface:ValkeyServerCommandsStart an Append Only File rewrite process on server.- Specified by:
bgReWriteAofin interfaceValkeyServerCommands- See Also:
-
bgSave
public void bgSave()Description copied from interface:ValkeyServerCommandsStart background saving of db on server.- Specified by:
bgSavein interfaceValkeyServerCommands- See Also:
-
lastSave
Description copied from interface:ValkeyServerCommandsGet time of lastValkeyServerCommands.bgSave()operation in seconds.- Specified by:
lastSavein interfaceValkeyServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
save
public void save()Description copied from interface:ValkeyServerCommandsSynchronous save current db snapshot on server.- Specified by:
savein interfaceValkeyServerCommands- See Also:
-
dbSize
Description copied from interface:ValkeyServerCommandsGet the total number of available keys in currently selected database.- Specified by:
dbSizein interfaceValkeyServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
flushDb
public void flushDb()Description copied from interface:ValkeyServerCommandsDelete all keys of the currently selected database.- Specified by:
flushDbin interfaceValkeyServerCommands- See Also:
-
flushDb
Description copied from interface:ValkeyServerCommandsDelete all keys of the currently selected database using the specifiedValkeyServerCommands.FlushOption.- Specified by:
flushDbin interfaceValkeyServerCommands- See Also:
-
flushAll
public void flushAll()Description copied from interface:ValkeyServerCommandsDelete all all keys from all databases.- Specified by:
flushAllin interfaceValkeyServerCommands- See Also:
-
flushAll
Description copied from interface:ValkeyServerCommandsDelete all all keys from all databases using the specifiedValkeyServerCommands.FlushOption.- Specified by:
flushAllin interfaceValkeyServerCommands- See Also:
-
info
Description copied from interface:ValkeyServerCommandsLoad default server information like- memory
- cpu utilization
- replication
- Specified by:
infoin interfaceValkeyServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
info
Description copied from interface:ValkeyServerCommandsLoad server information for givenselection.- Specified by:
infoin interfaceValkeyServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
shutdown
public void shutdown()Description copied from interface:ValkeyServerCommandsShutdown server.- Specified by:
shutdownin interfaceValkeyServerCommands- See Also:
-
shutdown
Description copied from interface:ValkeyServerCommandsShutdown server.- Specified by:
shutdownin interfaceValkeyServerCommands- See Also:
-
getConfig
Description copied from interface:ValkeyServerCommandsLoad configuration parameters for givenpatternfrom server.- Specified by:
getConfigin interfaceValkeyServerCommands- Parameters:
pattern- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
setConfig
Description copied from interface:ValkeyServerCommandsSet server configuration forparamtovalue.- Specified by:
setConfigin interfaceValkeyServerCommands- Parameters:
param- must not be null.value- must not be null.- See Also:
-
resetConfigStats
public void resetConfigStats()Description copied from interface:ValkeyServerCommandsReset statistic counters on server.
Counters can be retrieved usingValkeyServerCommands.info().- Specified by:
resetConfigStatsin interfaceValkeyServerCommands- See Also:
-
rewriteConfig
public void rewriteConfig()Description copied from interface:ValkeyServerCommandsRewrites thevalkey.conffile.- Specified by:
rewriteConfigin interfaceValkeyServerCommands- See Also:
-
time
Description copied from interface:ValkeyServerCommandsRequest server timestamp usingTIMEcommand.- Specified by:
timein interfaceValkeyServerCommands- Parameters:
timeUnit- target unit.- Returns:
- current server time in
TimeUnitor null when used in pipeline / transaction. - See Also:
-
getClientList
Description copied from interface:ValkeyServerCommandsRequest information and statistics about connected clients.- Specified by:
getClientListin interfaceValkeyServerCommands- Returns:
ListofValkeyClientInfoobjects or null when used in pipeline / transaction.- See Also:
-
killClient
Description copied from interface:ValkeyServerCommandsCloses a given client connection identified by host:port.- Specified by:
killClientin interfaceValkeyServerCommands- Parameters:
host- of connection to close.port- of connection to close- See Also:
-
bgReWriteAof
- Specified by:
bgReWriteAofin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
bgSave
- Specified by:
bgSavein interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
lastSave
- Specified by:
lastSavein interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- Returns:
- See Also:
-
save
- Specified by:
savein interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
dbSize
- Specified by:
dbSizein interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- Returns:
- See Also:
-
flushDb
- Specified by:
flushDbin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
flushDb
- Specified by:
flushDbin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
flushAll
- Specified by:
flushAllin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
flushAll
- Specified by:
flushAllin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
info
- Specified by:
infoin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- Returns:
- See Also:
-
info
- Specified by:
infoin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- Returns:
- See Also:
-
shutdown
- Specified by:
shutdownin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
getConfig
- Specified by:
getConfigin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- Returns:
- See Also:
-
setConfig
- Specified by:
setConfigin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
resetConfigStats
- Specified by:
resetConfigStatsin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
rewriteConfig
- Specified by:
rewriteConfigin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- See Also:
-
time
- Specified by:
timein interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.timeUnit- must not be null.- Returns:
- See Also:
-
getClientList
- Specified by:
getClientListin interfaceValkeyClusterServerCommands- Parameters:
node- must not be null.- Returns:
- See Also:
-
setClientName
public void setClientName(byte[] name) Description copied from interface:ValkeyServerCommandsAssign given name to current connection.- Specified by:
setClientNamein interfaceValkeyServerCommands- See Also:
-
getClientName
Description copied from interface:ValkeyServerCommandsReturns the name of the current connection.- Specified by:
getClientNamein interfaceValkeyServerCommands- Returns:
- null when used in pipeline / transaction.
- See Also:
-
replicaOf
Description copied from interface:ValkeyServerCommandsChange valkey replication setting to new master.- Specified by:
replicaOfin interfaceValkeyServerCommands- Parameters:
host- must not be null.- See Also:
-
replicaOfNoOne
public void replicaOfNoOne()Description copied from interface:ValkeyServerCommandsChange server into master.- Specified by:
replicaOfNoOnein interfaceValkeyServerCommands- See Also:
-
migrate
public void migrate(byte[] key, ValkeyNode target, int dbIndex, @Nullable ValkeyServerCommands.MigrateOption option) Description copied from interface:ValkeyServerCommandsAtomically transfer a key from a source Valkey instance to a destination Valkey instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.- Specified by:
migratein interfaceValkeyServerCommands- Parameters:
key- must not be null.target- must not be null.option- can be null. Defaulted toValkeyServerCommands.MigrateOption.COPY.- See Also:
-
migrate
public void migrate(byte[] key, ValkeyNode target, int dbIndex, @Nullable ValkeyServerCommands.MigrateOption option, long timeout) Description copied from interface:ValkeyServerCommandsAtomically transfer a key from a source Valkey instance to a destination Valkey instance. On success the key is deleted from the original instance and is guaranteed to exist in the target instance.- Specified by:
migratein interfaceValkeyServerCommands- Parameters:
key- must not be null.target- must not be null.option- can be null. Defaulted toValkeyServerCommands.MigrateOption.COPY.- See Also:
-