use of org.jboss.as.clustering.controller.SimpleResourceRegistration 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.SimpleResourceRegistration in project wildfly by wildfly.
the class JGroupsTransportResourceDefinition 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).addAttributes(ExecutorAttribute.class).addAttributes(DeprecatedAttribute.class).addCapabilities(Capability.class).addCapabilities(CLUSTERING_CAPABILITIES.values());
ResourceServiceHandler handler = new JGroupsTransportServiceHandler();
new SimpleResourceRegistration(descriptor, handler).register(registration);
}
use of org.jboss.as.clustering.controller.SimpleResourceRegistration 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.SimpleResourceRegistration 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.SimpleResourceRegistration 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);
}
}
Aggregations