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);
}
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);
}
}
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);
}
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);
}
}
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);
}
Aggregations