org.jclouds.loadbalancer.internal
Class BaseLoadBalancerService
java.lang.Object
org.jclouds.loadbalancer.internal.BaseLoadBalancerService
- All Implemented Interfaces:
- LoadBalancerService
@Singleton
public class BaseLoadBalancerService
- extends Object
- implements LoadBalancerService
- Author:
- Lili Nadar, Adrian Cole
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
@Named(value="jclouds.loadbalancer")
protected Logger logger
defaultLocationSupplier
protected final com.google.common.base.Supplier<Location> defaultLocationSupplier
context
protected final LoadBalancerServiceContext context
loadBalancerStrategy
protected final LoadBalanceNodesStrategy loadBalancerStrategy
getLoadBalancerMetadataStrategy
protected final GetLoadBalancerMetadataStrategy getLoadBalancerMetadataStrategy
destroyLoadBalancerStrategy
protected final DestroyLoadBalancerStrategy destroyLoadBalancerStrategy
listLoadBalancersStrategy
protected final ListLoadBalancersStrategy listLoadBalancersStrategy
locations
protected final com.google.common.base.Supplier<Set<? extends Location>> locations
BaseLoadBalancerService
@Inject
protected BaseLoadBalancerService(com.google.common.base.Supplier<Location> defaultLocationSupplier,
LoadBalancerServiceContext context,
LoadBalanceNodesStrategy loadBalancerStrategy,
GetLoadBalancerMetadataStrategy getLoadBalancerMetadataStrategy,
DestroyLoadBalancerStrategy destroyLoadBalancerStrategy,
ListLoadBalancersStrategy listLoadBalancersStrategy,
com.google.common.base.Supplier<Set<? extends Location>> locations)
listAssignableLocations
public Set<? extends Location> listAssignableLocations()
- The list locations command returns all the valid locations for load balancers. A location has
a scope, which is typically region or zone. A region is a general area, like eu-west, where a
zone is similar to a datacenter. If a location has a parent, that implies it is within that
location. For example a location can be a rack, whose parent is likely to be a zone.
- Specified by:
listAssignableLocations
in interface LoadBalancerService
getContext
public LoadBalancerServiceContext getContext()
-
- Specified by:
getContext
in interface LoadBalancerService
- Returns:
- a reference to the context that created this LoadBalancerService.
createLoadBalancerInLocation
public LoadBalancerMetadata createLoadBalancerInLocation(@Nullable
Location location,
String loadBalancerName,
String protocol,
int loadBalancerPort,
int instancePort,
Iterable<? extends NodeMetadata> nodes)
- Specified by:
createLoadBalancerInLocation
in interface LoadBalancerService
- Parameters:
location
- null if defaultloadBalancerName
- Load balancer nameprotocol
- LoadBalancer transport protocol to use for routing - TCP or HTTP. This property
cannot be modified for the life of the LoadBalancer.loadBalancerPort
- The external TCP port of the LoadBalancer. Valid LoadBalancer ports are - 80, 443
and 1024 through 65535. This property cannot be modified for the life of the
LoadBalancer.instancePort
- The InstancePort data type is simple type of type: integer. It is the TCP port on
which the server on the instance is listening. Valid instance ports are one (1)
through 65535. This property cannot be modified for the life of the LoadBalancer.nodes
- nodes to loadbalance- See Also:
ComputeService
getLoadBalancerMetadata
public LoadBalancerMetadata getLoadBalancerMetadata(String id)
-
- Specified by:
getLoadBalancerMetadata
in interface LoadBalancerService
destroyLoadBalancer
public void destroyLoadBalancer(String id)
-
- Specified by:
destroyLoadBalancer
in interface LoadBalancerService
listLoadBalancers
public Set<? extends LoadBalancerMetadata> listLoadBalancers()
- Specified by:
listLoadBalancers
in interface LoadBalancerService
Copyright © 2009-2012 jclouds. All Rights Reserved.