com.xensource.xenapi
public class Cluster extends XenAPIObject
| Modifier and Type | Class and Description |
|---|---|
static class |
Cluster.Record
Represents all the fields in a Cluster
|
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
ref
The XenAPI reference (OpaqueRef) to this object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToOtherConfig(Connection c,
java.lang.String key,
java.lang.String value)
Add the given key-value pair to the other_config field of the given Cluster.
|
static Cluster |
create(Connection c,
PIF PIF,
java.lang.String clusterStack,
java.lang.Boolean poolAutoJoin,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Creates a Cluster object and one Cluster_host object as its first member
Experimental.
|
static Task |
createAsync(Connection c,
PIF PIF,
java.lang.String clusterStack,
java.lang.Boolean poolAutoJoin,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Creates a Cluster object and one Cluster_host object as its first member
Experimental.
|
void |
destroy(Connection c)
Destroys a Cluster object and the one remaining Cluster_host member
Experimental.
|
Task |
destroyAsync(Connection c)
Destroys a Cluster object and the one remaining Cluster_host member
Experimental.
|
boolean |
equals(java.lang.Object obj)
If obj is a Cluster, compares XenAPI references for equality.
|
static java.util.Set<Cluster> |
getAll(Connection c)
Return a list of all the Clusters known to the system.
|
java.util.Set<Types.ClusterOperation> |
getAllowedOperations(Connection c)
Get the allowed_operations field of the given Cluster.
|
static java.util.Map<Cluster,Cluster.Record> |
getAllRecords(Connection c)
Return a map of Cluster references to Cluster records for all Clusters known to the system.
|
static Cluster |
getByUuid(Connection c,
java.lang.String uuid)
Get a reference to the Cluster instance with the specified UUID.
|
java.util.Map<java.lang.String,java.lang.String> |
getClusterConfig(Connection c)
Get the cluster_config field of the given Cluster.
|
java.util.Set<ClusterHost> |
getClusterHosts(Connection c)
Get the cluster_hosts field of the given Cluster.
|
java.lang.String |
getClusterStack(Connection c)
Get the cluster_stack field of the given Cluster.
|
java.lang.String |
getClusterToken(Connection c)
Get the cluster_token field of the given Cluster.
|
java.util.Map<java.lang.String,Types.ClusterOperation> |
getCurrentOperations(Connection c)
Get the current_operations field of the given Cluster.
|
Network |
getNetwork(Connection c)
Returns the network used by the cluster for inter-host communication, i.e.
|
Task |
getNetworkAsync(Connection c)
Returns the network used by the cluster for inter-host communication, i.e.
|
java.util.Map<java.lang.String,java.lang.String> |
getOtherConfig(Connection c)
Get the other_config field of the given Cluster.
|
java.util.Set<java.lang.String> |
getPendingForget(Connection c)
Get the pending_forget field of the given Cluster.
|
java.lang.Boolean |
getPoolAutoJoin(Connection c)
Get the pool_auto_join field of the given Cluster.
|
Cluster.Record |
getRecord(Connection c)
Get a record containing the current state of the given Cluster.
|
java.lang.Double |
getTokenTimeout(Connection c)
Get the token_timeout field of the given Cluster.
|
java.lang.Double |
getTokenTimeoutCoefficient(Connection c)
Get the token_timeout_coefficient field of the given Cluster.
|
java.lang.String |
getUuid(Connection c)
Get the uuid field of the given Cluster.
|
int |
hashCode() |
static Cluster |
poolCreate(Connection c,
Network network,
java.lang.String clusterStack,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Attempt to create a Cluster from the entire pool
Experimental.
|
static Task |
poolCreateAsync(Connection c,
Network network,
java.lang.String clusterStack,
java.lang.Double tokenTimeout,
java.lang.Double tokenTimeoutCoefficient)
Attempt to create a Cluster from the entire pool
Experimental.
|
void |
poolDestroy(Connection c)
Attempt to destroy the Cluster_host objects for all hosts in the pool and then destroy the Cluster.
|
Task |
poolDestroyAsync(Connection c)
Attempt to destroy the Cluster_host objects for all hosts in the pool and then destroy the Cluster.
|
void |
poolForceDestroy(Connection c)
Attempt to force destroy the Cluster_host objects, and then destroy the Cluster.
|
Task |
poolForceDestroyAsync(Connection c)
Attempt to force destroy the Cluster_host objects, and then destroy the Cluster.
|
void |
poolResync(Connection c)
Resynchronise the cluster_host objects across the pool.
|
Task |
poolResyncAsync(Connection c)
Resynchronise the cluster_host objects across the pool.
|
void |
removeFromOtherConfig(Connection c,
java.lang.String key)
Remove the given key and its corresponding value from the other_config field of the given Cluster.
|
void |
setOtherConfig(Connection c,
java.util.Map<java.lang.String,java.lang.String> otherConfig)
Set the other_config field of the given Cluster.
|
java.lang.String |
toWireString() |
isNullprotected final java.lang.String ref
public java.lang.String toWireString()
toWireString in class XenAPIObjectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic Cluster.Record getRecord(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Cluster getByUuid(Connection c, java.lang.String uuid) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
uuid - UUID of object to returnTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getUuid(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Set<ClusterHost> getClusterHosts(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Set<java.lang.String> getPendingForget(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getClusterToken(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.String getClusterStack(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Set<Types.ClusterOperation> getAllowedOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Map<java.lang.String,Types.ClusterOperation> getCurrentOperations(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.Boolean getPoolAutoJoin(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.Double getTokenTimeout(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.lang.Double getTokenTimeoutCoefficient(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Map<java.lang.String,java.lang.String> getClusterConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic java.util.Map<java.lang.String,java.lang.String> getOtherConfig(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void setOtherConfig(Connection c, java.util.Map<java.lang.String,java.lang.String> otherConfig) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
otherConfig - New value to setTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void addToOtherConfig(Connection c, java.lang.String key, java.lang.String value) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key - Key to addvalue - Value to addTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void removeFromOtherConfig(Connection c, java.lang.String key) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
key - Key to removeTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Task createAsync(Connection c, PIF PIF, java.lang.String clusterStack, java.lang.Boolean poolAutoJoin, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.InvalidClusterStack, Types.InvalidValue, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged
PIF - The PIF to connect the cluster's first cluster_host toclusterStack - simply the string 'corosync'. No other cluster stacks are currently supportedpoolAutoJoin - true if xapi is automatically joining new pool members to the clustertokenTimeout - Corosync token timeout in secondstokenTimeoutCoefficient - Corosync token timeout coefficient in secondsTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.InvalidClusterStackTypes.InvalidValueTypes.PifAllowsUnplugTypes.RequiredPifIsUnpluggedpublic static Cluster create(Connection c, PIF PIF, java.lang.String clusterStack, java.lang.Boolean poolAutoJoin, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.InvalidClusterStack, Types.InvalidValue, Types.PifAllowsUnplug, Types.RequiredPifIsUnplugged
PIF - The PIF to connect the cluster's first cluster_host toclusterStack - simply the string 'corosync'. No other cluster stacks are currently supportedpoolAutoJoin - true if xapi is automatically joining new pool members to the clustertokenTimeout - Corosync token timeout in secondstokenTimeoutCoefficient - Corosync token timeout coefficient in secondsTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.InvalidClusterStackTypes.InvalidValueTypes.PifAllowsUnplugTypes.RequiredPifIsUnpluggedpublic Task destroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterDoesNotHaveOneNode, Types.ClusterStackInUse
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.ClusterDoesNotHaveOneNodeTypes.ClusterStackInUsepublic void destroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterDoesNotHaveOneNode, Types.ClusterStackInUse
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.ClusterDoesNotHaveOneNodeTypes.ClusterStackInUsepublic Task getNetworkAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Network getNetwork(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Task poolCreateAsync(Connection c, Network network, java.lang.String clusterStack, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
network - the single network on which corosync carries out its inter-host communicationsclusterStack - simply the string 'corosync'. No other cluster stacks are currently supportedtokenTimeout - Corosync token timeout in secondstokenTimeoutCoefficient - Corosync token timeout coefficient in secondsTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static Cluster poolCreate(Connection c, Network network, java.lang.String clusterStack, java.lang.Double tokenTimeout, java.lang.Double tokenTimeoutCoefficient) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
network - the single network on which corosync carries out its inter-host communicationsclusterStack - simply the string 'corosync'. No other cluster stacks are currently supportedtokenTimeout - Corosync token timeout in secondstokenTimeoutCoefficient - Corosync token timeout coefficient in secondsTypes.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic Task poolForceDestroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterForceDestroyFailed
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.ClusterForceDestroyFailedpublic void poolForceDestroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterForceDestroyFailed
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.ClusterForceDestroyFailedpublic Task poolDestroyAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.ClusterStackInUseTypes.ClusteringDisabledTypes.ClusterHostIsLastpublic void poolDestroy(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException, Types.ClusterStackInUse, Types.ClusteringDisabled, Types.ClusterHostIsLast
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionTypes.ClusterStackInUseTypes.ClusteringDisabledTypes.ClusterHostIsLastpublic Task poolResyncAsync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic void poolResync(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static java.util.Set<Cluster> getAll(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcExceptionpublic static java.util.Map<Cluster,Cluster.Record> getAllRecords(Connection c) throws Types.BadServerResponse, Types.XenAPIException, org.apache.xmlrpc.XmlRpcException
Types.BadServerResponseTypes.XenAPIExceptionorg.apache.xmlrpc.XmlRpcException