org.mmbase.clustering.unicast
Class ChangesSender

java.lang.Object
  extended by org.mmbase.clustering.unicast.ChangesSender
All Implemented Interfaces:
Runnable

public class ChangesSender
extends Object
implements Runnable

ChangesSender is a thread object sending the nodes found in the sending queue over unicast connections

Version:
$Id: ChangesSender.java 43065 2010-08-06 11:34:40Z michiel $
Author:
Nico Klasens, Michiel Meeuwissen

Nested Class Summary
static class ChangesSender.OtherMachine
           
 
Constructor Summary
ChangesSender(Map<String,String> configuration, int unicastPort, int unicastTimeout, BlockingQueue<byte[]> nodesToSend, Statistics send, int version)
          Construct UniCast Sender
 
Method Summary
protected  Iterable<ChangesSender.OtherMachine> getOtherMachines()
           
protected  int remove(ChangesSender.OtherMachine remove)
           
 void run()
           
 void setCollectCount(int cc)
          The maximum number of events to collect before starting to send (only if version >= 2)
 void setCollectTime(int ct)
          The maximum time (in second) to collect events before starting to send (only if version >= 2)
protected  void setOtherMachines(Iterable<ChangesSender.OtherMachine> om)
           
 void setOtherMachines(String s)
           
 void start()
           
(package private)  void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangesSender

public ChangesSender(Map<String,String> configuration,
                     int unicastPort,
                     int unicastTimeout,
                     BlockingQueue<byte[]> nodesToSend,
                     Statistics send,
                     int version)
Construct UniCast Sender

Parameters:
configuration - configuration of unicast
unicastPort - port of the unicast connections
unicastTimeout - timeout on the connections
nodesToSend - Queue of messages to send
send - Statistics
Method Detail

setOtherMachines

protected void setOtherMachines(Iterable<ChangesSender.OtherMachine> om)
Since:
MMBase-2.0

setOtherMachines

public void setOtherMachines(String s)
Since:
MMBase-2.0

setCollectTime

public void setCollectTime(int ct)
The maximum time (in second) to collect events before starting to send (only if version >= 2)

Since:
MMBase-2.0

setCollectCount

public void setCollectCount(int cc)
The maximum number of events to collect before starting to send (only if version >= 2)

Since:
MMBase-2.0

start

public void start()

stop

void stop()

run

public void run()
Specified by:
run in interface Runnable

remove

protected int remove(ChangesSender.OtherMachine remove)
Since:
MMBase-2.0

getOtherMachines

protected Iterable<ChangesSender.OtherMachine> getOtherMachines()
Since:
MMBase-2.0


MMBase 2.0-SNAPSHOT - null