public class MockCloud extends AbstractCloud
| Modifier and Type | Field and Description |
|---|---|
(package private) MockCloudContext |
cloudContext |
transactionsPROP_IGNOREVALIDATION, PROP_REQUEST, PROP_RESPONSE, PROP_SESSIONNAME, PROP_XMLMODE| Constructor and Description |
|---|
MockCloud(String n,
MockCloudContext cc,
UserContext uc) |
| Modifier and Type | Method and Description |
|---|---|
MockCloudContext |
getCloudContext()
Returns the context to which this cloud belongs.
|
NodeList |
getList(Query query)
Executes a query and returns the result as a Cluster Node List (also if the query is a
NodeQuery). |
Node |
getNode(int number)
Returns the node with the specified number from this cloud.
|
(package private) Node |
getNode(Map<String,Object> m,
NodeManager nm,
boolean n) |
NodeManager |
getNodeManager(String name)
Returns the specified node manager.
|
NodeManagerList |
getNodeManagers()
Returns all node managers available in this cloud.
|
boolean |
hasNode(int number)
Determines whether a node with the specified number exists in this cloud.
|
boolean |
hasNodeManager(String name)
Returns whether the specified node manager exists.
|
boolean |
hasRelationManager(NodeManager sourceManager,
NodeManager destinationManager,
String roleName)
Returns whether the specified relation manager exists.
|
boolean |
hasRelationManager(String roleName)
Returns whether the specified relation manager exists.
|
boolean |
hasRole(String roleName)
Returns whether the specified role exists.
|
protected Transaction |
newTransaction(String name) |
String |
toString() |
createAggregatedQuery, createNodeList, createNodeManagerList, createNodeQuery, createQuery, createRelationList, createRelationManagerList, createTransaction, createTransaction, createTransaction, getDescription, getFunction, getFunctions, getList, getLocale, getName, getNode, getNodeByAlias, getNodeManager, getNonTransactionalCloud, getPossibleContexts, getProperties, getProperty, getRelation, getRelation, getRelationManager, getRelationManager, getRelationManager, getRelationManager, getRelationManagers, getRelationManagers, getRelationManagers, getTransaction, getUser, hasNode, hasRelation, hasRelation, hasRelationManager, may, mayRead, mayRead, setLocale, setProperty, shutdownfinal MockCloudContext cloudContext
MockCloud(String n, MockCloudContext cc, UserContext uc)
Node getNode(Map<String,Object> m, NodeManager nm, boolean n)
public Node getNode(int number) throws NotFoundException
CloudNode with a reference to this
instance of Cloud.getNode in interface CloudgetNode in class AbstractCloudnumber - the number of the requested nodeNotFoundException - if the specified node could not be foundpublic boolean hasNode(int number)
CloudCloud.mayRead(int) to determine this.hasNode in interface CloudhasNode in class AbstractCloudnumber - the number of the nodepublic NodeManagerList getNodeManagers()
CloudgetNodeManagers in interface CloudgetNodeManagers in class AbstractCloudNodeManagerList containing all node managers
available in this cloud.public NodeManager getNodeManager(String name) throws NotFoundException
CloudgetNodeManager in interface CloudgetNodeManager in class AbstractCloudname - the name of the requested node managerNotFoundException - if the specified node manager could not be foundpublic boolean hasNodeManager(String name)
CloudhasNodeManager in interface CloudhasNodeManager in class AbstractCloudname - the name of the requested node managertrue if the specified node manager existspublic boolean hasRole(String roleName)
CloudhasRole in interface CloudhasRole in class AbstractCloudroleName - name of the roletrue if the specified role could be foundpublic boolean hasRelationManager(String roleName)
CloudhasRelationManager in interface CloudhasRelationManager in class AbstractCloudroleName - name of the roletrue if the specified relation manager existspublic boolean hasRelationManager(NodeManager sourceManager, NodeManager destinationManager, String roleName)
CloudhasRelationManager in interface CloudhasRelationManager in class AbstractCloudsourceManager - name of the node manager of the source nodedestinationManager - name of the node manager of the destination noderoleName - name of the roletrue if the specified relation manager could be foundpublic MockCloudContext getCloudContext()
CloudgetCloudContext in interface CloudgetCloudContext in class AbstractCloudCloudContext to which this cloud belongspublic NodeList getList(Query query)
CloudNodeQuery).getList in interface CloudgetList in class AbstractCloudquery - Query to executeSearchQueryprotected Transaction newTransaction(String name)
newTransaction in class AbstractCloudMMBase 1.9-SNAPSHOT - ${javadoctimestamp}