Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DE-535] Java Driver: configure Vert.x instance #540

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,33 @@ Here are examples to integrate configuration properties from different sources:
- `acquireHostListInterval(Integer)`: acquireHostList interval (ms), (default: `3_600_000`, 1 hour)
- `loadBalancingStrategy(LoadBalancingStrategy)`: load balancing strategy, possible values are: `NONE`, `ROUND_ROBIN`, `ONE_RANDOM`, (default: `NONE`)
- `responseQueueTimeSamples(Integer)`: amount of samples kept for queue time metrics, (default: `10`)
- `serde(ArangoSerde)`: serde to serialize and deserialize user-data
- `serde(ArangoSerde)`: serde to serialize and deserialize user-data
- `protocolConfig(ProtocolConfig)`: configuration specific for the used protocol provider implementation

### HTTP Protocol Provider Configuration

The `ProtocolConfig` for the default HTTP protocol provider can be created via:

```java
HttpProtocolConfig.builder()
// ...
.build();
```

and configured using the following builder methods:

- `vertx(Vertx)`: Vert.x instance to use. If not set, a new instance is created.

For example, to reuse the existing Vert.x instance:

```java
HttpProtocolConfig.builder()
.protocolConfig(HttpProtocolConfig.builder()
.vertx(Vertx.currentContext().owner())
.build()
)
.build();
```

### Config File Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,33 @@ Here are examples to integrate configuration properties from different sources:
- `acquireHostListInterval(Integer)`: acquireHostList interval (ms), (default: `3_600_000`, 1 hour)
- `loadBalancingStrategy(LoadBalancingStrategy)`: load balancing strategy, possible values are: `NONE`, `ROUND_ROBIN`, `ONE_RANDOM`, (default: `NONE`)
- `responseQueueTimeSamples(Integer)`: amount of samples kept for queue time metrics, (default: `10`)
- `serde(ArangoSerde)`: serde to serialize and deserialize user-data
- `serde(ArangoSerde)`: serde to serialize and deserialize user-data
- `protocolConfig(ProtocolConfig)`: configuration specific for the used protocol provider implementation

### HTTP Protocol Provider Configuration

The `ProtocolConfig` for the default HTTP protocol provider can be created via:

```java
HttpProtocolConfig.builder()
// ...
.build();
```

and configured using the following builder methods:

- `vertx(Vertx)`: Vert.x instance to use. If not set, a new instance is created.

For example, to reuse the existing Vert.x instance:

```java
HttpProtocolConfig.builder()
.protocolConfig(HttpProtocolConfig.builder()
.vertx(Vertx.currentContext().owner())
.build()
)
.build();
```

### Config File Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,32 @@ Here are examples to integrate configuration properties from different sources:
- `compressionThreshold(Integer)`: the minimum HTTP request body size (in bytes) to trigger compression, (default: `1024`)
- `compressionLevel`: compression level between 0 and 9, (default: `6`)
- `serde(ArangoSerde)`: serde to serialize and deserialize user-data
- `protocolConfig(ProtocolConfig)`: configuration specific for the used protocol provider implementation

### HTTP Protocol Provider Configuration

The `ProtocolConfig` for the default HTTP protocol provider can be created via:

```java
HttpProtocolConfig.builder()
// ...
.build();
```

and configured using the following builder methods:

- `vertx(Vertx)`: Vert.x instance to use. If not set, a new instance is created.

For example, to reuse the existing Vert.x instance:

```java
HttpProtocolConfig.builder()
.protocolConfig(HttpProtocolConfig.builder()
.vertx(Vertx.currentContext().owner())
.build()
)
.build();
```

### Config File Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,32 @@ Here are examples to integrate configuration properties from different sources:
- `compressionThreshold(Integer)`: the minimum HTTP request body size (in bytes) to trigger compression, (default: `1024`)
- `compressionLevel`: compression level between 0 and 9, (default: `6`)
- `serde(ArangoSerde)`: serde to serialize and deserialize user-data
- `protocolConfig(ProtocolConfig)`: configuration specific for the used protocol provider implementation

### HTTP Protocol Provider Configuration

The `ProtocolConfig` for the default HTTP protocol provider can be created via:

```java
HttpProtocolConfig.builder()
// ...
.build();
```

and configured using the following builder methods:

- `vertx(Vertx)`: Vert.x instance to use. If not set, a new instance is created.

For example, to reuse the existing Vert.x instance:

```java
HttpProtocolConfig.builder()
.protocolConfig(HttpProtocolConfig.builder()
.vertx(Vertx.currentContext().owner())
.build()
)
.build();
```

### Config File Properties

Expand Down