org.jclouds.cloudloadbalancers.features
Interface NodeClient


public interface NodeClient

Provides synchronous access to CloudLoadBalancers Node features.

Author:
Dan Lo Bianco
See Also:
NodeAsyncClient,

Method Summary
 Set<Node> createNodesInLoadBalancer(Set<NodeRequest> nodes, int lbid)
          Create a new node with the configuration defined by the request.
 Node getNodeInLoadBalancer(int nid, int lbid)
           
 Set<Node> listNodes(int lbid)
           
 void removeNodeFromLoadBalancer(int nid, int lbid)
          Remove a node from the account.
 void removeNodesFromLoadBalancer(Set<Integer> nids, int lbid)
          Batch-remove nodes from the account.
 void updateAttributesForNodeInLoadBalancer(NodeAttributes attrs, int nid, int lbid)
          Update the properties of a node.
 

Method Detail

createNodesInLoadBalancer

Set<Node> createNodesInLoadBalancer(Set<NodeRequest> nodes,
                                    int lbid)
Create a new node with the configuration defined by the request.

When a node is added, it is assigned a unique identifier that can be used for mutating operations such as changing the condition or removing it. Every load balancer is dual-homed on both the public Internet and ServiceNet; as a result, nodes can either be internal ServiceNet addresses or addresses on the public Internet.

Parameters:
nodes - configurations to create
lbid - loadbalancer on which to create the nodes
Returns:
created nodes
Throws:
HttpResponseException - If the corresponding request cannot be fulfilled due to insufficient or invalid data

updateAttributesForNodeInLoadBalancer

void updateAttributesForNodeInLoadBalancer(NodeAttributes attrs,
                                           int nid,
                                           int lbid)
Update the properties of a node.

This operation asynchronously updates the attributes of the specified node. Upon successful validation of the request, the service will return a 202 (Accepted) response code. A caller can poll the load balancer with its ID to wait for the changes to be applied and the load balancer to return to an ACTIVE status.

Parameters:
attrs - what to change
nid - node to get
lbid - loadbalancer from which to get the node
See Also:
LoadBalancerAttributes.fromLoadBalancer(T)

listNodes

Set<Node> listNodes(int lbid)
Parameters:
lbid - id of the loadbalancer to get the nodes for
Returns:
all nodes for a given loadbalancer, or empty set if none available

getNodeInLoadBalancer

Node getNodeInLoadBalancer(int nid,
                           int lbid)
Parameters:
nid - node to get
lbid - loadbalancer from which to get the node
Returns:
details of the specified node, or null if not found

removeNodeFromLoadBalancer

void removeNodeFromLoadBalancer(int nid,
                                int lbid)
Remove a node from the account.

The remove load balancer function removes the specified load balancer and its associated configuration from the account. Any and all configuration data is immediately purged and is not recoverable.

Parameters:
nid - node to remove
lbid - loadbalancer from which to remove the node

removeNodesFromLoadBalancer

void removeNodesFromLoadBalancer(Set<Integer> nids,
                                 int lbid)
Batch-remove nodes from the account.

The current default limit is ten ids per request. Any and all configuration data is immediately purged and is not recoverable. By chance one of the items in the list cannot be removed due to its current status a 400:BadRequest is returned along with the ids of the ones the system identified as potential failures for this request

Parameters:
nids - nodes to remove
lbid - loadbalancer from which to remove the node


Copyright © 2009-2012 jclouds. All Rights Reserved.