BanyanDBStorageClient: Add `keepAliveProperty` API. (#11383)

This commit is contained in:
Wan Kai 2023-10-08 18:08:38 +08:00 committed by GitHub
parent 10580355be
commit 4fa156aed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -15,6 +15,7 @@
* Fix Zipkin trace receiver response: make the HTTP status code from `200` to `202`.
* Update BanyanDB Java Client to 0.5.0.
* Fix getInstances query in the BanyanDB Metadata DAO.
* BanyanDBStorageClient: Add `keepAliveProperty` API.
#### UI

View File

@ -112,6 +112,16 @@ public class BanyanDBStorageClient implements Client, HealthCheckable {
}
}
public void keepAliveProperty(long leaseId) throws IOException {
try {
this.client.keepAliveProperty(leaseId);
this.healthChecker.health();
} catch (BanyanDBException ex) {
healthChecker.unHealth(ex);
throw new IOException("fail to keep alive property", ex);
}
}
public StreamQueryResponse query(StreamQuery q) throws IOException {
try {
StreamQueryResponse response = this.client.query(q);