Interface PreferredVersionProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Provides the version to record for a
Workflow.getVersion(String, int, int) call when the version marker is created for the first time.
This provider is called only during non-replay workflow task execution, before the SDK records a version marker for the change ID. It is not called during replay or after a version was already memoized for the same change ID.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the preferred version for the suppliedgetVersioncall, ornullto use the SDK default ofmaxSupported.
-
Method Details
-
getPreferredVersion
Returns the preferred version for the suppliedgetVersioncall, ornullto use the SDK default ofmaxSupported.This method is invoked on the workflow thread. Any exception it throws propagates out of the
getVersioncall and fails the current workflow task, which will be retried; a provider that always throws will therefore block the workflow.
-