|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.contrib.replication.ReplSlave
public class ReplSlave
ReplSlave Used Topics:
Field Summary |
---|
Fields inherited from interface org.xmlBlaster.contrib.replication.I_ReplSlave |
---|
CASCADED_REPL_PREFIX, CASCADED_REPL_SLAVE, DBWATCHER_SESSION_NAME, STATUS_INCONSISTENT, STATUS_INITIAL, STATUS_NORMAL, STATUS_TRANSITION, STATUS_UNCONFIGURED |
Fields inherited from interface org.xmlBlaster.contrib.ContribConstants |
---|
FILE_DATE, FILENAME_ATTR, FILENAME_ATTR_OLD_FASHION, SUBDIR_ATTR, TIMESTAMP_ATTR, TOPIC_NAME |
Constructor Summary | |
---|---|
ReplSlave(org.xmlBlaster.util.Global global,
ReplManagerPlugin manager,
java.lang.String slaveSessionId,
org.xmlBlaster.util.qos.ConnectQosData connQosData)
|
Method Summary | |
---|---|
void |
cancelInitialUpdate()
TODO fix this since it potentially could delete request from other slaves since the DbWatcher is serving several slaves. |
void |
cancelInitialUpdate(boolean async)
TODO fix this since it potentially could delete request from other slaves since the DbWatcher is serving several slaves. |
java.util.ArrayList |
check(java.util.List<org.xmlBlaster.util.queue.I_Entry> entries,
org.xmlBlaster.util.queue.I_Queue queue)
|
void |
checkStatus()
Checks on the backend data which has to be displayed on the MBean. |
void |
clearQueue()
|
static byte[] |
decompressQueueEntryContent(org.xmlBlaster.engine.queuemsg.ReferenceEntry entry)
|
void |
doContinue(boolean doPersist)
|
void |
doPause(boolean doPersist)
|
java.lang.String |
dumpEntries(int maxNum,
long maxSize,
java.lang.String fileName)
|
java.lang.String |
dumpFirstEntry()
|
java.lang.String |
getCascadedConnection()
|
java.lang.String |
getCascadedMasterConnection()
|
long |
getCascadedQueueEntries()
|
java.lang.String |
getCascadedSessionName()
|
java.lang.String |
getCascadedStatus()
|
long |
getCascadedTransactionSeq()
|
java.lang.String |
getCascadedVersion()
|
java.lang.String |
getConnection()
Returns a string telling in which state the connection is. |
java.lang.String |
getLastMessage()
|
java.lang.String |
getMasterConnection()
|
int |
getMaxNumOfEntries()
|
long |
getMaxReplKey()
|
long |
getMinReplKey()
|
long |
getQueueEntries()
Convenience method enforced by the MBean which returns the number of entries in the queue. |
java.lang.String |
getReplPrefix()
|
java.lang.String |
getReplPrefixGroup()
|
java.lang.String |
getSessionName()
|
java.lang.String |
getSqlResponse()
|
java.lang.String |
getStatus()
|
int |
getStatusAsInt()
|
java.lang.String |
getTopic()
|
long |
getTransactionSeq()
|
java.util.Set |
getUsedPropertyKeys()
Gets all property keys which may be used by this object. |
java.lang.String |
getVersion()
|
void |
handleException(java.lang.Throwable ex)
Pauses the dispatcher. |
void |
incrementPtPEntries(long numOfTransactions)
Increments the amount of entries in the ptp counter queue |
void |
init(I_Info info)
The info comes as the client properties of the subscription Qos. |
boolean |
isActive()
Convenience method enforced by the MBean which returns true if the dispatcher of the slave session is active, false otherwise. |
boolean |
isCascadedActive()
|
boolean |
isCascadedConnected()
|
boolean |
isCascading()
|
boolean |
isConnected()
Convenience method enforced by the MBean which returns true if the real slave is connected or false otherwise. |
boolean |
isCountSingleMsg()
|
boolean |
isStalled()
Convenience method enforced by the MBean which returns true if the connection to the real slave is stalled or false otherwise. |
void |
kill()
|
void |
onDeadLetter(java.util.Map qosClientProperties)
Invoked by the ReplManagerPlugin when a deadMessage is published because an error |
void |
postCheck(org.xmlBlaster.util.MsgUnit[] processedMsgUnits)
|
void |
prepareForRequest(I_Info individualInfo)
This is the first step in the process of requesting the initial Data. |
void |
reactivateDestination(long minReplKey,
long maxReplKey)
6 This is received by the DbWatcher jvm. |
boolean |
reInitiate(I_Info info)
|
java.lang.String |
reInitiateReplication()
|
long |
removeQueueEntries(long entries)
|
void |
requestInitialData(java.lang.String dbWatcherSessionId,
boolean onlyRegister)
Sends a PtP message to the responsible for the initial update (which is the DbWatcher or an object running in the DbWatcher jvm) telling a new initial update has to be initiating. |
boolean |
run(I_Info info,
java.lang.String dbWatcherSessionId,
java.lang.String cascadeReplPrefix,
java.lang.String cascadeSlaveSessionName,
boolean onlyRegister)
Starts a replication |
void |
setCountSingleMsg(boolean countSingleMsg)
|
boolean |
setDispatcher(boolean status)
|
boolean |
setDispatcher(boolean status,
boolean doPersist)
|
void |
setMaxNumOfEntries(int maxNumOfEntries)
Sets the maximum number of entries to be sent in one single message. |
void |
setSqlResponse(java.lang.String sqlResponse)
|
void |
shutdown()
|
boolean |
toggleActive()
Toggles the dispatcher from active to inactive or vice versa. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReplSlave(org.xmlBlaster.util.Global global, ReplManagerPlugin manager, java.lang.String slaveSessionId, org.xmlBlaster.util.qos.ConnectQosData connQosData) throws org.xmlBlaster.util.XmlBlasterException
org.xmlBlaster.util.XmlBlasterException
Method Detail |
---|
public java.lang.String getTopic()
getTopic
in interface ReplSlaveMBean
public long getMinReplKey()
getMinReplKey
in interface ReplSlaveMBean
public long getMaxReplKey()
getMaxReplKey
in interface ReplSlaveMBean
public int getStatusAsInt()
getStatusAsInt
in interface I_ReplSlave
public java.lang.String getStatus()
getStatus
in interface I_ReplSlave
getStatus
in interface ReplSlaveMBean
public void init(I_Info info) throws java.lang.Exception
init
in interface I_ContribPlugin
java.lang.Exception
public boolean reInitiate(I_Info info) throws java.lang.Exception
reInitiate
in interface I_ReplSlave
java.lang.Exception
public boolean run(I_Info info, java.lang.String dbWatcherSessionId, java.lang.String cascadeReplPrefix, java.lang.String cascadeSlaveSessionName, boolean onlyRegister) throws java.lang.Exception
I_ReplSlave
run
in interface I_ReplSlave
info
- dbWatcherSessionId
- cascadeReplPrefix
- cascadeSlaveSessionName
- onlyRegister
- if true it only registers for initial update but does not execute it yet.
It will wait for a further (common) start message.
java.lang.Exception
public void prepareForRequest(I_Info individualInfo) throws java.lang.Exception
prepareForRequest
in interface I_ReplSlave
java.lang.Exception
I_ReplSlave.prepareForRequest(I_Info)
public void requestInitialData(java.lang.String dbWatcherSessionId, boolean onlyRegister) throws java.lang.Exception
requestInitialData
in interface I_ReplSlave
java.lang.Exception
org.xmlBlaster.contrib.replication.I_ReplSlave#requestInitialData()
public void reactivateDestination(long minReplKey, long maxReplKey) throws java.lang.Exception
I_ReplSlave
reactivateDestination
in interface I_ReplSlave
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.
java.lang.Exception
org.xmlBlaster.contrib.replication.I_ReplSlave#reactivateDestination()
public void shutdown()
shutdown
in interface I_ContribPlugin
org.xmlBlaster.contrib.dbwriter.I_ContribPlugin#shutdown()
public java.util.ArrayList check(java.util.List<org.xmlBlaster.util.queue.I_Entry> entries, org.xmlBlaster.util.queue.I_Queue queue) throws java.lang.Exception
check
in interface I_ReplSlave
java.lang.Exception
public java.lang.String getSqlResponse()
getSqlResponse
in interface ReplSlaveMBean
public void setSqlResponse(java.lang.String sqlResponse)
setSqlResponse
in interface I_ReplSlave
sqlResponse
- The sqlResponse to set.public java.util.Set getUsedPropertyKeys()
I_ContribPlugin
getUsedPropertyKeys
in interface I_ContribPlugin
I_ContribPlugin.getUsedPropertyKeys()
public boolean setDispatcher(boolean status)
setDispatcher
in interface I_ReplSlave
public final boolean setDispatcher(boolean status, boolean doPersist) throws java.lang.Exception
setDispatcher
in interface I_ReplSlave
java.lang.Exception
public void doContinue(boolean doPersist) throws java.lang.Exception
java.lang.Exception
org.xmlBlaster.contrib.replication.ReplSlaveMBean#doContinue()
public void doPause(boolean doPersist) throws java.lang.Exception
java.lang.Exception
org.xmlBlaster.contrib.replication.ReplSlaveMBean#doPause()
public void handleException(java.lang.Throwable ex)
I_ReplSlave
handleException
in interface I_ReplSlave
public boolean toggleActive() throws java.lang.Exception
toggleActive
in interface ReplSlaveMBean
java.lang.Exception
ReplSlaveMBean.toggleActive()
public void cancelInitialUpdate(boolean async) throws java.lang.Exception
cancelInitialUpdate
in interface I_ReplSlave
java.lang.Exception
public void cancelInitialUpdate() throws java.lang.Exception
cancelInitialUpdate
in interface ReplSlaveMBean
java.lang.Exception
public void clearQueue() throws java.lang.Exception
clearQueue
in interface ReplSlaveMBean
java.lang.Exception
public long removeQueueEntries(long entries) throws java.lang.Exception
removeQueueEntries
in interface ReplSlaveMBean
java.lang.Exception
public void kill() throws java.lang.Exception
kill
in interface ReplSlaveMBean
java.lang.Exception
public java.lang.String reInitiateReplication() throws java.lang.Exception
reInitiateReplication
in interface ReplSlaveMBean
java.lang.Exception
public java.lang.String getReplPrefix()
getReplPrefix
in interface I_ReplSlave
getReplPrefix
in interface ReplSlaveMBean
public java.lang.String getReplPrefixGroup()
getReplPrefixGroup
in interface ReplSlaveMBean
public java.lang.String getVersion()
getVersion
in interface ReplSlaveMBean
public boolean isActive()
isActive
in interface ReplSlaveMBean
public long getQueueEntries()
getQueueEntries
in interface ReplSlaveMBean
public boolean isConnected()
isConnected
in interface ReplSlaveMBean
public boolean isStalled()
public java.lang.String getSessionName()
getSessionName
in interface I_ReplSlave
getSessionName
in interface ReplSlaveMBean
public java.lang.String getLastMessage()
getLastMessage
in interface ReplSlaveMBean
public void checkStatus()
I_ReplSlave
checkStatus
in interface I_ReplSlave
public void postCheck(org.xmlBlaster.util.MsgUnit[] processedMsgUnits) throws java.lang.Exception
postCheck
in interface I_ReplSlave
java.lang.Exception
public long getTransactionSeq()
getTransactionSeq
in interface ReplSlaveMBean
public static byte[] decompressQueueEntryContent(org.xmlBlaster.engine.queuemsg.ReferenceEntry entry)
public java.lang.String dumpEntries(int maxNum, long maxSize, java.lang.String fileName)
dumpEntries
in interface ReplSlaveMBean
public java.lang.String dumpFirstEntry()
dumpFirstEntry
in interface ReplSlaveMBean
public boolean isCascading()
isCascading
in interface ReplSlaveMBean
public java.lang.String getCascadedSessionName()
getCascadedSessionName
in interface ReplSlaveMBean
public long getCascadedQueueEntries()
getCascadedQueueEntries
in interface ReplSlaveMBean
public long getCascadedTransactionSeq()
getCascadedTransactionSeq
in interface ReplSlaveMBean
public java.lang.String getCascadedStatus()
getCascadedStatus
in interface ReplSlaveMBean
public boolean isCascadedActive()
isCascadedActive
in interface ReplSlaveMBean
public boolean isCascadedConnected()
isCascadedConnected
in interface ReplSlaveMBean
public java.lang.String getCascadedVersion()
getCascadedVersion
in interface ReplSlaveMBean
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getConnection()
getConnection
in interface ReplSlaveMBean
public java.lang.String getMasterConnection()
getMasterConnection
in interface ReplSlaveMBean
public java.lang.String getCascadedConnection()
getCascadedConnection
in interface ReplSlaveMBean
public java.lang.String getCascadedMasterConnection()
getCascadedMasterConnection
in interface ReplSlaveMBean
public void incrementPtPEntries(long numOfTransactions)
I_ReplSlave
incrementPtPEntries
in interface I_ReplSlave
public void setCountSingleMsg(boolean countSingleMsg)
setCountSingleMsg
in interface ReplSlaveMBean
public boolean isCountSingleMsg()
isCountSingleMsg
in interface ReplSlaveMBean
public int getMaxNumOfEntries()
getMaxNumOfEntries
in interface I_ReplSlave
getMaxNumOfEntries
in interface ReplSlaveMBean
public void setMaxNumOfEntries(int maxNumOfEntries)
setMaxNumOfEntries
in interface ReplSlaveMBean
public void onDeadLetter(java.util.Map qosClientProperties)
I_ReplSlave
onDeadLetter
in interface I_ReplSlave
|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |