|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectec.eval.MasterProblemServer
public class MasterProblemServer
MasterProblemServer.java
The server awaits for incoming slaves to connect. Upon one such connection is established, the server creates and starts a worker thread to manage all the incoming communication from this slave.
Parameters
| eval.master.port int |
(the port where the slaves will connect) |
| eval.compression boolean |
(whether the communication with the slaves should be compressed or not) |
| eval.masterproblem.max-jobs-per-slave int |
(the maximum load (number of jobs) per slave at any point in time) |
| Field Summary | |
|---|---|
static java.lang.String |
P_EVALCOMPRESSION
|
static java.lang.String |
P_EVALMASTERPORT
|
static java.lang.String |
P_MAXIMUMNUMBEROFCONCURRENTJOBSPERSLAVE
|
java.net.ServerSocket |
servSock
The socket where slaves connect. |
SlaveMonitor |
slaveMonitor
|
EvolutionState |
state
|
boolean |
useCompression
Indicates whether compression is used over the socket IO streams. |
| Constructor Summary | |
|---|---|
MasterProblemServer(boolean showDebugInfo)
|
|
| Method Summary | |
|---|---|
void |
run()
The run method waits for incoming slaves, and launches new worker threads (one per incoming slave) to handle the communication with the slave. |
void |
setupServerFromDatabase(EvolutionState state)
After the MasterProblemServer is created, it needs to be told to initialize itself from information in the parameter database. |
void |
shutdown()
Indicates that the background thread is to shut down and closes the server socket. |
java.lang.Thread |
spawnThread()
Creates and starts a background thread for this server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String P_EVALMASTERPORT
public static final java.lang.String P_EVALCOMPRESSION
public static final java.lang.String P_MAXIMUMNUMBEROFCONCURRENTJOBSPERSLAVE
public SlaveMonitor slaveMonitor
public java.net.ServerSocket servSock
public boolean useCompression
public EvolutionState state
| Constructor Detail |
|---|
public MasterProblemServer(boolean showDebugInfo)
| Method Detail |
|---|
public void setupServerFromDatabase(EvolutionState state)
state - the evolution statepublic void shutdown()
public void run()
run in interface java.lang.Runnablepublic java.lang.Thread spawnThread()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||