|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectec.exchange.AbstractIslandExchangeServer
ec.exchange.IslandExchangeServer
public class IslandExchangeServer
The IslandExchangeServer is the class that manages the main server that coordinates all the islands. The class implements Runnable (for running on a different thread).
| Nested Class Summary | |
|---|---|
static class |
IslandExchangeServer.IslandExchangeIslandInfo
A class indicating all the information the server knows about a given island, including its mod, size, offset, and all the migrating islands it hooks to, etc. |
| Field Summary | |
|---|---|
static java.lang.String |
FOUND
The found message |
static int |
FOUND_TIMEOUT
How much to wait for the found message (on a non-blocking socket) |
static java.lang.String |
GOODBYE
The final message to be sent to all islands when an individual has been found |
static java.lang.String |
OKAY
The okay message |
static java.lang.String |
P_MAILBOX_CAPACITY
The size of the mailbox (for each of the subpopulations) |
static java.lang.String |
P_SERVER_PORT
The server port |
static java.lang.String |
RUN
The run message to be sent to the clients |
static int |
SLEEP_TIME
How much to sleep between checking for a FOUND message |
static java.lang.String |
SYNC
The synchronize message |
| Fields inherited from class ec.exchange.AbstractIslandExchangeServer |
|---|
global_modulo, global_offset, info, island_ids, numIslands, P_ID, P_ISLAND, P_MIGRATING_ISLAND, P_MODULO, P_NUM_INCOMING_MIGRATING_COUNTRIES, P_NUM_ISLANDS, P_NUM_MIGRATING_COUNTRIES, P_OFFSET, P_SELECT_METHOD, P_SELECT_TO_DIE_METHOD, P_SIZE, P_SYNCHRONOUS, synchronous |
| Constructor Summary | |
|---|---|
IslandExchangeServer()
|
|
| Method Summary | |
|---|---|
void |
run()
The main function running in the thread |
protected IslandInfo |
setupIslandInfo(EvolutionState state,
Parameter localBase,
Parameter islandBase)
Populates ECJ island info. |
void |
setupServerFromDatabase(EvolutionState state_p,
Parameter base)
This setup should get called from the IslandExchange setup method. |
java.lang.Thread |
spawnThread()
Here we spawn off the thread on ourselves |
| Methods inherited from class ec.exchange.AbstractIslandExchangeServer |
|---|
getIsland, islands, setupStandardIslandInfo |
| 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_SERVER_PORT
public static final java.lang.String P_MAILBOX_CAPACITY
public static final java.lang.String RUN
public static final int FOUND_TIMEOUT
public static final int SLEEP_TIME
public static final java.lang.String GOODBYE
public static final java.lang.String FOUND
public static final java.lang.String OKAY
public static final java.lang.String SYNC
| Constructor Detail |
|---|
public IslandExchangeServer()
| Method Detail |
|---|
public void setupServerFromDatabase(EvolutionState state_p,
Parameter base)
setupServerFromDatabase in class AbstractIslandExchangeServer
protected IslandInfo setupIslandInfo(EvolutionState state,
Parameter localBase,
Parameter islandBase)
setupIslandInfo in class AbstractIslandExchangeServerpublic 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 | |||||||||