Class Api

  extended by com.cloudtran.replicator.Api

public class Api
extends Object

This is the generic API to the ReplicatorManagerSide. Currently it allows calls from within the manager and the Admin client (e.g. enable). (We may split these out eventually). This can run on any machine in the cluster. All requests go to the currently active replicator.

Constructor Summary
Method Summary
static void connect()
static void connect(DCConnection dcc)
static void pause()
static void pause(DCConnection dcc)
static void replicate(ManagerEvent event, NamedSemaphore semaphore)
          This method is part of the thread of control of a committing application so it guarantees that the message will be transmitted to the replicator service.
static void resynch(DCConnection dcc)
static void resynch(String desiredState)
          This method resynchronizes the replicator with its remote peer.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Api()
Method Detail


public static void replicate(ManagerEvent event,
                             NamedSemaphore semaphore)
This method is part of the thread of control of a committing application so it

event - the ManagerEvent sent to the loopback
semaphore - A semaphore that will be released when the message to the other data centre is either "on the wire" to the other data center or backed up securely. In the current implementation, the level of security is to store in backed-up memory (in SSD in production, or in isolator caches during developemnt).


public static void connect()


public static void connect(DCConnection dcc)


public static void pause()


public static void resynch(String desiredState)
This method resynchronizes the replicator with its remote peer. This is necessary at start of day (to figure out what sequence numbers to use) and if there is an error on the link. More generally, any change in state of the replicator - to stop, pause or continue with data flow - must be preceded by a resynch.

After resynching, the next state is give by desiredState, which should be "dataflow", "pause" or "stop".


public static void pause(DCConnection dcc)


public static void resynch(DCConnection dcc)