Interface Logic<D>

Type Parameters:
D - the type of data access interface passed to the logic execution method
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Logic<D>
Functional interface representing a unit of business logic executed within a DataHub scope.

Instances of this interface are passed to DataHub.run(Logic) for non-transactional execution or DataHub.txn(Logic) for transactional execution. The provided data access interface data gives access to data connections and resources needed during execution.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(D data)
    Executes the business logic using the provided data access interface.
  • Method Details

    • run

      void run(D data) throws com.github.sttk.errs.Err
      Executes the business logic using the provided data access interface.
      Parameters:
      data - the data access interface instance (typically a DataHub or custom data access interface)
      Throws:
      com.github.sttk.errs.Err - if an error occurs during logic execution