gr.uoa.di.madgik.commons.infra.nodeselection.random
Class RandomNodeSelector
java.lang.Object
gr.uoa.di.madgik.commons.infra.nodeselection.random.RandomNodeSelector
- All Implemented Interfaces:
- NodeSelector
public class RandomNodeSelector
- extends Object
- implements NodeSelector
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomNodeSelector
public RandomNodeSelector()
selectNode
public HostingNode selectNode(List<HostingNode> candidates)
- Description copied from interface:
NodeSelector
- Selects the most suitable node and marks the selection internally, if necessary
- Specified by:
selectNode in interface NodeSelector
- Parameters:
candidates - The candidate set of nodes
- Returns:
- The most suitable node
assessNodes
public List<HostingNodeInfo> assessNodes(List<HostingNode> candidates)
- Description copied from interface:
NodeSelector
- Assesses the suitability of the candidate set of nodes without keeping internal memory of node
selection.
- Specified by:
assessNodes in interface NodeSelector
- Parameters:
candidates - The candidate set of nodes
- Returns:
- A sorted list of the candidate set ordered by the most to the least suitable.
markSelected
public void markSelected(HostingNode node)
- Specified by:
markSelected in interface NodeSelector
Copyright © 2012. All Rights Reserved.