com.cloudtran.replicator.isolator
Class DCConnectionManager

java.lang.Object
  extended by com.cloudtran.replicator.isolator.DCConnectionManager

public class DCConnectionManager
extends Object

Currently, the DCConnectionManager doesn't have much of a role, because we only allow one DCConnection. Eventually, we will support multiple DCConnections, distinguished by the connection name or possibly the remote DC name, so that we can replicate different objects over different DCConnections. The replicator handles *all* connections to other data centres; one DCConnection handles traffic to one remote DC. As it stands right now, - we can have multiple inbound DC Connections - ALL OUTBOUND TRAFFIC GOES TO ALL DCConnections - replication request messages are put onto all the DCConnection's sendData queues.


Field Summary
static boolean connected
           
static Link connectedLink
           
static boolean connecting
           
static LinkInitializer initializer
           
static String LINK_INIT_CLASS_PROPERTY
           
static int pollPeriod
           
static int timeoutPeriod
           
 
Method Summary
static void addDCConnection(DCConnection dcc)
           
 void configure()
           
 void connect()
          This method is called the ReplicatorElection.run(), which is an Invocable.
static DCConnectionManager get()
           
 DCConnection getDefaultDC()
           
 void sendPackets(ReplicatorOutboundRequest requestFromManager)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINK_INIT_CLASS_PROPERTY

public static final String LINK_INIT_CLASS_PROPERTY
See Also:
Constant Field Values

pollPeriod

public static final int pollPeriod

timeoutPeriod

public static final int timeoutPeriod

initializer

public static LinkInitializer initializer

connectedLink

public static Link connectedLink

connected

public static boolean connected

connecting

public static boolean connecting
Method Detail

get

public static DCConnectionManager get()

getDefaultDC

public DCConnection getDefaultDC()

addDCConnection

public static void addDCConnection(DCConnection dcc)

configure

public void configure()

connect

public void connect()
This method is called the ReplicatorElection.run(), which is an Invocable. We don't want to hang around in there, so we start a separate thread to do the business.


sendPackets

public void sendPackets(ReplicatorOutboundRequest requestFromManager)