forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java: Pub & Sub = <3 (valkey-io#1662)
* Java: Add client configuration for subscribing to channels. (#381) * Add client configuartion for subscribing to channels. Signed-off-by: Yury-Fridlyand <[email protected]> * CLIPPY I HATE YOU Signed-off-by: Yury-Fridlyand <[email protected]> * Get and store callback. Signed-off-by: Yury-Fridlyand <[email protected]> * Fix tests. Signed-off-by: Yury-Fridlyand <[email protected]> * Rework configuration and add docs. Signed-off-by: Yury-Fridlyand <[email protected]> * Config rework. Signed-off-by: Yury-Fridlyand <[email protected]> * docs Signed-off-by: Yury-Fridlyand <[email protected]> * More TODOs for the god of TODOs. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]> * Add `PUBLISH` and `SPUBLISH` commands. (#391) * Add `PUBLISH` and `SPUBLISH` commands. Signed-off-by: Yury-Fridlyand <[email protected]> * Fix the test. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]> * Java client: receive pubsub messages (#385) * Add client configuartion for subscribing to channels. Signed-off-by: Yury-Fridlyand <[email protected]> * CLIPPY I HATE YOU Signed-off-by: Yury-Fridlyand <[email protected]> * Get and store callback. Signed-off-by: Yury-Fridlyand <[email protected]> * Fix tests. Signed-off-by: Yury-Fridlyand <[email protected]> * Rework configuration and add docs. Signed-off-by: Yury-Fridlyand <[email protected]> * Config rework. Signed-off-by: Yury-Fridlyand <[email protected]> * docs Signed-off-by: Yury-Fridlyand <[email protected]> * Receive pushes (subscibed messages). Signed-off-by: Yury-Fridlyand <[email protected]> * Address PR comments. Signed-off-by: Yury-Fridlyand <[email protected]> * I HATE YOU SPOTLESS Signed-off-by: Yury-Fridlyand <[email protected]> * Rename a class. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]> * Address PR comments. Signed-off-by: Yury-Fridlyand <[email protected]> * Address PR comments. Signed-off-by: Yury-Fridlyand <[email protected]> * Java: add IT for pubsub (#400) * Add some tests. Signed-off-by: Yury-Fridlyand <[email protected]> * Test fixes. Signed-off-by: Yury-Fridlyand <[email protected]> * Add more tests. Signed-off-by: Yury-Fridlyand <[email protected]> * Address PR comments. Signed-off-by: Yury-Fridlyand <[email protected]> * Experiment Signed-off-by: Yury-Fridlyand <[email protected]> * Add more tests. Signed-off-by: Yury-Fridlyand <[email protected]> * Typo fix. Signed-off-by: Yury-Fridlyand <[email protected]> * Typo fix. Signed-off-by: Yury-Fridlyand <[email protected]> * I HATE YOU SPOTLESS Signed-off-by: Yury-Fridlyand <[email protected]> * Typo fix. Signed-off-by: Yury-Fridlyand <[email protected]> * Uncomment test timeout. Signed-off-by: Yury-Fridlyand <[email protected]> * Address PR comments. Signed-off-by: Yury-Fridlyand <[email protected]> * Typo fix. Signed-off-by: Yury-Fridlyand <[email protected]> * Typo fix. Signed-off-by: Yury-Fridlyand <[email protected]> * Typo fix. Signed-off-by: Yury-Fridlyand <[email protected]> * Typo fix. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]> * Update function signature. Signed-off-by: Yury-Fridlyand <[email protected]> * Address PR comments. Signed-off-by: Yury-Fridlyand <[email protected]> * Address PR comments. Signed-off-by: Yury-Fridlyand <[email protected]> --------- Signed-off-by: Yury-Fridlyand <[email protected]>
- Loading branch information
1 parent
d5bafac
commit eb2201c
Showing
36 changed files
with
1,990 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
java/client/src/main/java/glide/api/commands/PubSubBaseCommands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0 */ | ||
package glide.api.commands; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
|
||
/** | ||
* Supports commands for the "Pub/Sub" group for standalone and cluster clients. | ||
* | ||
* @see <a href="https://redis.io/docs/latest/commands/?group=pubsub">Pub/Sub Commands</a> | ||
*/ | ||
public interface PubSubBaseCommands { | ||
|
||
/** | ||
* Publishes message on pubsub channel. | ||
* | ||
* @see <a href="https://valkey.io/commands/publish/">redis.io</a> for details. | ||
* @param channel The channel to publish the message on. | ||
* @param message The message to publish. | ||
* @return <code>OK</code>. | ||
* @example | ||
* <pre>{@code | ||
* String response = client.publish("announcements", "The cat said 'meow'!").get(); | ||
* assert response.equals("OK"); | ||
* }</pre> | ||
*/ | ||
CompletableFuture<String> publish(String channel, String message); | ||
} |
Oops, something went wrong.