Package com.tnsai.rag

Interface RetrievalEngine.Retriever

Enclosing class:
RetrievalEngine
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 static interface RetrievalEngine.Retriever
Backend operation implemented by the intelligence runtime.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Declares that this backend owns deadline checks because they must participate in its clock and failure-policy boundary.
    Executes retrieval for a validated request.
  • Method Details

    • retrieve

      RetrievalResult retrieve(RetrievalRequest request)
      Executes retrieval for a validated request.

      Implementations that return true from ownsDeadlineEnforcement() must evaluate cancellation and deadlines against one consistent clock before, between, and after blocking phases, and apply the request deadline to backend-native I/O timeouts. Other implementations retain the engine wrapper's entry and exit checks against the system clock.

      Parameters:
      request - validated retrieval request
      Returns:
      non-null retrieval result
    • ownsDeadlineEnforcement

      default boolean ownsDeadlineEnforcement()
      Declares that this backend owns deadline checks because they must participate in its clock and failure-policy boundary.
      Returns:
      true only when retrieve(com.tnsai.rag.RetrievalRequest) enforces every deadline