/** {@inheritDoc */ @Override public IgnoreDomainResourceTypeResource clone() { return new IgnoreDomainResourceTypeResource(this); }
@Override public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) { if (resultAction == OperationContext.ResultAction.KEEP) { if (booting) { resource.publish(); } } else if (!booting) { context.revertReloadRequired(); } } });
/** * Constructor for use by operation step handlers. * * @param type the name of the type some of whose resources are to be ignored * @param names the specific instances of type that should be ignored. Either {@link ModelType#LIST} * or {@link ModelType#UNDEFINED}; cannot be {@code null} * @param wildcard {@code true} if all resources of the type should be matched. Use {@code null} to indicate * this is undefined by the user, meaning {@code false} in practical effect */ public IgnoreDomainResourceTypeResource(String type, final ModelNode names, final Boolean wildcard) { super(ModelDescriptionConstants.IGNORED_RESOURCE_TYPE, type); setNames(names); setWildcard(wildcard); }
@Override public byte[] serializeIgnoreDomainTypeResource(Object object) throws IOException { //Happens in the app classloader IgnoreDomainResourceTypeResource entry = (IgnoreDomainResourceTypeResource)object; ModelNode model = entry.getModel().clone(); model.get("type").set(entry.getName()); return serializeModelNode(model); }
private IgnoreDomainResourceTypeResource(IgnoreDomainResourceTypeResource toCopy) { super(ModelDescriptionConstants.IGNORED_RESOURCE_TYPE, toCopy.getName()); synchronized (toCopy.model) { model.addAll(toCopy.model); } this.hasWildcard = toCopy.hasWildcard; this.parent = toCopy.parent; }
@Override public IgnoredDomainResourceRoot clone() { IgnoredDomainResourceRoot clone = new IgnoredDomainResourceRoot(ignoredRegistry); synchronized (children) { for (IgnoreDomainResourceTypeResource child : children.values()) { IgnoreDomainResourceTypeResource childClone = child.clone(); clone.registerChildInternal(childClone); } } return clone; }
/** * Returns whether this host should ignore operations from the master domain controller that target * the given address. * * @param address the resource address. Cannot be {@code null} * * @return {@code true} if the operation should be ignored; {@code false} otherwise */ public boolean isResourceExcluded(final PathAddress address) { boolean result = false; if (!localHostControllerInfo.isMasterDomainController() && address.size() > 0) { IgnoredDomainResourceRoot root = this.rootResource; PathElement firstElement = address.getElement(0); IgnoreDomainResourceTypeResource typeResource = root == null ? null : root.getChildInternal(firstElement.getKey()); if (typeResource != null) { result = typeResource.hasName(firstElement.getValue()); } } return result; }
/** * Constructor for use by operation step handlers. * * @param type the name of the type some of whose resources are to be ignored * @param names the specific instances of type that should be ignored. Either {@link org.jboss.dmr.ModelType#LIST} * or {@link org.jboss.dmr.ModelType#UNDEFINED}; cannot be {@code null} * @param wildcard {@code true} if all resources of the type should be matched. Use {@code null} to indicate * this is undefined by the user, meaning {@code false} in practical effect */ public IgnoreDomainResourceTypeResource(String type, final ModelNode names, final Boolean wildcard) { super(ModelDescriptionConstants.IGNORED_RESOURCE_TYPE, type); setNames(names); setWildcard(wildcard); }
private IgnoreDomainResourceTypeResource(IgnoreDomainResourceTypeResource toCopy) { super(ModelDescriptionConstants.IGNORED_RESOURCE_TYPE, toCopy.getName()); synchronized (toCopy.model) { model.addAll(toCopy.model); } this.hasWildcard = toCopy.hasWildcard; this.parent = toCopy.parent; }
@Override public byte[] serializeIgnoreDomainTypeResource(Object object) throws IOException { //Happens in the app classloader IgnoreDomainResourceTypeResource entry = (IgnoreDomainResourceTypeResource)object; ModelNode model = entry.getModel().clone(); model.get("type").set(entry.getName()); return serializeModelNode(model); }
@Override public IgnoredDomainResourceRoot clone() { IgnoredDomainResourceRoot clone = new IgnoredDomainResourceRoot(ignoredRegistry); synchronized (children) { for (IgnoreDomainResourceTypeResource child : children.values()) { IgnoreDomainResourceTypeResource childClone = child.clone(); clone.registerChildInternal(childClone); } } return clone; }
/** * Returns whether this host should ignore operations from the master domain controller that target * the given address. * * @param address the resource address. Cannot be {@code null} * * @return {@code true} if the operation should be ignored; {@code false} otherwise */ public boolean isResourceExcluded(final PathAddress address) { if (!localHostControllerInfo.isMasterDomainController() && address.size() > 0) { IgnoredDomainResourceRoot root = this.rootResource; PathElement firstElement = address.getElement(0); IgnoreDomainResourceTypeResource typeResource = root == null ? null : root.getChildInternal(firstElement.getKey()); if (typeResource != null) { if (typeResource.hasName(firstElement.getValue())) { return true; } } } return false; }
/** * Constructor for use by operation step handlers. * * @param type the name of the type some of whose resources are to be ignored * @param names the specific instances of type that should be ignored. Either {@link org.jboss.dmr.ModelType#LIST} * or {@link org.jboss.dmr.ModelType#UNDEFINED}; cannot be {@code null} * @param wildcard {@code true} if all resources of the type should be matched. Use {@code null} to indicate * this is undefined by the user, meaning {@code false} in practical effect */ public IgnoreDomainResourceTypeResource(String type, final ModelNode names, final Boolean wildcard) { super(ModelDescriptionConstants.IGNORED_RESOURCE_TYPE, type); setNames(names); setWildcard(wildcard); }
/** {@inheritDoc */ @Override public IgnoreDomainResourceTypeResource clone() { return new IgnoreDomainResourceTypeResource(this); }
private IgnoreDomainResourceTypeResource(IgnoreDomainResourceTypeResource toCopy) { super(ModelDescriptionConstants.IGNORED_RESOURCE_TYPE, toCopy.getName()); synchronized (toCopy.model) { model.addAll(toCopy.model); } this.hasWildcard = toCopy.hasWildcard; this.parent = toCopy.parent; }
@Override public void handleResult(OperationContext.ResultAction resultAction, OperationContext context, ModelNode operation) { if (resultAction == OperationContext.ResultAction.KEEP) { if (booting) { resource.publish(); } } else if (!booting) { context.revertReloadRequired(); } } });
@Override public IgnoredDomainResourceRoot clone() { IgnoredDomainResourceRoot clone = new IgnoredDomainResourceRoot(ignoredRegistry); synchronized (children) { for (IgnoreDomainResourceTypeResource child : children.values()) { IgnoreDomainResourceTypeResource childClone = child.clone(); clone.registerChildInternal(childClone); } } return clone; }
/** * Returns whether this host should ignore operations from the master domain controller that target * the given address. * * @param address the resource address. Cannot be {@code null} * * @return {@code true} if the operation should be ignored; {@code false} otherwise */ public boolean isResourceExcluded(final PathAddress address) { if (!localHostControllerInfo.isMasterDomainController() && address.size() > 0) { IgnoredDomainResourceRoot root = this.rootResource; PathElement firstElement = address.getElement(0); IgnoreDomainResourceTypeResource typeResource = root == null ? null : root.getChildInternal(firstElement.getKey()); if (typeResource != null) { if (typeResource.hasName(firstElement.getValue())) { return true; } } } return false; }