xmlBlaster 2.1.0 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.List<I_Entry> pushEntries, 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(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

static final int STATUS_UNCONFIGURED
See Also:
Constant Field Values

STATUS_INITIAL

static final int STATUS_INITIAL
See Also:
Constant Field Values

STATUS_TRANSITION

static final int STATUS_TRANSITION
See Also:
Constant Field Values

STATUS_NORMAL

static final int STATUS_NORMAL
See Also:
Constant Field Values

STATUS_INCONSISTENT

static final int STATUS_INCONSISTENT
See Also:
Constant Field Values

DBWATCHER_SESSION_NAME

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

CASCADED_REPL_SLAVE

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

CASCADED_REPL_PREFIX

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

run

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

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

Throws:
java.lang.Exception

getStatus

java.lang.String getStatus()

getReplPrefix

java.lang.String getReplPrefix()

reInitiate

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

requestInitialData

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

reactivateDestination

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

java.util.ArrayList check(java.util.List<I_Entry> pushEntries,
                          I_Queue queue)
                          throws java.lang.Exception
Throws:
java.lang.Exception

postCheck

void postCheck(MsgUnit[] processedEntries)
               throws java.lang.Exception
Throws:
java.lang.Exception

setSqlResponse

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

handleException

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


checkStatus

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


getStatusAsInt

int getStatusAsInt()

getSessionName

java.lang.String getSessionName()

setDispatcher

boolean setDispatcher(boolean status)

setDispatcher

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

incrementPtPEntries

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

Parameters:
numOfTransactions -

getMaxNumOfEntries

int getMaxNumOfEntries()

onDeadLetter

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


cancelInitialUpdate

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

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.