jpl.mipl.mdms.web.domain
Interface ServerOrderer

All Known Implementing Classes:
ServerRatioOrderer

public interface ServerOrderer

Purpose: Interface for methods of ordering a set of domain file servers. Implementations will usually have some source for metric information from which results can be created.

   Copyright 2006, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2006.
   
 ============================================================================
 Modification History :
 ----------------------

 Date              Who              What
 ----------------------------------------------------------------------------
 08/10/2006        Nick             Initial Release
 ============================================================================
 

Version:
$Id: ServerOrderer.java,v 1.1 2006/09/29 18:51:18 ntt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Method Summary
 Comparator getComparator()
          Returns refernce to the comparator used by the instance
 List getServerList(String serverGroup)
          Returns a sorted list of servers for a given server group.
 List getServerList(String serverGroup, List currentOrder)
          Returns a sorted list of servers for a given server group, can use the current list parameter to make further decisions (i.e.
 Map getServerLists(String[] serverGroups)
          Returns a map from server group names to sorted lists of server names.
 

Method Detail

getComparator

Comparator getComparator()
Returns refernce to the comparator used by the instance

Returns:
Comparator

getServerLists

Map getServerLists(String[] serverGroups)
Returns a map from server group names to sorted lists of server names.

Parameters:
serverGroups - Array of servergroups which will be keys of the resulting map.
Returns:
Map server list map.

getServerList

List getServerList(String serverGroup)
Returns a sorted list of servers for a given server group.

Parameters:
serverGroup - Server group name
Returns:
Sorted list of servers of that group

getServerList

List getServerList(String serverGroup,
                   List currentOrder)
Returns a sorted list of servers for a given server group, can use the current list parameter to make further decisions (i.e. round robin, etc)

Parameters:
serverGroup - Server group name
currentOrder - A list of the current server order, can be null or empty.
Returns:
Sorted list of servers of that group