/** * Given an instance that is part of a cluster, returns the Cluster element of the cluster to which the * given instance belongs * @param targetName name of target * @return Cluster element to which this instance below */ public Cluster getClusterForInstance(String targetName) { return domain.getClusterForInstance(targetName); }
/** * Given an instance that is part of a cluster, returns the Cluster element of the cluster to which the * given instance belongs * @param targetName name of target * @return Cluster element to which this instance below */ public Cluster getClusterForInstance(String targetName) { return domain.getClusterForInstance(targetName); }
@Override public boolean isValid(ServiceLocator habitat, String target) { Domain domain = habitat.getService(Domain.class); return (domain.getClusterForInstance(target) != null); }
@Override public boolean isValid(Habitat habitat, String target) { Domain domain = habitat.getComponent(Domain.class); return (domain.getClusterForInstance(target) != null); }
private boolean clusterHas(SystemProperty sp) { Cluster c = domain.getClusterForInstance(server.getName()); return c != null ? hasSystemProperty(c.getSystemProperty(), sp) : false; }
private SystemProperty getClusterSystemProperty(String spName) { Cluster c = domain.getClusterForInstance(server.getName()); return c != null ? getSystemProperty(c.getSystemProperty(), spName) : null; }
public PropertyResolver(Domain domain, String instanceName) { _domain = domain; _server = _domain.getServerNamed(instanceName); if (_server != null) { _config = _domain.getConfigNamed(_server.getConfigRef()); } else { _config = _domain.getConfigNamed(instanceName); } _cluster = _domain.getClusterForInstance(instanceName); }
private boolean validateTarget(String target, CommandTarget targets[]) { List<String> validTarget = new ArrayList<String>(); for (CommandTarget commandTarget : targets) { validTarget.add(commandTarget.name()); } if (target.equals("domain")) { return validTarget.contains(CommandTarget.DOMAIN.name()); } else if (target.equals("server")) { return validTarget.contains(CommandTarget.DAS.name()); } else if (domain.getConfigNamed(target) != null) { return validTarget.contains(CommandTarget.CONFIG.name()); } else if (domain.getClusterNamed(target) != null) { return validTarget.contains(CommandTarget.CLUSTER.name()); } else if (domain.getServerNamed(target) != null) { return validTarget.contains(CommandTarget.STANDALONE_INSTANCE.name()); } else if (domain.getClusterForInstance(target) != null) { return validTarget.contains(CommandTarget.CLUSTERED_INSTANCE.name()); } else if (domain.getNodeNamed(target) != null) { return validTarget.contains(CommandTarget.NODE.name()); } return false; } }
public PropertyResolver(Domain domain, String instanceName) { _domain = domain; _server = _domain.getServerNamed(instanceName); if (_server != null) { _config = _domain.getConfigNamed(_server.getConfigRef()); } else { _config = _domain.getConfigNamed(instanceName); } _cluster = _domain.getClusterForInstance(instanceName); }
ServerPorts(Domain domain, Server theServer) { Cluster cluster = null; Config config = null; if (theServer.isInstance()) cluster = domain.getClusterForInstance(theServer.getName()); String configName = theServer.getConfigRef(); if (StringUtils.ok(configName)) config = domain.getConfigNamed(configName); initialize(cluster, config, domain, theServer); }
ServerPorts(Domain domain, Server theServer) { Cluster cluster = null; Config config = null; if (theServer.isInstance()) cluster = domain.getClusterForInstance(theServer.getName()); String configName = theServer.getConfigRef(); if (StringUtils.ok(configName)) config = domain.getConfigNamed(configName); initialize(cluster, config, domain, theServer); }
Cluster cluster = domain.getClusterForInstance(serverName); if (cluster != null) { // cluster is not null during create-local-instance --cluster c1 i1 if (!cluster.getConfigRef().equals(configRef)) {
Cluster cluster = domain.getClusterForInstance(serverName); if (cluster != null) { // cluster is not null during create-local-instance --cluster c1 i1 if (!cluster.getConfigRef().equals(configRef)) {
final Cluster containingCluster = domain.getClusterForInstance(target); if (containingCluster != null) { final ParameterMapExtractor extractor = new ParameterMapExtractor(command);
Cluster cluster = domain.getClusterForInstance(name); String clusterName = (cluster != null) ? cluster.getName() : null;
Cluster cluster = domain.getClusterForInstance(name); String clusterName = (cluster != null) ? cluster.getName() : null;
final ActionReport report = context.getActionReport(); Transaction t = Transaction.getTransaction(parent); Cluster cluster = domain.getClusterForInstance(child.getName()); boolean isStandAlone = cluster == null ? true : false;
Cluster c = domain.getClusterForInstance(targetName); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setMessage(adminStrings.getLocalString("commandrunner.executor.instanceopnotallowed",
Cluster c = domain.getClusterForInstance(targetName); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setMessage(adminStrings.getLocalString("commandrunner.executor.instanceopnotallowed",
final ActionReport report = context.getActionReport(); Transaction t = Transaction.getTransaction(parent); Cluster cluster = domain.getClusterForInstance(child.getName()); boolean isStandAlone = cluster == null ? true : false;