/** * Gets the flags associated with this attribute. * @return the flags. Will not return {@code null} */ public Set<AttributeAccess.Flag> getFlags() { if (attributeAccess == null) { return Collections.emptySet(); } return attributeAccess.getFlags(); }
/** * Gets the flags associated with this attribute. * @return the flags. Will not return {@code null} */ public Set<AttributeAccess.Flag> getFlags() { if (attributeAccess == null) { return Collections.emptySet(); } return attributeAccess.getFlags(); }
/** * Gets the flags associated with this attribute. * @return the flags. Will not return {@code null} */ public Set<AttributeAccess.Flag> getFlags() { if (attributeAccess == null) { return Collections.emptySet(); } return attributeAccess.getFlags(); }
private boolean checkOperationForRestartRequired(final OperationContext context, final ModelNode operation) { boolean restart = false; final ImmutableManagementResourceRegistration registration = context.getResourceRegistration(); final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); // an example of this is toggling jts: // /profile=full/subsystem=transactions:write-attribute(name=jts, value=true) // previously on a reconnect to the DC the slave check would flag reload-required on a WRITE_ATTRIBUTE / UNDEFINE_ATTRIBUTE, // so would get flagged into reload-required, but it really should be restart-required to match what would happen doing it with the DC // online, and the registration of the jts attribute. final String opName = operation.get(OP).asString(); if (WRITE_ATTRIBUTE_OPERATION.equals(opName) || UNDEFINE_ATTRIBUTE_OPERATION.equals(opName)) { // look up the attribute name we're writing, and check the flags to see if we need restart. final String attributeName = operation.get(NAME).asString(); // look up if the attribute requires restart / reload if (registration.getAttributeAccess(address, attributeName).getFlags().contains(AttributeAccess.Flag.RESTART_JVM)) { restart = true; } } else { // all other ops final Set<OperationEntry.Flag> flags = registration.getOperationFlags(address, opName); if (flags.contains(OperationEntry.Flag.RESTART_JVM)) { restart = true; } } return restart; }
private boolean checkOperationForRestartRequired(final OperationContext context, final ModelNode operation) { boolean restart = false; final ImmutableManagementResourceRegistration registration = context.getResourceRegistration(); final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); // an example of this is toggling jts: // /profile=full/subsystem=transactions:write-attribute(name=jts, value=true) // previously on a reconnect to the DC the slave check would flag reload-required on a WRITE_ATTRIBUTE / UNDEFINE_ATTRIBUTE, // so would get flagged into reload-required, but it really should be restart-required to match what would happen doing it with the DC // online, and the registration of the jts attribute. final String opName = operation.get(OP).asString(); if (WRITE_ATTRIBUTE_OPERATION.equals(opName) || UNDEFINE_ATTRIBUTE_OPERATION.equals(opName)) { // look up the attribute name we're writing, and check the flags to see if we need restart. final String attributeName = operation.get(NAME).asString(); // look up if the attribute requires restart / reload if (registration.getAttributeAccess(address, attributeName).getFlags().contains(AttributeAccess.Flag.RESTART_JVM)) { restart = true; } } else { // all other ops final Set<OperationEntry.Flag> flags = registration.getOperationFlags(address, opName); if (flags.contains(OperationEntry.Flag.RESTART_JVM)) { restart = true; } } return restart; }
for (final String attributeName : attributeNames) { final AttributeAccess access = registry.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName); if (access == null || access.getFlags().contains(AttributeAccess.Flag.ALIAS) && !aliases) { continue; } else {
final AttributeAccess access = registry.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName); final AttributeDefinition ad = access.getAttributeDefinition(); if ((aliases || !access.getFlags().contains(AttributeAccess.Flag.ALIAS)) && (includeRutime || access.getStorageType() == AttributeAccess.Storage.CONFIGURATION) && (groupName == null || groupName.equals(ad.getAttributeGroup()))) {
if ((aliases || !access.getFlags().contains(AttributeAccess.Flag.ALIAS)) && (queryRuntime || access.getStorageType() == AttributeAccess.Storage.CONFIGURATION)) {
if ((aliases || !access.getFlags().contains(AttributeAccess.Flag.ALIAS)) && (queryRuntime || access.getStorageType() == AttributeAccess.Storage.CONFIGURATION)) {
final AttributeAccess access = registry.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName); final AttributeDefinition ad = access.getAttributeDefinition(); if ((aliases || !access.getFlags().contains(AttributeAccess.Flag.ALIAS)) && (includeRutime || access.getStorageType() == AttributeAccess.Storage.CONFIGURATION) && (groupName == null || groupName.equals(ad.getAttributeGroup()))) {
if ((aliases || !access.getFlags().contains(AttributeAccess.Flag.ALIAS)) && (queryRuntime || access.getStorageType() == AttributeAccess.Storage.CONFIGURATION)) {
attrNode.get(STORAGE).set(storage.toString()); if (accessType == AttributeAccess.AccessType.READ_WRITE) { Set<AttributeAccess.Flag> flags = access.getFlags(); if (flags.contains(AttributeAccess.Flag.RESTART_ALL_SERVICES)) { attrNode.get(RESTART_REQUIRED).set("all-services");
attrNode.get(STORAGE).set(storage.toString()); if (accessType == AttributeAccess.AccessType.READ_WRITE) { Set<AttributeAccess.Flag> flags = access.getFlags(); if (flags.contains(AttributeAccess.Flag.RESTART_ALL_SERVICES)) { attrNode.get(RESTART_REQUIRED).set("all-services");
attrNode.get(STORAGE).set(storage.toString()); if (accessType == AttributeAccess.AccessType.READ_WRITE) { Set<AttributeAccess.Flag> flags = access.getFlags(); if (flags.contains(AttributeAccess.Flag.RESTART_ALL_SERVICES)) { attrNode.get(RESTART_REQUIRED).set(ALL_SERVICES);
attrNode.get(STORAGE).set(storage.toString()); if (accessType == AttributeAccess.AccessType.READ_WRITE) { Set<AttributeAccess.Flag> flags = access.getFlags(); if (flags.contains(AttributeAccess.Flag.RESTART_ALL_SERVICES)) { attrNode.get(RESTART_REQUIRED).set(ALL_SERVICES);