use of org.jboss.as.clustering.controller.ManagementResourceRegistration in project wildfly by wildfly.
the class BinaryKeyedJDBCStoreResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = super.register(parent);
registration.registerReadWriteAttribute(DeprecatedAttribute.TABLE.getDefinition(), LEGACY_READ_TABLE_HANDLER, LEGACY_WRITE_TABLE_HANDLER);
new BinaryTableResourceDefinition().register(registration);
return registration;
}
use of org.jboss.as.clustering.controller.ManagementResourceRegistration 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.ManagementResourceRegistration in project wildfly by wildfly.
the class FileStoreResourceDefinition method register.
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
ManagementResourceRegistration registration = super.register(parent);
PathManager pathManager = registration.getPathManager().orElse(null);
if (pathManager != null) {
ResolvePathHandler pathHandler = ResolvePathHandler.Builder.of(pathManager).setPathAttribute(Attribute.RELATIVE_PATH.getDefinition()).setRelativeToAttribute(Attribute.RELATIVE_TO.getDefinition()).build();
registration.registerOperationHandler(pathHandler.getOperationDefinition(), pathHandler);
}
return registration;
}
use of org.jboss.as.clustering.controller.ManagementResourceRegistration 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.ManagementResourceRegistration 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;
}
Aggregations