@Singleton public class BaseLoadBalancerService extends Object implements LoadBalancerService
Modifier and Type | Field and Description |
---|---|
protected LoadBalancerServiceContext |
context |
protected com.google.common.base.Supplier<Location> |
defaultLocationSupplier |
protected DestroyLoadBalancerStrategy |
destroyLoadBalancerStrategy |
protected GetLoadBalancerMetadataStrategy |
getLoadBalancerMetadataStrategy |
protected ListLoadBalancersStrategy |
listLoadBalancersStrategy |
protected LoadBalanceNodesStrategy |
loadBalancerStrategy |
protected com.google.common.base.Supplier<Set<? extends Location>> |
locations |
protected Logger |
logger |
Modifier | Constructor and Description |
---|---|
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) |
Modifier and Type | Method and Description |
---|---|
LoadBalancerMetadata |
createLoadBalancerInLocation(Location location,
String loadBalancerName,
String protocol,
int loadBalancerPort,
int instancePort,
Iterable<? extends NodeMetadata> nodes) |
void |
destroyLoadBalancer(String id) |
LoadBalancerServiceContext |
getContext() |
LoadBalancerMetadata |
getLoadBalancerMetadata(String id) |
Set<? extends Location> |
listAssignableLocations()
The list locations command returns all the valid locations for load balancers.
|
Set<? extends LoadBalancerMetadata> |
listLoadBalancers() |
protected final com.google.common.base.Supplier<Location> defaultLocationSupplier
protected final LoadBalancerServiceContext context
protected final LoadBalanceNodesStrategy loadBalancerStrategy
protected final GetLoadBalancerMetadataStrategy getLoadBalancerMetadataStrategy
protected final DestroyLoadBalancerStrategy destroyLoadBalancerStrategy
protected final ListLoadBalancersStrategy listLoadBalancersStrategy
@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)
public Set<? extends Location> listAssignableLocations()
listAssignableLocations
in interface LoadBalancerService
public LoadBalancerServiceContext getContext()
getContext
in interface LoadBalancerService
public LoadBalancerMetadata createLoadBalancerInLocation(@Nullable Location location, String loadBalancerName, String protocol, int loadBalancerPort, int instancePort, Iterable<? extends NodeMetadata> nodes)
createLoadBalancerInLocation
in interface LoadBalancerService
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 loadbalanceComputeService
public LoadBalancerMetadata getLoadBalancerMetadata(String id)
getLoadBalancerMetadata
in interface LoadBalancerService
public void destroyLoadBalancer(String id)
destroyLoadBalancer
in interface LoadBalancerService
public Set<? extends LoadBalancerMetadata> listLoadBalancers()
listLoadBalancers
in interface LoadBalancerService
Copyright © 2009-2012 jclouds. All Rights Reserved.