Package xal.app.launcher
Class RoundRobinHostGenerator
- java.lang.Object
-
- xal.app.launcher.RoundRobinHostGenerator
-
- All Implemented Interfaces:
HostGenerator
public class RoundRobinHostGenerator extends Object implements HostGenerator
generates hosts via round robin
-
-
Field Summary
Fields Modifier and Type Field Description protected List<HostSetting>AVAILABLE_HOSTSthe list of available hosts
-
Constructor Summary
Constructors Constructor Description RoundRobinHostGenerator(List<HostSetting> hosts)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetIndexOfNextHost()get the index of the next hostStringgetType()get the type of the host generatorStringnextHost()get the next hostStringtoString()description of this generatorprotected StringtryNextHost(int trial)try to reach the next host
-
-
-
Field Detail
-
AVAILABLE_HOSTS
protected final List<HostSetting> AVAILABLE_HOSTS
the list of available hosts
-
-
Constructor Detail
-
RoundRobinHostGenerator
public RoundRobinHostGenerator(List<HostSetting> hosts)
Constructor
-
-
Method Detail
-
getIndexOfNextHost
protected int getIndexOfNextHost()
get the index of the next host
-
tryNextHost
protected String tryNextHost(int trial)
try to reach the next host
-
nextHost
public String nextHost()
get the next host- Specified by:
nextHostin interfaceHostGenerator
-
getType
public String getType()
get the type of the host generator- Specified by:
getTypein interfaceHostGenerator
-
-