public abstract class ClusterManager extends Object implements AllEventListener, Runnable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
compatible17 |
protected int |
follownr
Followup number of message
|
protected Thread |
kicker
Thread which processes the messages
|
protected int |
lastRecievedMessage |
protected BlockingQueue<byte[]> |
nodesToSend
Queue with messages to send to other MMBase instances
|
protected BlockingQueue<byte[]> |
nodesToSpawn
Queue with received messages from other MMBase instances
|
protected Statistics |
receive |
protected Statistics |
send |
protected boolean |
spawnThreads |
| Constructor and Description |
|---|
ClusterManager() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
createMessage(Event event) |
protected String |
createMessage(String machine,
int nodenr,
String tableName,
String type)
Creates MMBase 1.7 parseable message.
|
protected void |
handleEvent(Event event) |
void |
notify(Event event) |
protected Event |
parseMessage(byte[] message) |
protected NodeEvent |
parseMessageBackwardCompatible(String message) |
protected void |
readConfiguration(Map<String,String> configuration) |
void |
run() |
void |
shutdown() |
protected void |
start()
Starts the Changer Thread.
|
protected abstract void |
startCommunicationThreads()
Subclasses should start the communication threads in this method
|
protected abstract void |
stopCommunicationThreads()
Subclasses should stop the communication threads in this method
|
protected final Statistics receive
protected final Statistics send
protected BlockingQueue<byte[]> nodesToSend
protected BlockingQueue<byte[]> nodesToSpawn
protected Thread kicker
protected boolean spawnThreads
protected boolean compatible17
protected int follownr
protected int lastRecievedMessage
public final void shutdown()
protected abstract void startCommunicationThreads()
protected abstract void stopCommunicationThreads()
public void notify(Event event)
notify in interface AllEventListenerprotected void start()
protected byte[] createMessage(Event event)
protected String createMessage(String machine, int nodenr, String tableName, String type)
machine - MMBase 'machine name'.nodenr - node numbertableName - node type (tablename)type - command typeprotected Event parseMessage(byte[] message)
public void run()
run in interface RunnableRunnable.run()protected void handleEvent(Event event)
event - MMBase 1.9-SNAPSHOT - ${javadoctimestamp}