Implementing connection management commands #5115
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue link
This Pull Request is linked to issue (URL): #5117
Description
This PR implements comprehensive support for 20 connection management commands in the Java client, providing feature parity with Python, Node.js, and Go clients, as well as industry-standard clients like Lettuce.
Summary of Changes
Commands Implemented:
AUTH(password and username/password variants)HELLO(with auth and client name options)CLIENT SETNAME,CLIENT GETNAME,CLIENT ID,CLIENT INFO,CLIENT SETINFOCLIENT LIST,CLIENT KILL,CLIENT UNBLOCK,CLIENT PAUSE,CLIENT UNPAUSECLIENT CACHING,CLIENT GETREDIR,CLIENT TRACKINGINFOCLIENT NO-EVICT,CLIENT NO-TOUCH,CLIENT REPLYECHO,PING,SELECT,RESET,QUITFiles Modified
Interfaces:
valkey-glide/java/client/src/main/java/glide/api/commands/ConnectionManagementCommands.java(NEW)valkey-glide/java/client/src/main/java/glide/api/commands/ConnectionManagementClusterCommands.java(NEW)Client Implementations:
valkey-glide/java/client/src/main/java/glide/api/GlideClient.java(implements ConnectionManagementCommands)valkey-glide/java/client/src/main/java/glide/api/GlideClusterClient.java(implements ConnectionManagementClusterCommands)valkey-glide/java/client/src/main/java/glide/api/BaseClient.java(core implementation)Tests:
valkey-glide/java/integTest/src/test/java/glide/ConnectionManagementCommandsTests.java(NEW)valkey-glide/java/integTest/src/test/java/glide/ConnectionManagementClusterCommandsTests.java(NEW)Documentation:
CHANGELOG.md(updated with new features)Test Coverage
Test Statistics:
Version Compatibility Tests:
CLIENT UNBLOCK)AUTHusername,HELLO,CLIENT CACHING)CLIENT UNPAUSE,CLIENT TRACKINGINFO,RESET)CLIENT NO-EVICT)CLIENT NO-TOUCH,CLIENT SETINFO)API Examples
Standalone Client:
Cluster Client:
Breaking Changes
None - This is a purely additive change that:
Migration Guide
For users coming from Lettuce:
commands.auth("password")client.auth("password").get()commands.clientSetname("name")client.clientSetName("name").get()commands.clientList()client.clientList().get()commands.ping()client.ping().get()Cluster mode benefits:
Checklist
Before submitting the PR make sure the following are checked:
mainbranchAdditional Quality Checks
GlideStringtestsTesting Instructions
Run all tests:
Run specific test class:
Run with TLS:
./gradlew :integTest:test --tests '*ConnectionManagement*' -Dtls=true