[done] dependency updates
This commit is contained in:
parent
ca0bd8d67a
commit
d834d54c40
6 changed files with 13 additions and 13 deletions
8
ivy.xml
8
ivy.xml
|
@ -6,9 +6,9 @@
|
||||||
module="opinionated-vertx">
|
module="opinionated-vertx">
|
||||||
</info>
|
</info>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency org="io.vertx" name="vertx-config" rev="4.2.2" conf="*->compile;*->default"/>
|
<dependency org="io.vertx" name="vertx-config" rev="4.5.1" conf="*->compile;*->default"/>
|
||||||
<dependency org="io.vertx" name="vertx-web" rev="4.2.2" conf="*->compile;*->default"/>
|
<dependency org="io.vertx" name="vertx-web" rev="4.5.1" conf="*->compile;*->default"/>
|
||||||
<dependency org="io.vertx" name="vertx-web-client" rev="4.2.2" conf="*->compile;*->default"/>
|
<dependency org="io.vertx" name="vertx-web-client" rev="4.5.1" conf="*->compile;*->default"/>
|
||||||
<dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.12.6" conf="*->compile;*->default"/>
|
<dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.15.3" conf="*->compile;*->default"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</ivy-module>
|
</ivy-module>
|
||||||
|
|
|
@ -89,10 +89,10 @@ public class PersistentRestDataAccess<T extends SerializableWithId> extends Rest
|
||||||
|
|
||||||
private CompositeFuture readAllFiles(final List<String> filePaths) {
|
private CompositeFuture readAllFiles(final List<String> filePaths) {
|
||||||
LOG.info("Found " + filePaths.size() + " files in directory " + baseDir);
|
LOG.info("Found " + filePaths.size() + " files in directory " + baseDir);
|
||||||
return CompositeFuture.join(filePaths.stream().map(this::readFileContent).toList());
|
return Future.join(filePaths.stream().map(this::readFileContent).toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Future readFileContent(final String filePath) {
|
private Future<Void> readFileContent(final String filePath) {
|
||||||
Promise<Void> readFuture = Promise.promise();
|
Promise<Void> readFuture = Promise.promise();
|
||||||
vertx.fileSystem().readFile(filePath)
|
vertx.fileSystem().readFile(filePath)
|
||||||
.onComplete(ar -> {
|
.onComplete(ar -> {
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class RestDataAccess<T extends SerializableWithId> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void update(final String id, final RoutingContext context) {
|
protected void update(final String id, final RoutingContext context) {
|
||||||
T newData = Json.decodeValue(context.getBody(), classReference);
|
T newData = context.body().asPojo(classReference);
|
||||||
if (!newData.getId().equals(id)) {
|
if (!newData.getId().equals(id)) {
|
||||||
context.fail(400);
|
context.fail(400);
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ public class RestDataAccess<T extends SerializableWithId> {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected T getDataFromRequest(final RoutingContext context) {
|
protected T getDataFromRequest(final RoutingContext context) {
|
||||||
return Json.decodeValue(context.getBody(), classReference);
|
return context.body().asPojo(classReference);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleMessage(final Message<RestDataRequest<T>> request) {
|
private void handleMessage(final Message<RestDataRequest<T>> request) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class OAuthWebClient {
|
||||||
|
|
||||||
public Future<HttpRequest<Buffer>> prepareAuthenticatedRequest(final HttpMethod method, final String requestPath) {
|
public Future<HttpRequest<Buffer>> prepareAuthenticatedRequest(final HttpMethod method, final String requestPath) {
|
||||||
Promise<HttpRequest<Buffer>> promise = Promise.promise();
|
Promise<HttpRequest<Buffer>> promise = Promise.promise();
|
||||||
ensureIsAuthenticated().onComplete(v ->
|
ensureIsAuthenticated().andThen(v ->
|
||||||
promise.complete(webClient.requestAbs(method, config.getBaseUrl() + requestPath)
|
promise.complete(webClient.requestAbs(method, config.getBaseUrl() + requestPath)
|
||||||
.bearerTokenAuthentication(token.getToken()))
|
.bearerTokenAuthentication(token.getToken()))
|
||||||
).onFailure(promise::fail);
|
).onFailure(promise::fail);
|
||||||
|
|
|
@ -9,7 +9,6 @@ import de.pzzz.vertx.Startup;
|
||||||
import de.pzzz.vertx.worker.DeployableWorker;
|
import de.pzzz.vertx.worker.DeployableWorker;
|
||||||
import de.pzzz.vertx.worker.QueuedWorker;
|
import de.pzzz.vertx.worker.QueuedWorker;
|
||||||
import io.vertx.core.Closeable;
|
import io.vertx.core.Closeable;
|
||||||
import io.vertx.core.CompositeFuture;
|
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.Promise;
|
import io.vertx.core.Promise;
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ public abstract class ProcessExecutionController<T extends ExecutableProcess<V,U
|
||||||
|
|
||||||
public Future<Void> deployWorkers() {
|
public Future<Void> deployWorkers() {
|
||||||
Promise<Void> promise = Promise.promise();
|
Promise<Void> promise = Promise.promise();
|
||||||
CompositeFuture.all(getWorker().stream().map(controller -> (Future) controller.deployWorkers(startup)).toList())
|
Future.all(getWorker().stream().map(controller -> controller.deployWorkers(startup)).toList())
|
||||||
.onSuccess(res -> promise.complete())
|
.onSuccess(res -> promise.complete())
|
||||||
.onFailure(error -> {
|
.onFailure(error -> {
|
||||||
LOG.log(Level.SEVERE, error.getMessage(), error);
|
LOG.log(Level.SEVERE, error.getMessage(), error);
|
||||||
|
@ -39,7 +38,7 @@ public abstract class ProcessExecutionController<T extends ExecutableProcess<V,U
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close(final Promise<Void> completion) {
|
public void close(final Promise<Void> completion) {
|
||||||
CompositeFuture.all(getWorker().stream().map(worker -> (Future) worker.undeployWorkers()).toList())
|
Future.all(getWorker().stream().map(DeployableWorker::undeployWorkers).toList())
|
||||||
.onSuccess(res -> completion.complete())
|
.onSuccess(res -> completion.complete())
|
||||||
.onFailure(error -> {
|
.onFailure(error -> {
|
||||||
LOG.log(Level.SEVERE, error.getMessage(), error);
|
LOG.log(Level.SEVERE, error.getMessage(), error);
|
||||||
|
|
|
@ -8,6 +8,7 @@ import de.pzzz.vertx.Startup;
|
||||||
import io.vertx.core.DeploymentOptions;
|
import io.vertx.core.DeploymentOptions;
|
||||||
import io.vertx.core.Future;
|
import io.vertx.core.Future;
|
||||||
import io.vertx.core.Promise;
|
import io.vertx.core.Promise;
|
||||||
|
import io.vertx.core.ThreadingModel;
|
||||||
import io.vertx.core.Vertx;
|
import io.vertx.core.Vertx;
|
||||||
import io.vertx.core.eventbus.DeliveryOptions;
|
import io.vertx.core.eventbus.DeliveryOptions;
|
||||||
import io.vertx.core.json.JsonObject;
|
import io.vertx.core.json.JsonObject;
|
||||||
|
@ -39,7 +40,7 @@ public abstract class WorkerController<T, U> implements DeployableWorker {
|
||||||
config.put(WORKER_BUS_ADDRESS_CONFIG, busAddress());
|
config.put(WORKER_BUS_ADDRESS_CONFIG, busAddress());
|
||||||
LOG.info("Deploy " + maxWorkers + " workers for bus " + busAddress());
|
LOG.info("Deploy " + maxWorkers + " workers for bus " + busAddress());
|
||||||
DeploymentOptions workerOpts = new DeploymentOptions()
|
DeploymentOptions workerOpts = new DeploymentOptions()
|
||||||
.setWorker(true)
|
.setThreadingModel(ThreadingModel.WORKER)
|
||||||
.setConfig(startup.getConfig())
|
.setConfig(startup.getConfig())
|
||||||
.setWorkerPoolName(busAddress())
|
.setWorkerPoolName(busAddress())
|
||||||
.setInstances(maxWorkers)
|
.setInstances(maxWorkers)
|
||||||
|
|
Loading…
Add table
Reference in a new issue