Class StableServiceVersionResolver

  • All Implemented Interfaces:
    ServiceVersionResolver

    public final class StableServiceVersionResolver
    extends Object
    implements ServiceVersionResolver
    Resolves each service to the lowest version which we consider most stable and tested
    Author:
    Jeremy Unruh
    • Method Detail

      • resolveV3

        public Service resolveV3​(ServiceType type,
                                 SortedSet<? extends Service> services)
        Description copied from interface: ServiceVersionResolver
        Resolves to a single identity v3 service for the given ServiceType and set of associated services.

        For example if a deployment contains Compute/Nova version 2 and 2.1 then resolve would be invoked with the params of ServiceType.COMPUTE and a set of 2 services (Compute 2 and Compute 2.1). The resolver is responsible for picking the appropriate version

        Specified by:
        resolveV3 in interface ServiceVersionResolver
        Parameters:
        type - the type of services
        services - the sorted by version set of service(s)
        Returns:
        a single service
      • resolveV2

        public Access.Service resolveV2​(ServiceType type,
                                        SortedSet<? extends Access.Service> services)
        Description copied from interface: ServiceVersionResolver
        Resolves to a single identity v2 service for the given ServiceType and set of associated services.

        For example if a deployment contains Compute/Nova version 2 and 2.1 then resolve would be invoked with the params of ServiceType.COMPUTE and a set of 2 services (Compute 2 and Compute 2.1). The resolver is responsible for picking the appropriate version

        Specified by:
        resolveV2 in interface ServiceVersionResolver
        Parameters:
        type - type the type of services
        services - the sorted by version set of service(s)
        Returns:
        a single service