org.apache.directory.mitosis.service
Class ClientConnectionManager

java.lang.Object
  extended by org.apache.directory.mitosis.service.ClientConnectionManager

 class ClientConnectionManager
extends java.lang.Object

Manages all outgoing connections to remote replicas. It gets the list of the peer Replicas from ReplicationService and keeps trying to connect to them.

When the connection attempt fails, the interval between each connection attempt doubles up (0, 2, 4, 8, 16, ...) to 60 seconds at maximum.

Once the connection attempt succeeds, the interval value is reset to its initial value (0 second) and the established connection is handled by ReplicationClientProtocolHandler. The ReplicationClientProtocolHandler actually wraps a ReplicationClientContextHandler that drives the actual replication process.


Constructor Summary
ClientConnectionManager(ReplicationService service)
           
 
Method Summary
 void replicate()
           
 void start(ReplicationConfiguration cfg)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientConnectionManager

ClientConnectionManager(ReplicationService service)
Method Detail

start

public void start(ReplicationConfiguration cfg)
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

replicate

public void replicate()