gr.uoa.di.madgik.commons.infra.nodeselection.ru
Class RUNodeSelector

java.lang.Object
  extended by 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


Field Summary
protected  NodeSelector tieBreakerSelector
           
protected static Map<String,Long> timingInfo
           
 
Constructor Summary
RUNodeSelector()
           
RUNodeSelector(NodeSelector tieBreaker)
           
 
Method Summary
 List<HostingNodeInfo> assessNodes(List<HostingNode> candidates)
          Assesses the suitability of the candidate set of nodes without keeping internal memory of node selection.
abstract  HostingNode getRUNode(List<HostingNode> candidates)
           
static void main(String[] args)
           
 void markSelected(HostingNode node)
           
 HostingNode selectNode(List<HostingNode> candidates)
          Selects the most suitable node and marks the selection internally, if necessary
abstract  Map<String,Long> sortTimingInfo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timingInfo

protected static Map<String,Long> timingInfo

tieBreakerSelector

protected NodeSelector tieBreakerSelector
Constructor Detail

RUNodeSelector

public RUNodeSelector()

RUNodeSelector

public RUNodeSelector(NodeSelector tieBreaker)
Method Detail

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 © 2012. All Rights Reserved.