org.eclipse.aether.internal.impl

## Class DefaultUpdatePolicyAnalyzer

- java.lang.Object
- - org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer

- All Implemented Interfaces:
    UpdatePolicyAnalyzer, Service

      @Named
      @Component(role=UpdatePolicyAnalyzer.class)
      public class DefaultUpdatePolicyAnalyzer
      extends Object
      implements UpdatePolicyAnalyzer, Service

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultUpdatePolicyAnalyzer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getEffectiveUpdatePolicy(RepositorySystemSession session, String policy1, String policy2)` Returns the policy with the shorter update interval.
    `void` | `initService(ServiceLocator locator)` Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.
    `boolean` | `isUpdatedRequired(RepositorySystemSession session, long lastModified, String policy)` Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.
    `DefaultUpdatePolicyAnalyzer` | `setLoggerFactory(LoggerFactory loggerFactory)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultUpdatePolicyAnalyzer

          public DefaultUpdatePolicyAnalyzer()

  - ### Method Detail

    - #### initService

          public void initService(ServiceLocator locator)

      Description copied from interface: `Service`
      Provides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.
      Specified by:
        `initService` in interface `Service`
      Parameters:
        `locator` - The service locator, must not be `null`.

    - #### setLoggerFactory

          public DefaultUpdatePolicyAnalyzer setLoggerFactory(LoggerFactory loggerFactory)

    - #### getEffectiveUpdatePolicy

          public String getEffectiveUpdatePolicy(RepositorySystemSession session,
                                        String policy1,
                                        String policy2)

      Description copied from interface: `UpdatePolicyAnalyzer`
      Returns the policy with the shorter update interval.
      Specified by:
        `getEffectiveUpdatePolicy` in interface `UpdatePolicyAnalyzer`
      Parameters:
        `session` - The repository system session during which the request is made, must not be `null`.
        `policy1` - A policy to compare, may be `null`.
        `policy2` - A policy to compare, may be `null`.
      Returns:
        The policy with the shorter update interval.

    - #### isUpdatedRequired

          public boolean isUpdatedRequired(RepositorySystemSession session,
                                  long lastModified,
                                  String policy)

      Description copied from interface: `UpdatePolicyAnalyzer`
      Determines whether the specified modification timestamp satisfies the freshness constraint expressed by the given update policy.
      Specified by:
        `isUpdatedRequired` in interface `UpdatePolicyAnalyzer`
      Parameters:
        `session` - The repository system session during which the check is made, must not be `null`.
        `lastModified` - The timestamp to check against the update policy.
        `policy` - The update policy, may be `null`.
      Returns:
        `true` if the specified timestamp is older than acceptable by the update policy, `false` otherwise.

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