xmlBlaster 1.6.2 contributions API

org.xmlBlaster.contrib.replication
Interface I_ReplSlave

All Superinterfaces:
I_ContribPlugin
All Known Implementing Classes:
ReplSlave

public interface I_ReplSlave
extends I_ContribPlugin

I_ReplSlave

Author:
Michele Laghi

Field Summary
static java.lang.String CASCADED_REPL_PREFIX
           
static java.lang.String CASCADED_REPL_SLAVE
           
static java.lang.String DBWATCHER_SESSION_NAME
           
static int STATUS_INCONSISTENT
           
static int STATUS_INITIAL
           
static int STATUS_NORMAL
           
static int STATUS_TRANSITION
           
static int STATUS_UNCONFIGURED
           
 
Method Summary
 void cancelInitialUpdate(boolean async)
           
 java.util.ArrayList check(java.util.ArrayList pushEntries, org.xmlBlaster.util.queue.I_Queue queue)
           
 void checkStatus()
          Checks on the backend data which has to be displayed on the MBean.
 int getMaxNumOfEntries()
           
 java.lang.String getReplPrefix()
           
 java.lang.String getSessionName()
           
 java.lang.String getStatus()
           
 int getStatusAsInt()
           
 void handleException(java.lang.Throwable ex)
          Pauses the dispatcher.
 void incrementPtPEntries(long numOfTransactions)
          Increments the amount of entries in the ptp counter queue
 void onDeadLetter(java.util.Map qosClientProperties)
          Invoked by the ReplManagerPlugin when a deadMessage is published because an error
 void postCheck(org.xmlBlaster.util.MsgUnit[] processedEntries)
           
 void prepareForRequest(I_Info individualInfo)
          3
 void reactivateDestination(long minReplKey, long maxReplKey)
          6 This is received by the DbWatcher jvm.
 boolean reInitiate(I_Info info)
           
 void requestInitialData(java.lang.String dbWatcherSessionId, boolean onlyRegister)
           
 boolean run(I_Info individualInfo, java.lang.String dbWatcherSessionId, java.lang.String cascadeReplPrefix, java.lang.String cascadeSlaveSessionName, boolean onlyRegister)
          Starts a replication
 boolean setDispatcher(boolean status)
           
 boolean setDispatcher(boolean status, boolean doPersist)
           
 void setSqlResponse(java.lang.String sqlResponse)
           
 
Methods inherited from interface org.xmlBlaster.contrib.I_ContribPlugin
getUsedPropertyKeys, init, shutdown
 

Field Detail

STATUS_UNCONFIGURED

public static final int STATUS_UNCONFIGURED
See Also:
Constant Field Values

STATUS_INITIAL

public static final int STATUS_INITIAL
See Also:
Constant Field Values

STATUS_TRANSITION

public static final int STATUS_TRANSITION
See Also:
Constant Field Values

STATUS_NORMAL

public static final int STATUS_NORMAL
See Also:
Constant Field Values

STATUS_INCONSISTENT

public static final int STATUS_INCONSISTENT
See Also:
Constant Field Values

DBWATCHER_SESSION_NAME

public static final java.lang.String DBWATCHER_SESSION_NAME
See Also:
Constant Field Values

CASCADED_REPL_SLAVE

public static final java.lang.String CASCADED_REPL_SLAVE
See Also:
Constant Field Values

CASCADED_REPL_PREFIX

public static final java.lang.String CASCADED_REPL_PREFIX
See Also:
Constant Field Values
Method Detail

run

public boolean run(I_Info individualInfo,
                   java.lang.String dbWatcherSessionId,
                   java.lang.String cascadeReplPrefix,
                   java.lang.String cascadeSlaveSessionName,
                   boolean onlyRegister)
            throws java.lang.Exception
Starts a replication

Parameters:
individualInfo -
dbWatcherSessionId -
cascadeReplPrefix - can be null
cascadeSlaveSessionName - can be null
onlyRegister - true, then it only registers the initial update (it will wait until an start comes)
Returns:
Throws:
java.lang.Exception

prepareForRequest

public void prepareForRequest(I_Info individualInfo)
                       throws java.lang.Exception
3

Throws:
java.lang.Exception

getStatus

public java.lang.String getStatus()

getReplPrefix

public java.lang.String getReplPrefix()

reInitiate

public boolean reInitiate(I_Info info)
                   throws java.lang.Exception
Throws:
java.lang.Exception

requestInitialData

public void requestInitialData(java.lang.String dbWatcherSessionId,
                               boolean onlyRegister)
                        throws java.lang.Exception
Throws:
java.lang.Exception

reactivateDestination

public void reactivateDestination(long minReplKey,
                                  long maxReplKey)
                           throws java.lang.Exception
6 This is received by the DbWatcher jvm. If the maxReplKey != (minReplKey+1), then it means somebody has written into the database while operating, This could result in inconsistencies in cases transaction isolation can not be assured.

Parameters:
minReplKey - the replication key taken before initiating the db side operation on the master.
maxReplKey - the replication key taken after initiating the db side operation on the master.
Throws:
java.lang.Exception

check

public java.util.ArrayList check(java.util.ArrayList pushEntries,
                                 org.xmlBlaster.util.queue.I_Queue queue)
                          throws java.lang.Exception
Throws:
java.lang.Exception

postCheck

public void postCheck(org.xmlBlaster.util.MsgUnit[] processedEntries)
               throws java.lang.Exception
Throws:
java.lang.Exception

setSqlResponse

public void setSqlResponse(java.lang.String sqlResponse)
Parameters:
sqlResponse - The sqlResponse to set.

handleException

public void handleException(java.lang.Throwable ex)
Pauses the dispatcher. and sets the message.


checkStatus

public void checkStatus()
Checks on the backend data which has to be displayed on the MBean.


getStatusAsInt

public int getStatusAsInt()

getSessionName

public java.lang.String getSessionName()

setDispatcher

public boolean setDispatcher(boolean status)

setDispatcher

public boolean setDispatcher(boolean status,
                             boolean doPersist)
                      throws java.lang.Exception
Throws:
java.lang.Exception

incrementPtPEntries

public void incrementPtPEntries(long numOfTransactions)
Increments the amount of entries in the ptp counter queue

Parameters:
numOfTransactions -

getMaxNumOfEntries

public int getMaxNumOfEntries()

onDeadLetter

public void onDeadLetter(java.util.Map qosClientProperties)
Invoked by the ReplManagerPlugin when a deadMessage is published because an error


cancelInitialUpdate

public void cancelInitialUpdate(boolean async)
                         throws java.lang.Exception
Throws:
java.lang.Exception

xmlBlaster 1.6.2 contributions API

Copyright © 1999-2007 The xmlBlaster.org contributers.