public class ThreadSynchronizer
extends java.lang.Object
ClientThread
Constructor and Description |
---|
ThreadSynchronizer()
Construct a ThreadSynchronizer.
|
Modifier and Type | Method and Description |
---|---|
void |
commandsProcessed()
Waits until readyMap is empty.
|
int |
getCommand(java.lang.Object key)
Synchronizes access to the commands by the ClientThreads.
|
void |
setCommands(java.util.HashMap commands)
Issues a new set of commands.
|
void |
setReady(java.lang.Object key)
Removes a given key from the readyMap.
|
public void commandsProcessed()
public int getCommand(java.lang.Object key)
key
- An object that used as the key in the commands map.public void setCommands(java.util.HashMap commands)
commands
- HashMap representing the commands.public void setReady(java.lang.Object key)
key
- The key to be removed.