Interface ManagedPartitionDefinition<T>

Type Parameters:
T - stateless activation-owned reducer
All Superinterfaces:
ManagedComponentDefinition<T>, ManagedHostAdapter<T>, ManagedHostedAdapter<T>

public interface ManagedPartitionDefinition<T> extends ManagedHostedAdapter<T>
Generated direct-access plan for a deterministic config-only POJO partition reducer. State is owned by the encoded resource, not by mutable fields of the component. Reducer code must be deterministic, bounded and free of external effects; this contract is not a Java sandbox. The host validates concrete A01 data types and exact program compatibility before registration.
  • Method Details

    • partition

      Returns the exact hosted partition descriptor.
      Returns:
      one feature of kind partition
    • stateType

      Class<?> stateType()
      Returns the explicitly registered state type.
      Returns:
      concrete record or supported scalar/bytes type
    • commandType

      Class<?> commandType()
      Returns the explicitly registered command type.
      Returns:
      concrete data type
    • queryType

      Class<?> queryType()
      Returns the explicitly registered query type.
      Returns:
      concrete data type
    • viewType

      Class<?> viewType()
      Returns the explicitly registered view type.
      Returns:
      concrete data type
    • initial

      Object initial(T instance) throws Exception
      Creates initial state without external effects.
      Parameters:
      instance - stateless reducer
      Returns:
      nonnull state of stateType()
      Throws:
      Exception - if initialization fails
    • apply

      Object apply(T instance, Object state, Object command) throws Exception
      Computes replacement state from independently decoded state and command values.
      Parameters:
      instance - stateless reducer
      state - independent current state
      command - independent command
      Returns:
      nonnull replacement state of stateType()
      Throws:
      Exception - for a rejected business command
    • query

      Object query(T instance, Object state, Object query) throws Exception
      Computes a view from independently decoded state without changing live resource state.
      Parameters:
      instance - stateless reducer
      state - independent current state
      query - independent query
      Returns:
      view of viewType()
      Throws:
      Exception - if the query is rejected