Interface ResolutionErrorPolicy

All Known Implementing Classes:
SimpleResolutionErrorPolicy

public interface ResolutionErrorPolicy
Controls the caching of resolution errors for artifacts/metadata from remote repositories. If caching is enabled for a given resource, a marker will be set (usually somewhere in the local repository) to suppress repeated resolution attempts for the broken resource, thereby avoiding expensive but useless network IO. The error marker is considered stale once the repository's update policy has expired at which point a future resolution attempt will be allowed. Error caching considers the current network settings such that fixes to the configuration like authentication or proxy automatically trigger revalidation with the remote side regardless of the time elapsed since the previous resolution error.
See Also:
  • Field Details

    • CACHE_DISABLED

      static final int CACHE_DISABLED
      Bit mask indicating that resolution errors should not be cached in the local repository. This forces the system to always query the remote repository for locally missing artifacts/metadata.
      See Also:
    • CACHE_NOT_FOUND

      static final int CACHE_NOT_FOUND
      Bit flag indicating whether missing artifacts/metadata should be cached in the local repository. If caching is enabled, resolution will not be reattempted until the update policy for the affected resource has expired.
      See Also:
    • CACHE_TRANSFER_ERROR

      static final int CACHE_TRANSFER_ERROR
      Bit flag indicating whether connectivity/transfer errors (e.g. unreachable host, bad authentication) should be cached in the local repository. If caching is enabled, resolution will not be reattempted until the update policy for the affected resource has expired.
      See Also:
    • CACHE_ALL

      static final int CACHE_ALL
      Bit mask indicating that all resolution errors should be cached in the local repository.
      See Also:
  • Method Details

    • getArtifactPolicy

      Gets the error policy for an artifact.
      Parameters:
      session - The repository session during which the policy is determined, must not be null.
      request - The policy request holding further details, must not be null.
      Returns:
      The bit mask describing the desired error policy.
    • getMetadataPolicy

      Gets the error policy for some metadata.
      Parameters:
      session - The repository session during which the policy is determined, must not be null.
      request - The policy request holding further details, must not be null.
      Returns:
      The bit mask describing the desired error policy.