org.eclipse.aether.resolution

## 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:
    `RepositorySystemSession.getResolutionErrorPolicy()`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CACHE_ALL` Bit mask indicating that all resolution errors should be cached in the local repository.
    `static int` | `CACHE_DISABLED` Bit mask indicating that resolution errors should not be cached in the local repository.
    `static int` | `CACHE_NOT_FOUND` Bit flag indicating whether missing artifacts/metadata should be cached in the local repository.
    `static int` | `CACHE_TRANSFER_ERROR` Bit flag indicating whether connectivity/transfer errors (e.g. unreachable host, bad authentication) should be cached in the local repository.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getArtifactPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Artifact> request)` Gets the error policy for an artifact.
    `int` | `getMetadataPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Metadata> request)` Gets the error policy for some metadata.

- - ### Field Detail

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### 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:
        Constant Field Values

    - #### CACHE_ALL

          static final int CACHE_ALL

      Bit mask indicating that all resolution errors should be cached in the local repository.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getArtifactPolicy

          int getArtifactPolicy(RepositorySystemSession session,
                              ResolutionErrorPolicyRequest<Artifact> request)

      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

          int getMetadataPolicy(RepositorySystemSession session,
                              ResolutionErrorPolicyRequest<Metadata> request)

      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.

Copyright © 2010-2013 The Eclipse Foundation. All Rights Reserved.