gr.uoa.di.madgik.commons.infra.nodeselection.ru
Class RUNodeSelector
java.lang.Object
gr.uoa.di.madgik.commons.infra.nodeselection.ru.RUNodeSelector
- All Implemented Interfaces:
- NodeSelector
- Direct Known Subclasses:
- LRUNodeSelector, MRUNodeSelector
public abstract class RUNodeSelector
- extends Object
- implements NodeSelector
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timingInfo
protected static Map<String,Long> timingInfo
tieBreakerSelector
protected NodeSelector tieBreakerSelector
RUNodeSelector
public RUNodeSelector()
RUNodeSelector
public RUNodeSelector(NodeSelector tieBreaker)
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
getRUNode
public abstract HostingNode getRUNode(List<HostingNode> candidates)
sortTimingInfo
public abstract Map<String,Long> sortTimingInfo()
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
main
public static void main(String[] args)
Copyright © 2013. All Rights Reserved.