com.cloudtran.replicator.isolator
Class ReplicatorIsolatorSide

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

public class ReplicatorIsolatorSide
extends Object

This is the main class for the replication on the isolator side.

It receives ReplicatorOutboundRequest.run actions, with an array of ReplicatorPackets to go to the other data center.

The layer beneath it is the DCConnectionManager, which handles the protocol to "the one" replicator at the other data center.

The main responsibility of this class is


Field Summary
static String ELECTER_CLASS_PROPERTY
           
static LocalStore localStore
           
static String LOCALSTORE_CLASS_PROPERTY
           
static String LOCALSTORE_ZONE
           
static String REMOTE_ADDRESSES
           
static String REPLICATOR_ENABLED_KEY
           
static String REPLICATOR_MEMBER_ID_KEY
           
static String REPLICATOR_STORE_ZONE
           
static String REPLICATOR_STORE_ZONE_KEY
           
static ReplicatorElecter replicatorElecter
           
 
Method Summary
static ReplicatorIsolatorSide get()
           
static LocalStore getLocalStore()
          Must initialize the ReplicatorIsolatorSide before calling this.
static void init()
          This is the place to initialise the Replicator at start of day.
static void isolatorElected()
          This is called when a new **isolator** is elected.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELECTER_CLASS_PROPERTY

public static final String ELECTER_CLASS_PROPERTY
See Also:
Constant Field Values

LOCALSTORE_CLASS_PROPERTY

public static final String LOCALSTORE_CLASS_PROPERTY
See Also:
Constant Field Values

REMOTE_ADDRESSES

public static final String REMOTE_ADDRESSES
See Also:
Constant Field Values

REPLICATOR_MEMBER_ID_KEY

public static final String REPLICATOR_MEMBER_ID_KEY
See Also:
Constant Field Values

REPLICATOR_ENABLED_KEY

public static final String REPLICATOR_ENABLED_KEY
See Also:
Constant Field Values

REPLICATOR_STORE_ZONE_KEY

public static final String REPLICATOR_STORE_ZONE_KEY
See Also:
Constant Field Values

replicatorElecter

public static ReplicatorElecter replicatorElecter

localStore

public static LocalStore localStore

REPLICATOR_STORE_ZONE

public static String REPLICATOR_STORE_ZONE

LOCALSTORE_ZONE

public static String LOCALSTORE_ZONE
Method Detail

init

public static void init()
This is the place to initialise the Replicator at start of day. Only call this once. It is not called if ReplicatorState !isEnabled. We specifically allow this to be called twice, because we run into timing problems between the StartIsolator thread on this node and the incoming "replicater elected" on another node


get

public static ReplicatorIsolatorSide get()

getLocalStore

public static LocalStore getLocalStore()
Must initialize the ReplicatorIsolatorSide before calling this.


isolatorElected

public static void isolatorElected()
                            throws TransactionExceptionNonRetriable
This is called when a new **isolator** is elected. It is called on the new primary isolator - i.e. CtHelper.getLocalMember() is the primary isolator. This happens at start of day and as part of repartitioning. This method is a "switchboard" - it spreads the word to the isolators and managers. Individual cluster members can also get the word from looking in the cache. The cache entry holding the primary replicator Id is locked while this is going on

Throws:
TransactionExceptionNonRetriable