use of org.ow2.proactive.resourcemanager.nodesource.policy.NodeSourcePolicy in project scheduling by ow2-proactive.
the class NodeSourceTest method createNodeSource.
private NodeSource createNodeSource(InfrastructureManager infrastructureManager, NodeSourcePolicy nodeSourcePolicy, Client client) {
NodeSourceData nodeSourceData = new NodeSourceData();
nodeSourceData.setProvider(client);
nodeSourceData.setNodesRecoverable(NODES_NOT_RECOVERABLE);
return new NodeSource("registrationURL", "name", infrastructureManager, nodeSourcePolicy, mock(RMCore.class), mock(RMMonitoringImpl.class), nodeSourceData.toNodeSourceDescriptor());
}
use of org.ow2.proactive.resourcemanager.nodesource.policy.NodeSourcePolicy in project scheduling by ow2-proactive.
the class RMCore method createNodeSourceInstance.
private NodeSource createNodeSourceInstance(NodeSourceDescriptor nodeSourceDescriptor) {
InfrastructureManager infrastructureManager = InfrastructureManagerFactory.create(nodeSourceDescriptor);
NodeSourcePolicy notActivePolicy = NodeSourcePolicyFactory.create(nodeSourceDescriptor.getPolicyType());
return new NodeSource(this.getUrl(), nodeSourceDescriptor.getName(), infrastructureManager, notActivePolicy, (RMCore) PAActiveObject.getStubOnThis(), this.monitoring, nodeSourceDescriptor);
}
Aggregations