-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add connection timeout configuration (#2823)
--------- Signed-off-by: Shoham Elias <[email protected]>
- Loading branch information
1 parent
8bfa0d8
commit 0bcca10
Showing
34 changed files
with
746 additions
and
51 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
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
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
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
22 changes: 22 additions & 0 deletions
22
.../client/src/main/java/glide/api/models/configuration/AdvancedBaseClientConfiguration.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,22 @@ | ||
/** Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0 */ | ||
package glide.api.models.configuration; | ||
|
||
import lombok.Getter; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
/** | ||
* Advanced configuration settings class for creating a client. Shared settings for standalone and | ||
* cluster clients. | ||
*/ | ||
@Getter | ||
@SuperBuilder | ||
public abstract class AdvancedBaseClientConfiguration { | ||
|
||
/** | ||
* The duration in milliseconds to wait for a TCP/TLS connection to complete. This applies both | ||
* during initial client creation and any reconnections that may occur during request processing. | ||
* **Note**: A high connection timeout may lead to prolonged blocking of the entire command | ||
* pipeline. If not explicitly set, a default value of 250 milliseconds will be used. | ||
*/ | ||
private final Integer connectionTimeout; | ||
} |
23 changes: 23 additions & 0 deletions
23
...client/src/main/java/glide/api/models/configuration/AdvancedGlideClientConfiguration.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,23 @@ | ||
/** Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0 */ | ||
package glide.api.models.configuration; | ||
|
||
import glide.api.GlideClient; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
/** | ||
* Represents advanced configuration settings for a Standalone {@link GlideClient} used in {@link | ||
* GlideClientConfiguration}. | ||
* | ||
* @example | ||
* <pre>{@code | ||
* AdvancedGlideClientConfiguration config = AdvancedGlideClientConfiguration.builder() | ||
* .connectionTimeout(500) | ||
* .build(); | ||
* }</pre> | ||
*/ | ||
@Getter | ||
@SuperBuilder | ||
@ToString | ||
public class AdvancedGlideClientConfiguration extends AdvancedBaseClientConfiguration {} |
23 changes: 23 additions & 0 deletions
23
...src/main/java/glide/api/models/configuration/AdvancedGlideClusterClientConfiguration.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,23 @@ | ||
/** Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0 */ | ||
package glide.api.models.configuration; | ||
|
||
import glide.api.GlideClusterClient; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
/** | ||
* Represents advanced configuration settings for a Standalone {@link GlideClusterClient} used in | ||
* {@link GlideClusterClientConfiguration}. | ||
* | ||
* @example | ||
* <pre>{@code | ||
* AdvancedGlideClusterClientConfiguration config = AdvancedGlideClusterClientConfiguration.builder() | ||
* .connectionTimeout(500) | ||
* .build(); | ||
* }</pre> | ||
*/ | ||
@Getter | ||
@SuperBuilder | ||
@ToString | ||
public class AdvancedGlideClusterClientConfiguration extends AdvancedBaseClientConfiguration {} |
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
Oops, something went wrong.