Search in sources :

Example 6 with NodeSourcePolicy

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());
}
Also used : RMCore(org.ow2.proactive.resourcemanager.core.RMCore) RMMonitoringImpl(org.ow2.proactive.resourcemanager.frontend.RMMonitoringImpl) NodeSourceData(org.ow2.proactive.resourcemanager.db.NodeSourceData)

Example 7 with NodeSourcePolicy

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);
}
Also used : NodeSource(org.ow2.proactive.resourcemanager.nodesource.NodeSource) DefaultInfrastructureManager(org.ow2.proactive.resourcemanager.nodesource.infrastructure.DefaultInfrastructureManager) InfrastructureManager(org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManager) NodeSourcePolicy(org.ow2.proactive.resourcemanager.nodesource.policy.NodeSourcePolicy)

Aggregations

NodeSourcePolicy (org.ow2.proactive.resourcemanager.nodesource.policy.NodeSourcePolicy)5 NodeSource (org.ow2.proactive.resourcemanager.nodesource.NodeSource)3 BooleanWrapper (org.objectweb.proactive.core.util.wrapper.BooleanWrapper)2 Client (org.ow2.proactive.resourcemanager.authentication.Client)2 InfrastructureManager (org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManager)2 Before (org.junit.Before)1 UniqueID (org.objectweb.proactive.core.UniqueID)1 RMNodeSourceEvent (org.ow2.proactive.resourcemanager.common.event.RMNodeSourceEvent)1 RMCore (org.ow2.proactive.resourcemanager.core.RMCore)1 NodeSourceData (org.ow2.proactive.resourcemanager.db.NodeSourceData)1 RMMonitoringImpl (org.ow2.proactive.resourcemanager.frontend.RMMonitoringImpl)1 HostsPinger (org.ow2.proactive.resourcemanager.frontend.topology.pinging.HostsPinger)1 NodeSourceDescriptor (org.ow2.proactive.resourcemanager.nodesource.NodeSourceDescriptor)1 DefaultInfrastructureManager (org.ow2.proactive.resourcemanager.nodesource.infrastructure.DefaultInfrastructureManager)1 TopologyManager (org.ow2.proactive.resourcemanager.selection.topology.TopologyManager)1