@Override public Set<OperationEntry.Flag> getOperationFlags(PathAddress address, String operationName) { return delegate.getOperationFlags(address, operationName); }
@Override public Set<OperationEntry.Flag> getOperationFlags(PathAddress address, String operationName) { return delegate.getOperationFlags(address, operationName); }
@Override public Set<OperationEntry.Flag> getOperationFlags(PathAddress address, String operationName) { return delegate.getOperationFlags(address, operationName); }
@Override public Set<OperationEntry.Flag> getOperationFlags(PathAddress address, String operationName) { return delegate.getOperationFlags(address, operationName); }
private Map<Set<ServerIdentity>, ModelNode> getServerOperations(OperationContext context, ModelNode domainOp, PathAddress domainOpAddress, boolean pushToServers) { Map<Set<ServerIdentity>, ModelNode> result = null; final PathAddress relativeAddress = domainOpAddress.subAddress(originalAddress.size()); if(! pushToServers) { Set<OperationEntry.Flag> flags = originalRegistration.getOperationFlags(relativeAddress, domainOp.require(OP).asString()); if (flags.contains(OperationEntry.Flag.READ_ONLY) && !flags.contains(OperationEntry.Flag.DOMAIN_PUSH_TO_SERVERS) && !flags.contains(OperationEntry.Flag.RUNTIME_ONLY)) { result = Collections.emptyMap(); } } if (result == null) { result = resolver.getServerOperations(context, domainOp, domainOpAddress); } return result; }
private Map<Set<ServerIdentity>, ModelNode> getServerOperations(OperationContext context, ModelNode domainOp, PathAddress domainOpAddress, boolean pushToServers) { Map<Set<ServerIdentity>, ModelNode> result = null; final PathAddress relativeAddress = domainOpAddress.subAddress(originalAddress.size()); if(! pushToServers) { Set<OperationEntry.Flag> flags = originalRegistration.getOperationFlags(relativeAddress, domainOp.require(OP).asString()); if (flags.contains(OperationEntry.Flag.READ_ONLY) && !flags.contains(OperationEntry.Flag.DOMAIN_PUSH_TO_SERVERS) && !flags.contains(OperationEntry.Flag.RUNTIME_ONLY)) { result = Collections.emptyMap(); } } if (result == null) { result = resolver.getServerOperations(context, domainOp, domainOpAddress); } return result; }
private Map<Set<ServerIdentity>, ModelNode> getServerOperations(ModelNode domainOp, PathAddress domainOpAddress, ModelNode domainModel, ModelNode hostModel) { Map<Set<ServerIdentity>, ModelNode> result = null; final PathAddress relativeAddress = domainOpAddress.subAddress(originalAddress.size()); Set<OperationEntry.Flag> flags = originalRegistration.getOperationFlags(relativeAddress, domainOp.require(OP).asString()); if (flags.contains(OperationEntry.Flag.READ_ONLY)) { result = Collections.emptyMap(); } if (result == null) { result = resolver.getServerOperations(domainOp, domainOpAddress, domainModel, hostModel); } return result; }
private Map<Set<ServerIdentity>, ModelNode> getServerOperations(OperationContext context, ModelNode domainOp, PathAddress domainOpAddress, boolean pushToServers) { Map<Set<ServerIdentity>, ModelNode> result = null; final PathAddress relativeAddress = domainOpAddress.subAddress(originalAddress.size()); if(! pushToServers) { Set<OperationEntry.Flag> flags = originalRegistration.getOperationFlags(relativeAddress, domainOp.require(OP).asString()); if (flags.contains(OperationEntry.Flag.READ_ONLY) && !flags.contains(OperationEntry.Flag.DOMAIN_PUSH_TO_SERVERS)) { result = Collections.emptyMap(); } } if (result == null) { result = resolver.getServerOperations(context, domainOp, domainOpAddress); } return result; }
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; }
Set<OperationEntry.Flag> flags = registry.getOperationFlags(PathAddress.EMPTY_ADDRESS, operation.require(OP).asString()); checkNull(operation, flags); if(flags.contains(OperationEntry.Flag.READ_ONLY)) { Set<OperationEntry.Flag> flags = registry.getOperationFlags(PathAddress.EMPTY_ADDRESS, operation.require(OP).asString()); checkNull(operation, flags); if (flags.contains(OperationEntry.Flag.READ_ONLY)) {
Set<OperationEntry.Flag> flags = registry.getOperationFlags(PathAddress.EMPTY_ADDRESS, operationName); checkNullFlags(operation, flags); if(flags.contains(OperationEntry.Flag.READ_ONLY) && !flags.contains(OperationEntry.Flag.DOMAIN_PUSH_TO_SERVERS)) { Set<OperationEntry.Flag> flags = registry.getOperationFlags(PathAddress.EMPTY_ADDRESS, operationName); checkNullFlags(operation, flags); if (flags.contains(OperationEntry.Flag.READ_ONLY) && !flags.contains(OperationEntry.Flag.DOMAIN_PUSH_TO_SERVERS)) {
boolean readOnly = context.getResourceRegistration().getOperationFlags(PathAddress.EMPTY_ADDRESS, operationName).contains(OperationEntry.Flag.READ_ONLY); ServiceController<?> service = context.getServiceRegistry(!readOnly).getService(serviceName); ActiveMQServer server = ActiveMQServer.class.cast(service.getValue());
boolean readOnly = context.getResourceRegistration().getOperationFlags(PathAddress.EMPTY_ADDRESS, operationName).contains(OperationEntry.Flag.READ_ONLY); ServiceController<?> service = context.getServiceRegistry(!readOnly).getService(serviceName); ActiveMQServer server = ActiveMQServer.class.cast(service.getValue());
final String queueName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue(); final ServiceName activeMQServiceName = MessagingServices.getActiveMQServiceName(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR))); boolean readOnly = context.getResourceRegistration().getOperationFlags(PathAddress.EMPTY_ADDRESS, operationName).contains(OperationEntry.Flag.READ_ONLY); ServiceController<?> activeMQService = context.getServiceRegistry(!readOnly).getService(activeMQServiceName); ActiveMQServer server = ActiveMQServer.class.cast(activeMQService.getValue());
final String queueName = PathAddress.pathAddress(operation.require(ModelDescriptionConstants.OP_ADDR)).getLastElement().getValue(); final ServiceName activeMQServiceName = MessagingServices.getActiveMQServiceName(PathAddress.pathAddress(operation.get(ModelDescriptionConstants.OP_ADDR))); boolean readOnly = context.getResourceRegistration().getOperationFlags(PathAddress.EMPTY_ADDRESS, operationName).contains(OperationEntry.Flag.READ_ONLY); ServiceController<?> activeMQService = context.getServiceRegistry(!readOnly).getService(activeMQServiceName); ActiveMQServer server = ActiveMQServer.class.cast(activeMQService.getValue());