-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
9989: Create engine outside r=Zelldon a=Zelldon ## Description Create the engine outside of the StreamProcessor, which should allow to also inject other RecordProcessors. Furthermore we can fill the Engine with the needed TypedRecordProcessorFactory, which means we no longer need that in our builders and contexts. I hope this helps you in make further progress `@deepthidevaki` Sidenote: This also simplifies the StreamProcessor/RecordProcessor tests, since we do not necessarily need to set up so much anymore. <!-- Please explain the changes you made here. --> ## Related issues <!-- Which issues are closed by this PR or are related --> related to #9725 Co-authored-by: Christopher Zell <zelldon91@googlemail.com>
- Loading branch information
Showing
13 changed files
with
138 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
engine/src/main/java/io/camunda/zeebe/engine/api/RecordProcessorContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under | ||
* one or more contributor license agreements. See the NOTICE file distributed | ||
* with this work for additional information regarding copyright ownership. | ||
* Licensed under the Zeebe Community License 1.1. You may not use this file | ||
* except in compliance with the Zeebe Community License 1.1. | ||
*/ | ||
package io.camunda.zeebe.engine.api; | ||
|
||
import io.camunda.zeebe.db.TransactionContext; | ||
import io.camunda.zeebe.db.ZeebeDb; | ||
import io.camunda.zeebe.engine.processing.streamprocessor.StreamProcessorListener; | ||
import io.camunda.zeebe.engine.processing.streamprocessor.writers.LegacyTypedResponseWriter; | ||
import io.camunda.zeebe.engine.processing.streamprocessor.writers.LegacyTypedStreamWriter; | ||
import io.camunda.zeebe.engine.state.EventApplier; | ||
import io.camunda.zeebe.engine.state.mutable.MutableZeebeState; | ||
import java.util.List; | ||
import java.util.function.Function; | ||
|
||
public interface RecordProcessorContext { | ||
|
||
int getPartitionId(); | ||
|
||
ProcessingScheduleService getScheduleService(); | ||
|
||
ZeebeDb getZeebeDb(); | ||
|
||
TransactionContext getTransactionContext(); | ||
|
||
LegacyTypedStreamWriter getStreamWriterProxy(); | ||
|
||
LegacyTypedResponseWriter getTypedResponseWriter(); | ||
|
||
Function<MutableZeebeState, EventApplier> getEventApplierFactory(); | ||
|
||
List<StreamProcessorLifecycleAware> getLifecycleListeners(); | ||
|
||
StreamProcessorListener getStreamProcessorListener(); | ||
|
||
// only used for tests | ||
@Deprecated | ||
void setStreamProcessorListener(final StreamProcessorListener streamProcessorListener); | ||
|
||
void addLifecycleListeners(final List<StreamProcessorLifecycleAware> lifecycleListeners); | ||
} |
Oops, something went wrong.