use of org.jboss.as.test.clustering.cluster.singleton.service.NodeService in project wildfly by wildfly.
the class SingletonServiceActivator method install.
private static void install(ServiceTarget target, SingletonServiceBuilderFactory factory, ServiceName name, String preferredNode) {
InjectedValue<Group> group = new InjectedValue<>();
NodeService service = new NodeService(group);
factory.createSingletonServiceBuilder(name, service).electionPolicy(new PreferredSingletonElectionPolicy(new SimpleSingletonElectionPolicy(), new NamePreference(preferredNode))).build(target).addDependency(ServiceName.JBOSS.append("clustering", "group", "default"), Group.class, group).install();
}
Aggregations