xmlBlaster 2.2.0 API

org.xmlBlaster.contrib.replication.impl
Interface ReplManagerPluginMBean

All Known Implementing Classes:
ReplManagerPlugin

public interface ReplManagerPluginMBean


Method Summary
 java.lang.String activateSlaveDispatchers(java.lang.String replPrefix)
           
 void broadcastSql(java.lang.String repl, java.lang.String sql)
          Executes either a query or an update.
 void clearVersionCache()
           
 java.lang.String collectInitialUpdates(java.lang.String replicationPrefix)
          Sends a message to the initial updates to collect all requests of initial updates for this replPrefix.
 java.lang.String getInitialFilesLocation()
          Returns the (default) initialFileLocation which is the directory where the initial data is stored in case you want to transfer it per file.
 int getMaxNumOfEntries()
           
 long getNumOfRefreshes()
          Returns the number of refreshes occured (to get the status of the slaves).
 java.lang.String getReplications()
          Never returns null.
 java.lang.String getSlaves()
          Never returns null.
 long getStatusPollerInterval()
          This method returns the polling interval for retrieval of the status data of the slaves which has to be retrieved asynchronously in order not to block the monitor.
 long getStatusProcessingTime()
          Returns the time in milliseconds it took to retrieve all the status information for all the slaves.
 java.lang.String initiateReplication(java.lang.String slaveSessionName, java.lang.String prefixWithVersion, java.lang.String cascadeSlaveSessionName, java.lang.String cascadeReplPrefix, java.lang.String realInitialFilesLocation)
          Intiates the replication for the given slave.
 java.lang.String recreateTriggers(java.lang.String replPrefix)
          Recreates the triggers for the given replication source.
 java.lang.String reInitiate(java.lang.String replPrefix)
          This will start an initial update for all slaves replicating from the specified replPrefix.
 void removeSqlStatement(java.lang.String statementId)
           
 void setMaxNumOfEntries(int maxNumOfEntries)
           
 void setStatusPollerInterval(long statusPollerInterval)
          This method sets the polling interval for retrieval of the status data of the slaves which has to be retrieved asynchronously in order not to block the monitor.
 java.lang.String startBatchUpdate(java.lang.String replPrefix)
          Sends a message to the initial updater for the replPrefix that it can start the initial update for all collected (registered) slaves.
 java.lang.String stopSlaveDispatchers(java.lang.String replPrefix)
           
 java.lang.String transformVersion(java.lang.String replPrefix, java.lang.String destVersion, java.lang.String destination, java.lang.String srcData)
          Performs a version transformation from one version to the other.
 

Method Detail

getReplications

java.lang.String getReplications()
Never returns null. It returns a comma separated list of keys identifying the ongoing replications.

Returns:

getSlaves

java.lang.String getSlaves()
Never returns null. It returns a comma separated list of keys identifying the slaves using the replication manager.

Returns:

initiateReplication

java.lang.String initiateReplication(java.lang.String slaveSessionName,
                                     java.lang.String prefixWithVersion,
                                     java.lang.String cascadeSlaveSessionName,
                                     java.lang.String cascadeReplPrefix,
                                     java.lang.String realInitialFilesLocation)
Intiates the replication for the given slave. TODO Specify that the replicationKey (dbmasterid) must be short and DB conform. Usually called by Human being via JMX Console. The cascaded replication is the replication which will be automatically started once the initial update of the first replication is finished. This is used to concatenate replications. A typical usecase is in two way replication, then the initial update of the back replication can be automatically triggered once the initial update of the main replication is finished.

Parameters:
slaveSessionName -
replicationKey - This is the dbWatcher replication.prefix attribute.
cascadeSlaveSessionName - The Name of the session of the dbWriter to be used for the cascaded replication. Can be null.
cascadedReplicationPrefix - the prefix identifing the DbWatcher for the cascaded replication. Can be null.

recreateTriggers

java.lang.String recreateTriggers(java.lang.String replPrefix)
                                  throws java.lang.Exception
Recreates the triggers for the given replication source.

Parameters:
replPrefix - this is the same as specified in the configuration as 'replication.prefix' and it identifies a replication source.
Throws:
java.lang.Exception

broadcastSql

void broadcastSql(java.lang.String repl,
                  java.lang.String sql)
                  throws java.lang.Exception
Executes either a query or an update. Responses will come back asynchronously.

Parameters:
repl - The replication to which to send the request.
sql - The sql statement to perform (can either be a query or an update).
Throws:
java.lang.Exception - if either the repl or sql was null.

removeSqlStatement

void removeSqlStatement(java.lang.String statementId)

transformVersion

java.lang.String transformVersion(java.lang.String replPrefix,
                                  java.lang.String destVersion,
                                  java.lang.String destination,
                                  java.lang.String srcData)
                                  throws java.lang.Exception
Performs a version transformation from one version to the other.

Parameters:
replPrefix - The replication prefix of the source to be used.
destVersion - The desidered version on the destination
destination - The session name of the destination.
srcData - The content of the data to be transformed
Returns:
the transformed string.
Throws:
java.lang.Exception

clearVersionCache

void clearVersionCache()

getInitialFilesLocation

java.lang.String getInitialFilesLocation()
Returns the (default) initialFileLocation which is the directory where the initial data is stored in case you want to transfer it per file.

Returns:

getStatusPollerInterval

long getStatusPollerInterval()
This method returns the polling interval for retrieval of the status data of the slaves which has to be retrieved asynchronously in order not to block the monitor.

Returns:

setStatusPollerInterval

void setStatusPollerInterval(long statusPollerInterval)
This method sets the polling interval for retrieval of the status data of the slaves which has to be retrieved asynchronously in order not to block the monitor. If you set it to zero or a negative value it will not refresh.

Parameters:
statusPollerInterval -

getStatusProcessingTime

long getStatusProcessingTime()
Returns the time in milliseconds it took to retrieve all the status information for all the slaves.

Returns:

getNumOfRefreshes

long getNumOfRefreshes()
Returns the number of refreshes occured (to get the status of the slaves).

Returns:

reInitiate

java.lang.String reInitiate(java.lang.String replPrefix)
This will start an initial update for all slaves replicating from the specified replPrefix. Note that this operation only can be used if the slaves have already been initiated before. The registration for initial updates will be done automatically but you still have to manually start the batch update for all these slaves manually with the startBatchUpdate command to the same replPrefix.

Parameters:
replPrefix -
Returns:

startBatchUpdate

java.lang.String startBatchUpdate(java.lang.String replPrefix)
Sends a message to the initial updater for the replPrefix that it can start the initial update for all collected (registered) slaves. It will only use one single source per version, so if you have 10 Slaves interested in version 1.0 and 5 interested in version 2.0 only two sources (two exports) will be done.

Parameters:
replPrefix -
Returns:

collectInitialUpdates

java.lang.String collectInitialUpdates(java.lang.String replicationPrefix)
Sends a message to the initial updates to collect all requests of initial updates for this replPrefix.

Parameters:
replicationPrefix -
Returns:

activateSlaveDispatchers

java.lang.String activateSlaveDispatchers(java.lang.String replPrefix)

stopSlaveDispatchers

java.lang.String stopSlaveDispatchers(java.lang.String replPrefix)

setMaxNumOfEntries

void setMaxNumOfEntries(int maxNumOfEntries)

getMaxNumOfEntries

int getMaxNumOfEntries()

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.