Class StableServiceVersionResolver
- java.lang.Object
-
- org.openstack4j.model.common.resolvers.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
-
-
Field Summary
Fields Modifier and Type Field Description static StableServiceVersionResolver
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Access.Service
resolveV2(ServiceType type, SortedSet<? extends Access.Service> services)
Resolves to a single identity v2 service for the givenServiceType
and set of associatedservices
.Service
resolveV3(ServiceType type, SortedSet<? extends Service> services)
Resolves to a single identity v3 service for the givenServiceType
and set of associatedservices
.
-
-
-
Field Detail
-
INSTANCE
public static final StableServiceVersionResolver INSTANCE
-
-
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 givenServiceType
and set of associatedservices
.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 interfaceServiceVersionResolver
- Parameters:
type
- the type ofservices
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 givenServiceType
and set of associatedservices
.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 interfaceServiceVersionResolver
- Parameters:
type
- type the type ofservices
services
- the sorted by version set of service(s)- Returns:
- a single service
-
-