Search in sources :

Example 6 with ZeebeDbState

use of io.camunda.zeebe.engine.state.ZeebeDbState in project zeebe by camunda-cloud.

the class ZeebeStateRule method before.

@Override
protected void before() throws Throwable {
    tempFolder.create();
    db = createNewDb();
    zeebeState = new ZeebeDbState(partition, db, db.createContext());
}
Also used : ZeebeDbState(io.camunda.zeebe.engine.state.ZeebeDbState)

Example 7 with ZeebeDbState

use of io.camunda.zeebe.engine.state.ZeebeDbState in project zeebe by camunda.

the class StreamProcessor method recoverState.

private ZeebeDbState recoverState() {
    final TransactionContext transactionContext = zeebeDb.createContext();
    final ZeebeDbState zeebeState = new ZeebeDbState(partitionId, zeebeDb, transactionContext);
    processingContext.transactionContext(transactionContext);
    processingContext.zeebeState(zeebeState);
    processingContext.eventApplier(eventApplierFactory.apply(zeebeState));
    return zeebeState;
}
Also used : TransactionContext(io.camunda.zeebe.db.TransactionContext) ZeebeDbState(io.camunda.zeebe.engine.state.ZeebeDbState)

Aggregations

ZeebeDbState (io.camunda.zeebe.engine.state.ZeebeDbState)7 TransactionContext (io.camunda.zeebe.db.TransactionContext)3 ZeebeClient (io.camunda.zeebe.client.ZeebeClient)1 DeploymentEvent (io.camunda.zeebe.client.api.response.DeploymentEvent)1 BpmnModelInstance (io.camunda.zeebe.model.bpmn.BpmnModelInstance)1 ArrayList (java.util.ArrayList)1 Test (org.junit.jupiter.api.Test)1