Search in sources :

Example 6 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class StoreResourceDefinition method register.

@SuppressWarnings("deprecation")
@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    if (this.legacyPath != null) {
        parent.registerAlias(this.legacyPath, new SimpleAliasEntry(registration));
    }
    ResourceDescriptor descriptor = this.configurator.apply(new ResourceDescriptor(this.getResourceDescriptionResolver())).addAttributes(Attribute.class).addIgnoredAttributes(DeprecatedAttribute.class).addCapabilities(Capability.class).addRequiredSingletonChildren(StoreWriteThroughResourceDefinition.PATH);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(this);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        for (DeprecatedMetric metric : EnumSet.allOf(DeprecatedMetric.class)) {
            metric.register(registration);
        }
    }
    new StoreWriteBehindResourceDefinition().register(registration);
    new StoreWriteThroughResourceDefinition().register(registration);
    new StorePropertyResourceDefinition().register(registration);
    return registration;
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) RuntimeCapability(org.jboss.as.controller.capability.RuntimeCapability) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 7 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class StoreWriteBehindResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addIgnoredAttributes(DeprecatedAttribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(StoreWriteBehindServiceConfigurator::new);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    return registration;
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 8 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class JGroupsTransportResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = super.register(parent);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    return registration;
}
Also used : SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration)

Example 9 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class LockingResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler(LockingServiceConfigurator::new);
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (registration.isRuntimeOnlyRegistrationValid()) {
        for (DeprecatedMetric metric : EnumSet.allOf(DeprecatedMetric.class)) {
            metric.register(registration);
        }
    }
    return registration;
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ManagementResourceRegistration(org.jboss.as.clustering.controller.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 10 with SimpleAliasEntry

use of org.jboss.as.clustering.controller.SimpleAliasEntry in project wildfly by wildfly.

the class DynamicLoadProviderResourceDefinition method register.

@Override
public ManagementResourceRegistration register(ManagementResourceRegistration parent) {
    ManagementResourceRegistration registration = parent.registerSubModel(this);
    parent.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class);
    new LoadMetricResourceDefinition().register(registration);
    new CustomLoadMetricResourceDefinition().register(registration);
    new ReloadRequiredResourceRegistration(descriptor).register(registration);
    return registration;
}
Also used : SimpleAliasEntry(org.jboss.as.clustering.controller.SimpleAliasEntry) ReloadRequiredResourceRegistration(org.jboss.as.clustering.controller.ReloadRequiredResourceRegistration) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)14 ManagementResourceRegistration (org.jboss.as.clustering.controller.ManagementResourceRegistration)10 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)9 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)8 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)7 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)7 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)4 BinaryRequirementCapability (org.jboss.as.clustering.controller.BinaryRequirementCapability)1 Capability (org.jboss.as.clustering.controller.Capability)1 ReloadRequiredResourceRegistration (org.jboss.as.clustering.controller.ReloadRequiredResourceRegistration)1 RuntimeCapability (org.jboss.as.controller.capability.RuntimeCapability)1