Search in sources :

Example 6 with SimpleResourceServiceHandler

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

the class StoreWriteThroughResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new StoreWriteThroughBuilder(address.getParent().getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.controller.registry.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 SimpleResourceServiceHandler

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

the class LockingResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    parentRegistration.registerAlias(LEGACY_PATH, new SimpleAliasEntry(registration));
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new LockingBuilder(address.getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (this.allowRuntimeOnlyRegistration) {
        new MetricHandler<>(new LockingMetricExecutor(), LockingMetric.class).register(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.controller.registry.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 SimpleResourceServiceHandler

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

the class NoStoreResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver());
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new NoStoreBuilder(address.getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Example 9 with SimpleResourceServiceHandler

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

the class PartitionHandlingResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new PartitionHandlingBuilder(address.getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
    if (this.allowRuntimeOnlyRegistration) {
        new OperationHandler<>(new PartitionHandlingOperationExecutor(), PartitionHandlingOperation.class).register(registration);
    }
    if (this.allowRuntimeOnlyRegistration) {
        new MetricHandler<>(new PartitionHandlingMetricExecutor(), PartitionHandlingMetric.class).register(registration);
    }
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.controller.registry.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 SimpleResourceServiceHandler

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

the class RandomElectionPolicyResourceDefinition method register.

@Override
public void register(ManagementResourceRegistration parentRegistration) {
    ManagementResourceRegistration registration = parentRegistration.registerSubModel(this);
    ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(ElectionPolicyResourceDefinition.Attribute.class).addCapabilities(ElectionPolicyResourceDefinition.Capability.class);
    ResourceServiceHandler handler = new SimpleResourceServiceHandler<>(address -> new RandomElectionPolicyBuilder(address.getParent()));
    new SimpleResourceRegistration(descriptor, handler).register(registration);
}
Also used : SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) SimpleResourceRegistration(org.jboss.as.clustering.controller.SimpleResourceRegistration) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SimpleResourceServiceHandler(org.jboss.as.clustering.controller.SimpleResourceServiceHandler) ResourceServiceHandler(org.jboss.as.clustering.controller.ResourceServiceHandler) ResourceDescriptor(org.jboss.as.clustering.controller.ResourceDescriptor)

Aggregations

ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)16 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)16 SimpleResourceServiceHandler (org.jboss.as.clustering.controller.SimpleResourceServiceHandler)16 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)16 SimpleResourceRegistration (org.jboss.as.clustering.controller.SimpleResourceRegistration)15 SimpleAliasEntry (org.jboss.as.clustering.controller.SimpleAliasEntry)7 UnaryRequirementCapability (org.jboss.as.clustering.controller.UnaryRequirementCapability)1 RuntimeCapability (org.jboss.as.controller.capability.RuntimeCapability)1