Package io.zeebe.containers.engine
Interface ContainerEngine
- All Superinterfaces:
AutoCloseable,org.testcontainers.lifecycle.Startable,io.camunda.zeebe.process.test.api.ZeebeTestEngine
@API(status=EXPERIMENTAL)
public interface ContainerEngine
extends org.testcontainers.lifecycle.Startable, io.camunda.zeebe.process.test.api.ZeebeTestEngine
A
ContainerEngine is a ZeebeTestEngine implementation which wraps a container or
a set of containers.
You can use the provided ContainerEngine.Builder interface (via builder() to build a custom
engine.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA helper class to buildContainerEngineinstances. -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(int partitionId, long position) Marks all records with a position less thanpositionon partition with IDpartitionIdas acknowledged, meaning they can now be deleted from Zeebe.static ContainerEngine.Builderbuilder()Returns a default builder.static ContainerEngineCreates aContainerEnginewith a defaultZeebeContainer, an idle period of 1 second, a grace period of 0, and auto acknowledging all records.Methods inherited from interface org.testcontainers.lifecycle.Startable
close, getDependencies, start, stopMethods inherited from interface io.camunda.zeebe.process.test.api.ZeebeTestEngine
createClient, createClient, getGatewayAddress, getRecordStreamSource, increaseTime, start, stop, waitForBusyState, waitForIdleState
-
Method Details
-
builder
Returns a default builder. CallingContainerEngine.Builder.build()on a fresh builder will return a builder wrapping a defaultZeebeContainer, with an idle period of 1 second.- Returns:
- a new
ContainerEngine.Builderinstance
-
createDefault
Creates aContainerEnginewith a defaultZeebeContainer, an idle period of 1 second, a grace period of 0, and auto acknowledging all records.- Returns:
- a new, default container engine
-
acknowledge
void acknowledge(int partitionId, long position) Marks all records with a position less thanpositionon partition with IDpartitionIdas acknowledged, meaning they can now be deleted from Zeebe.Note that this is not a synchronous operation, but instead will take effect when the next record is exported. See
DebugReceiver.acknowledge(int, long)for more.- Parameters:
partitionId- the ID of the partition on which to acknowledgeposition- the position up to which they should be acknowledged
-