use of org.jboss.as.clustering.controller.ChildResourceProvider in project wildfly by wildfly.
the class RemoteCacheContainerResource method register.
@Override
public Registration register(String cache) {
ChildResourceProvider handler = this.apply(CHILD_TYPE);
handler.getChildren().add(cache);
return new Registration() {
@Override
public void close() {
handler.getChildren().remove(cache);
}
};
}
use of org.jboss.as.clustering.controller.ChildResourceProvider in project wildfly by wildfly.
the class CacheContainerResource method register.
@Override
public Registration register(String cache) {
ChildResourceProvider provider = this.apply(CHILD_TYPE);
provider.getChildren().add(cache);
return new Registration() {
@Override
public void close() {
provider.getChildren().remove(cache);
}
};
}
use of org.jboss.as.clustering.controller.ChildResourceProvider in project wildfly by wildfly.
the class SingletonPolicyResource method createProviders.
private static Map<String, ChildResourceProvider> createProviders() {
Map<String, ChildResourceProvider> providers = new HashMap<>();
providers.put(DEPLOYMENT_CHILD_TYPE, new SimpleChildResourceProvider(ConcurrentHashMap.newKeySet()));
providers.put(SERVICE_CHILD_TYPE, new SimpleChildResourceProvider(ConcurrentHashMap.newKeySet()));
return Collections.unmodifiableMap(providers);
}
use of org.jboss.as.clustering.controller.ChildResourceProvider in project wildfly by wildfly.
the class SingletonPolicyResource method register.
@Override
public Registration register(ServiceName service) {
boolean deployment = Services.JBOSS_DEPLOYMENT.isParentOf(service);
ChildResourceProvider provider = this.apply(deployment ? DEPLOYMENT_CHILD_TYPE : SERVICE_CHILD_TYPE);
String name = (deployment ? SingletonDeploymentResourceDefinition.pathElement(service) : SingletonServiceResourceDefinition.pathElement(service)).getValue();
provider.getChildren().add(name);
return new Registration() {
@Override
public void close() {
provider.getChildren().remove(name);
}
};
}
Aggregations