org.jclouds.gogrid.services
Interface GridLoadBalancerClient


public interface GridLoadBalancerClient

Author:
Oleksiy Yarmula

Method Summary
 LoadBalancer addLoadBalancer(String name, IpPortPair virtualIp, List<IpPortPair> realIps, AddLoadBalancerOptions... options)
          Creates a load balancer with given properties.
 LoadBalancer deleteById(Long id)
          Deletes the load balancer by Id
 LoadBalancer deleteByName(String name)
          Deletes the load balancer by name; NOTE: Using this parameter may generate an error if one or more load balancers share a non-unique name.
 LoadBalancer editLoadBalancer(long id, List<IpPortPair> realIps)
          Edits the existing load balancer to change the real IP mapping.
 LoadBalancer editLoadBalancerNamed(String name, List<IpPortPair> realIps)
          Edits the existing load balancer to change the real IP mapping.
 Set<Option> getDatacenters()
          Retrieves the list of supported Datacenters to launch servers into.
 Set<LoadBalancer> getLoadBalancerList()
          Returns all load balancers found for the current user.
 Set<LoadBalancer> getLoadBalancersById(Long... ids)
          Returns the load balancer(s) by unique id(s).
 Set<LoadBalancer> getLoadBalancersByName(String... names)
          Returns the load balancer(s) by unique name(s).
 

Method Detail

getLoadBalancerList

Set<LoadBalancer> getLoadBalancerList()
Returns all load balancers found for the current user.

Returns:
load balancers found

getLoadBalancersByName

Set<LoadBalancer> getLoadBalancersByName(String... names)
Returns the load balancer(s) by unique name(s). Given a name or a set of names, finds one or multiple load balancers.

Parameters:
names - to get the load balancers
Returns:
load balancer(s) matching the name(s)

getLoadBalancersById

Set<LoadBalancer> getLoadBalancersById(Long... ids)
Returns the load balancer(s) by unique id(s). Given an id or a set of ids, finds one or multiple load balancers.

Parameters:
ids - to get the load balancers
Returns:
load balancer(s) matching the ids

addLoadBalancer

LoadBalancer addLoadBalancer(String name,
                             IpPortPair virtualIp,
                             List<IpPortPair> realIps,
                             AddLoadBalancerOptions... options)
Creates a load balancer with given properties.

Parameters:
name - name of the load balancer
virtualIp - virtual IP with IP address set in Ip.ip and port set in IpPortPair.port
realIps - real IPs to bind the virtual IP to, with IP address set in Ip.ip and port set in IpPortPair.port
options - options that specify load balancer's type (round robin, least load), persistence strategy, or description.
Returns:
created load balancer object

editLoadBalancer

LoadBalancer editLoadBalancer(long id,
                              List<IpPortPair> realIps)
Edits the existing load balancer to change the real IP mapping.

Parameters:
id - id of the existing load balancer
realIps - real IPs to bind the virtual IP to, with IP address set in Ip.ip and port set in IpPortPair.port
Returns:
edited object

editLoadBalancerNamed

LoadBalancer editLoadBalancerNamed(String name,
                                   List<IpPortPair> realIps)
Edits the existing load balancer to change the real IP mapping.

Parameters:
name - name of the existing load balancer
realIps - real IPs to bind the virtual IP to, with IP address set in Ip.ip and port set in IpPortPair.port
Returns:
edited object

deleteById

LoadBalancer deleteById(Long id)
Deletes the load balancer by Id

Parameters:
id - id of the load balancer to delete
Returns:
load balancer before the command is executed

deleteByName

LoadBalancer deleteByName(String name)
Deletes the load balancer by name; NOTE: Using this parameter may generate an error if one or more load balancers share a non-unique name.

Parameters:
name - name of the load balancer to be deleted
Returns:
load balancer before the command is executed

getDatacenters

Set<Option> getDatacenters()
Retrieves the list of supported Datacenters to launch servers into. The objects will have datacenter ID, name and description. In most cases, id or name will be used for addLoadBalancer(java.lang.String, org.jclouds.gogrid.domain.IpPortPair, java.util.List, org.jclouds.gogrid.options.AddLoadBalancerOptions...).

Returns:
supported datacenters


Copyright © 2009-2011 jclouds. All Rights Reserved.