Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Louie <[email protected]>
  • Loading branch information
jonathanl-bq committed Aug 1, 2024
1 parent bbb7294 commit 5f6dc97
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 23 deletions.
11 changes: 9 additions & 2 deletions examples/java/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Run

Ensure that you have an instance of Valkey running on "localhost" on "6379". Otherwise, update glide.examples.StandaloneExample or glide.examples.ClusterExample with a configuration that matches your server settings.
Ensure that you have a server running on "localhost" on port "6379". To run the ClusterExample, make sure that the server has cluster mode enabled. If the server is running on a different host and/or port, update the StandaloneExample or ClusterExample with a configuration that matches your server settings.

To run the Standalone example:
```
Expand All @@ -12,3 +11,11 @@ To run the Cluster example:
cd valkey-glide/examples/java
./gradlew :runCluster
```

## Version
These examples are running `valkey-glide` version `1.+`. In order to change the version, update the following section in the `build.gradle` file:
```groovy
dependencies {
implementation "io.valkey:valkey-glide:1.+:${osdetector.classifier}"
}
```
14 changes: 11 additions & 3 deletions examples/kotlin/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Run
Ensure that you have an instance of Valkey running on "localhost" on "6379". Otherwise, update glide.examples.StandaloneExample or glide.examples.ClusterExample with a configuration that matches your server settings.
## Run
Ensure that you have a server running on "localhost" on port "6379". To run the ClusterExample, make sure that the server has cluster mode enabled. If the server is running on a different host and/or port, update the StandaloneExample or ClusterExample with a configuration that matches your server settings.

To run the Standalone example:
```shell
Expand All @@ -8,7 +8,15 @@ cd valkey-glide/examples/kotlin
```

To run the Cluster example:
```
```shell
cd valkey-glide/examples/kotlin
./gradlew runCluster
```

## Version
These examples are running `valkey-glide` version `1.+`. In order to change the version, update the following section in the `build.gradle.kts` file:
```kotlin
dependencies {
implementation("io.valkey:valkey-glide:1.+:$classifier")
}
```
4 changes: 0 additions & 4 deletions examples/kotlin/src/main/kotlin/ClusterExample.kt
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ object ClusterExample {
Logger.log(Logger.Level.ERROR, "glide", "Connection error encountered: ${e.message}")
throw e
}
is ExecAbortException -> {
Logger.log(Logger.Level.ERROR, "glide", "ExecAbort error encountered: ${e.message}")
throw e
}
else -> {
Logger.log(Logger.Level.ERROR, "glide", "Execution error encountered: ${e.cause}")
throw e
Expand Down
4 changes: 0 additions & 4 deletions examples/kotlin/src/main/kotlin/StandaloneExample.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,6 @@ object StandaloneExample {
Logger.log(Logger.Level.ERROR, "glide", "Connection error encountered: ${e.message}")
throw e
}
is ExecAbortException -> {
Logger.log(Logger.Level.ERROR, "glide", "ExecAbort error encountered: ${e.message}")
throw e
}
else -> {
Logger.log(Logger.Level.ERROR, "glide", "Execution error encountered: ${e.cause}")
throw e
Expand Down
12 changes: 9 additions & 3 deletions examples/scala/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Run
Ensure that you have an instance of Valkey running on "localhost" on "6379". Otherwise, update StandaloneExample or ClusterExample with a configuration that matches your server settings.
## Run
Ensure that you have a server running on "localhost" on port "6379". To run the ClusterExample, make sure that the server has cluster mode enabled. If the server is running on a different host and/or port, update the StandaloneExample or ClusterExample with a configuration that matches your server settings.

To run the Standalone example:
```shell
Expand All @@ -8,7 +8,13 @@ sbt "runMain StandaloneExample"
```

To run the Cluster example:
```
```shell
cd valkey-glide/examples/scala
sbt "runMain ClusterExample"
```

## Version
These examples are running `valkey-glide` version `1.+`. In order to change the version, update the following section in the `build.sbt` file:
```scala
libraryDependencies += "io.valkey" % "valkey-glide" % "1.+" classifier platformClassifier
```
2 changes: 1 addition & 1 deletion examples/scala/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ val platformClassifier = {
}
}

libraryDependencies += "io.valkey" % "valkey-glide" % "1+" classifier platformClassifier
libraryDependencies += "io.valkey" % "valkey-glide" % "1.+" classifier platformClassifier

3 changes: 0 additions & 3 deletions examples/scala/src/main/scala/ClusterExample.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ object ClusterExample {
// The client wasn't able to reestablish the connection within the given retries
Logger.log(Logger.Level.ERROR, "glide", s"Connection error encountered: ${e.getMessage}")
Future.failed(e)
case e: ExecAbortException =>
Logger.log(Logger.Level.ERROR, "glide", s"ExecAbort error encountered: ${e.getMessage}")
Future.failed(e)
case _ =>
Logger.log(Logger.Level.ERROR, "glide", s"Execution error encountered: ${e.getCause}")
Future.failed(e)
Expand Down
3 changes: 0 additions & 3 deletions examples/scala/src/main/scala/StandaloneExample.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ object StandaloneExample {
// The client wasn't able to reestablish the connection within the given retries
Logger.log(Logger.Level.ERROR, "glide", s"Connection error encountered: ${e.getMessage}")
Future.failed(e)
case e: ExecAbortException =>
Logger.log(Logger.Level.ERROR, "glide", s"ExecAbort error encountered: ${e.getMessage}")
Future.failed(e)
case _ =>
Logger.log(Logger.Level.ERROR, "glide", s"Execution error encountered: ${e.getCause}")
Future.failed(e)
Expand Down

0 comments on commit 5f6dc97

Please sign in to comment.