Interface ManagedJobDefinition<T>
- Type Parameters:
T- activation-owned POJO job component
- All Superinterfaces:
ManagedComponentDefinition<T>, ManagedHostAdapter<T>, ManagedHostedAdapter<T>
Finite generated direct-access job and safe-point hooks, consumed by a trusted job factory.
Hooks execute only within the current owned USER call; no reflection, arbitrary heap snapshot
or callback timer is implied. Restore receives null before a fresh run to clear prior mutable state.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Objectcheckpoint(T instance) Captures state at an explicit safe point inside the current job invocation.Class<?> Returns the checkpoint type; Void.class denotes no checkpoint/restore pair.Class<?> Returns the concrete entry input type.job()Returns the exact durable-job feature including entry and optional hooks.default ObjectReads progress at an explicit safe point inside the owned invocation.Class<?> Returns the progress hook type; Void.class denotes no progress hook.default voidRestores the current claim's checkpoint before its entry, null for every fresh run.Class<?> Returns the logical result type after unwrapping CompletionStage.Methods inherited from interface ManagedComponentDefinition
create, dependencies, inject, name, owned, qualifiers, scope, typeMethods inherited from interface ManagedHostAdapter
invoke, lifecycle, probe, probes, remoteMethodsMethods inherited from interface ManagedHostedAdapter
hostedFeatures, invokeHosted
-
Method Details
-
job
ManagedHostedFeature job()Returns the exact durable-job feature including entry and optional hooks.- Returns:
- immutable feature declaration
-
inputType
Class<?> inputType()Returns the concrete entry input type.- Returns:
- scalar, bytes or registered schema record type
-
resultType
Class<?> resultType()Returns the logical result type after unwrapping CompletionStage.- Returns:
- concrete data type or Void.class
-
checkpointType
Class<?> checkpointType()Returns the checkpoint type; Void.class denotes no checkpoint/restore pair.- Returns:
- concrete nullable reference state type
-
progressType
Class<?> progressType()Returns the progress hook type; Void.class denotes no progress hook.- Returns:
- concrete reference progress type
-
checkpoint
-
restore
Restores the current claim's checkpoint before its entry, null for every fresh run.- Parameters:
instance- actual current job componentcheckpoint- restored state or null for a fresh run- Throws:
Exception- if the declared hook fails or is absent
-
progress
-