@Override protected CompletableFuture<Void> startServices() { return super.startServices() .thenComposeAsync(v -> partitions.start(), threadContext) .thenComposeAsync(v -> primitives.start(), threadContext) .thenApply(v -> null); }
@Override @SuppressWarnings("unchecked") protected CompletableFuture<Void> stopServices() { return primitives.stop() .exceptionally(e -> null) .thenComposeAsync(v -> partitions.stop(), threadContext) .exceptionally(e -> null) .thenComposeAsync(v -> super.stopServices(), threadContext); }
@Override protected CompletableFuture<Void> startServices() { return super.startServices() .thenComposeAsync(v -> partitions.start(), threadContext) .thenComposeAsync(v -> primitives.start(), threadContext) .thenApply(v -> null); }
@Override @SuppressWarnings("unchecked") protected CompletableFuture<Void> stopServices() { return primitives.stop() .exceptionally(e -> null) .thenComposeAsync(v -> partitions.stop(), threadContext) .exceptionally(e -> null) .thenComposeAsync(v -> super.stopServices(), threadContext); }