gr.uoa.di.madgik.commons.infra.collocationpolicy
Class SingleNodePolicy

java.lang.Object
  extended by gr.uoa.di.madgik.commons.infra.collocationpolicy.SingleNodePolicy
All Implemented Interfaces:
CollocationPolicy

public class SingleNodePolicy
extends java.lang.Object
implements CollocationPolicy

Author:
gerasimos.farantatos - DI NKUA

Nested Class Summary
 
Nested classes/interfaces inherited from interface gr.uoa.di.madgik.commons.infra.collocationpolicy.CollocationPolicy
CollocationPolicy.Type
 
Constructor Summary
SingleNodePolicy(NodeSelector selector)
           
 
Method Summary
 CollocationPolicy.Type getType()
           
 HostingNode selectNode(java.util.List<HostingNode> candidates)
           
 void setPenalty(float collocationPenalty)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleNodePolicy

public SingleNodePolicy(NodeSelector selector)
Method Detail

getType

public CollocationPolicy.Type getType()
Specified by:
getType in interface CollocationPolicy

setPenalty

public void setPenalty(float collocationPenalty)
                throws java.lang.Exception
Specified by:
setPenalty in interface CollocationPolicy
Throws:
java.lang.Exception

selectNode

public HostingNode selectNode(java.util.List<HostingNode> candidates)
                       throws java.lang.Exception
Specified by:
selectNode in interface CollocationPolicy
Throws:
java.lang.Exception