Interface FetchModelResult<M>

Type Parameters:
M - The fetched model type.

@Incubating @NullMarked public interface FetchModelResult<M>
Carries the result of a single model fetch operation.
Since:
9.3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<? extends Failure>
    Returns the failures that occurred during the fetch operation.
    @Nullable M
    Returns the fetched model.
  • Method Details

    • getModel

      @Incubating @Nullable M getModel()
      Returns the fetched model.
      Returns:
      the model, or null if the fetch operation failed
      Since:
      9.3.0
    • getFailures

      @Incubating Collection<? extends Failure> getFailures()
      Returns the failures that occurred during the fetch operation.

      Gradle attempts to reuse the same Failure instance when the same underlying failure is reported by multiple fetches in one build action. Clients can use reference identity to avoid processing such shared failures repeatedly.

      Returns:
      a collection of failures, empty if the fetch operation was successful
      Since:
      9.3.0