use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class BackupResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(TakeOfflineAttribute.class);
new RestartParentResourceRegistration(this.parentServiceConfiguratorFactory, descriptor).register(registration);
if (registration.isRuntimeOnlyRegistrationValid()) {
new OperationHandler<>(new BackupOperationExecutor(this.executors), BackupOperation.class).register(registration);
}
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class RemoteCacheContainerResourceDefinition method register.
@SuppressWarnings("deprecation")
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addAttributes(ListAttribute.class).addIgnoredAttributes(EnumSet.complementOf(EnumSet.of(DeprecatedAttribute.MODULE))).addAttributeTranslation(DeprecatedAttribute.MODULE, new ListAttributeTranslation(ListAttribute.MODULES)).addCapabilities(Capability.class).addRequiredChildren(ConnectionPoolResourceDefinition.PATH, ThreadPoolResourceDefinition.CLIENT.getPathElement(), SecurityResourceDefinition.PATH, RemoteTransactionResourceDefinition.PATH).addRequiredSingletonChildren(NoNearCacheResourceDefinition.PATH).setResourceTransformation(RemoteCacheContainerResource::new);
ServiceValueExecutorRegistry<RemoteCacheContainer> executors = new ServiceValueExecutorRegistry<>();
ResourceServiceHandler handler = new RemoteCacheContainerServiceHandler(this, executors);
new SimpleResourceRegistration(descriptor, handler).register(registration);
new ConnectionPoolResourceDefinition().register(registration);
new RemoteClusterResourceDefinition(this, executors).register(registration);
new SecurityResourceDefinition().register(registration);
new RemoteTransactionResourceDefinition().register(registration);
new InvalidationNearCacheResourceDefinition().register(registration);
new NoNearCacheResourceDefinition().register(registration);
ThreadPoolResourceDefinition.CLIENT.register(registration);
if (registration.isRuntimeOnlyRegistrationValid()) {
new MetricHandler<>(new RemoteCacheContainerMetricExecutor(executors), RemoteCacheContainerMetric.class).register(registration);
new RemoteCacheResourceDefinition(executors).register(registration);
}
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class TransactionResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
Capability dependentCapability = new BinaryRequirementCapability(InfinispanCacheRequirement.CACHE, BinaryCapabilityNameResolver.GRANDPARENT_PARENT);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addResourceCapabilityReference(new TransactionResourceCapabilityReference(dependentCapability, CommonRequirement.LOCAL_TRANSACTION_PROVIDER, Attribute.MODE, EnumSet.of(TransactionMode.NONE, TransactionMode.BATCH))).addResourceCapabilityReference(new TransactionResourceCapabilityReference(dependentCapability, TransactionRequirement.TRANSACTION_SYNCHRONIZATION_REGISTRY, Attribute.MODE, EnumSet.complementOf(EnumSet.of(TransactionMode.NON_XA)))).addResourceCapabilityReference(new TransactionResourceCapabilityReference(dependentCapability, TransactionRequirement.XA_RESOURCE_RECOVERY_REGISTRY, Attribute.MODE, EnumSet.complementOf(EnumSet.of(TransactionMode.FULL_XA))));
ResourceServiceHandler handler = new SimpleResourceServiceHandler(TransactionServiceConfigurator::new);
new SimpleResourceRegistration(descriptor, handler).register(registration);
if (registration.isRuntimeOnlyRegistrationValid()) {
for (DeprecatedMetric metric : EnumSet.allOf(DeprecatedMetric.class)) {
metric.register(registration);
}
}
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class TransportResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = parent.registerSubModel(this);
ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addCapabilities(CLUSTERING_CAPABILITIES.values());
new SimpleResourceRegistration(descriptor, this.handler).register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ResourceDescriptor in project wildfly by wildfly.
the class SecurityResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addCapabilities(Capability.class);
ResourceServiceHandler handler = new SimpleResourceServiceHandler(this);
new SimpleResourceRegistration(descriptor, handler).register(registration);
return registration;
}
Aggregations