|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.resource.group.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(ClusterKey parentKey,
int childResourceTypeId,
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,
String resourceKey)
Construct ClusterKey for a top level AutoCluster |
Method Summary | |
---|---|
List<ClusterKey.Node> |
addChildToHierarchy(int childResourceTypeId,
String childResourceKey)
Increase depth of hierarchy with new child node. |
boolean |
equals(Object o)
|
int |
getClusterGroupId()
|
int |
getDepth()
|
List<ClusterKey.Node> |
getHierarchy()
|
String |
getKey()
|
static int |
getResourceType(ClusterKey clusterKey)
|
int |
hashCode()
|
void |
setDepth(int newDepth)
|
String |
toString()
format: see class doc, used delimiters ClusterKey.DELIM_NODE and ClusterKey.DELIM |
static ClusterKey |
valueOf(String clusterKey)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClusterKey()
public ClusterKey(int clusterResourceGroupId)
public ClusterKey(int clusterResourceGroupId, int resourceTypeId, String resourceKey)
public ClusterKey(ClusterKey parentKey, int childResourceTypeId, String childResourceKey)
Method Detail |
---|
public int getClusterGroupId()
public List<ClusterKey.Node> getHierarchy()
public List<ClusterKey.Node> addChildToHierarchy(int childResourceTypeId, 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 String getKey()
public String toString()
toString
in class Object
public static ClusterKey valueOf(String clusterKey)
public static int getResourceType(ClusterKey clusterKey)
clusterKey
-
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |