Interface ManagedJobDefinition<T>

Type Parameters:
T - activation-owned POJO job component
All Superinterfaces:
ManagedComponentDefinition<T>, ManagedHostAdapter<T>, ManagedHostedAdapter<T>

public interface ManagedJobDefinition<T> extends 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 Details

    • 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

      default Object checkpoint(T instance) throws Exception
      Captures state at an explicit safe point inside the current job invocation.
      Parameters:
      instance - actual current job component
      Returns:
      current checkpoint data
      Throws:
      Exception - if the declared hook fails or is absent
    • restore

      default void restore(T instance, Object checkpoint) throws Exception
      Restores the current claim's checkpoint before its entry, null for every fresh run.
      Parameters:
      instance - actual current job component
      checkpoint - restored state or null for a fresh run
      Throws:
      Exception - if the declared hook fails or is absent
    • progress

      default Object progress(T instance) throws Exception
      Reads progress at an explicit safe point inside the owned invocation.
      Parameters:
      instance - actual current job component
      Returns:
      bounded progress data
      Throws:
      Exception - if the declared hook fails or is absent