Interface StateMachine

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
LegacyStateMachine

public interface StateMachine extends AutoCloseable
Canonical state-machine contract driving a single Restate invocation.

This is shaped after the restate-sdk-shared-core VM trait.

It is implemented twice, selected at runtime by StateMachineFactory:

  • a Panama/FFM implementation calling the native restate-sdk-shared-core library, used on JDK 23+ — the path that supports the latest Restate features;
  • a pure-Java implementation (the legacy state machine) used on JDK < 23, or when the native library is unavailable/disabled — a deprecated fallback that will be removed in a future release.

Instances of this interface are not thread-safe.