|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.resource.cluster.ClusterKey
public class ClusterKey
A ClusterKey represents an AutoCluster of resources in a Cluster Hierarchy. Given the key it is
possible to determine specific membership of the AutoCluster at any time. It represents the Cluster
Root (a Compatible Group) and the hierarchy of resource cluster nodes. Each level of the hierarchy
represents a resource cluster node defined by a Plugin|ResourceType|ResourceKey tuple.
The ClusterKey has the following form:
Expressed iteratively: CompatibleGroupId::ResourceTypeId1:ResourceKey1::ResourceTypeId2:ResourceKey2:: ... ::ResourceTypeIdN:ResourceKeyN Expressed Recursively: Depth-1 AutoCluster CompatibleGroupId::ResourceTypeId1:ResourceKey1 Depth-N AutoCluster::ResourceTypeIdN:ResourceKeyN
| Nested Class Summary | |
|---|---|
static class |
ClusterKey.Node
Immutable class representing a node in an AutoCluster hierarchy. |
| Constructor Summary | |
|---|---|
ClusterKey(ClusterKey parentKey,
int childResourceTypeId,
java.lang.String childResourceKey)
Construct a new ClusterKey for a child AutoCluster of the provided parentKey |
|
ClusterKey(int clusterResourceGroupId)
Construct ClusterKey with to-be-defined Hierarcrhy |
|
ClusterKey(int clusterResourceGroupId,
int resourceTypeId,
java.lang.String resourceKey)
Construct ClusterKey for a top level AutoCluster |
|
| Method Summary | |
|---|---|
java.util.List<ClusterKey.Node> |
addChildToHierarchy(int childResourceTypeId,
java.lang.String childResourceKey)
Increase depth of hierarchy with new child node. |
boolean |
equals(java.lang.Object o)
|
int |
getClusterGroupId()
|
int |
getDepth()
|
java.util.List<ClusterKey.Node> |
getHierarchy()
|
java.lang.String |
getKey()
|
static int |
getResourceType(ClusterKey clusterKey)
|
int |
hashCode()
|
void |
setDepth(int newDepth)
|
java.lang.String |
toNamedString(javax.persistence.EntityManager em)
format: see class doc, used delimiters ClusterKey.DELIM_NODE and ClusterKey.DELIM. |
java.lang.String |
toString()
format: see class doc, used delimiters ClusterKey.DELIM_NODE and ClusterKey.DELIM |
static ClusterKey |
valueOf(java.lang.String clusterKey)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClusterKey(int clusterResourceGroupId)
public ClusterKey(int clusterResourceGroupId,
int resourceTypeId,
java.lang.String resourceKey)
public ClusterKey(ClusterKey parentKey,
int childResourceTypeId,
java.lang.String childResourceKey)
| Method Detail |
|---|
public int getClusterGroupId()
public java.util.List<ClusterKey.Node> getHierarchy()
public java.util.List<ClusterKey.Node> addChildToHierarchy(int childResourceTypeId,
java.lang.String childResourceKey)
childResourceTypeId - childResourceKey -
public int getDepth()
public void setDepth(int newDepth)
newDepth - > 0, keep only the hierarchy up to an including the specified depth.public java.lang.String getKey()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toNamedString(javax.persistence.EntityManager em)
public static ClusterKey valueOf(java.lang.String clusterKey)
public static int getResourceType(ClusterKey clusterKey)
clusterKey -
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||