use of io.camunda.zeebe.logstreams.storage.LogStorage in project zeebe-process-test by camunda.
the class EngineFactory method createLogStream.
private static LogStream createLogStream(final LogStorage logStorage, final ActorSchedulingService scheduler, final int partitionId) {
final LogStreamBuilder builder = LogStream.builder().withPartitionId(partitionId).withLogStorage(logStorage).withActorSchedulingService(scheduler);
final CompletableFuture<LogStream> theFuture = new CompletableFuture<>();
scheduler.submitActor(Actor.wrap((control) -> builder.buildAsync().onComplete((logStream, failure) -> {
if (failure != null) {
theFuture.completeExceptionally(failure);
} else {
theFuture.complete(logStream);
}
})));
return theFuture.join();
}
use of io.camunda.zeebe.logstreams.storage.LogStorage in project zeebe-process-test by camunda-cloud.
the class EngineFactory method createLogStream.
private static LogStream createLogStream(final LogStorage logStorage, final ActorSchedulingService scheduler, final int partitionId) {
final LogStreamBuilder builder = LogStream.builder().withPartitionId(partitionId).withLogStorage(logStorage).withActorSchedulingService(scheduler);
final CompletableFuture<LogStream> theFuture = new CompletableFuture<>();
scheduler.submitActor(Actor.wrap((control) -> builder.buildAsync().onComplete((logStream, failure) -> {
if (failure != null) {
theFuture.completeExceptionally(failure);
} else {
theFuture.complete(logStream);
}
})));
return theFuture.join();
}
Aggregations