xmlBlaster 2.2.0 API

org.xmlBlaster.contrib.replication
Class ReplSlave

java.lang.Object
  extended by org.xmlBlaster.contrib.replication.ReplSlave
All Implemented Interfaces:
ContribConstants, I_ContribPlugin, I_ReplSlave, ReplicationConstants, ReplSlaveMBean

public class ReplSlave
extends java.lang.Object
implements I_ReplSlave, ReplSlaveMBean, ReplicationConstants

ReplSlave Used Topics:

Author:
Michele Laghi

Field Summary
private  java.lang.String cascadedReplPrefix
           
private  java.lang.String cascadedReplSlave
           
private  long cbQueueEntries
          The real amount of entries in the cb queue (not calculated)
private static java.lang.String CONN_CONNECTED
           
private static java.lang.String CONN_DISCONNECTED
           
private static java.lang.String CONN_STALLED
           
private  boolean connected
           
private  boolean countSingleMessages
           
private  java.lang.String dataTopic
           
private  java.lang.String dbWatcherSessionName
           
private  boolean dispatcherActive
           
private  boolean doTransform
           
private  long forcedCounter
           
private  boolean forceSending
           
private  Global global
           
private  java.lang.String initialDataTopic
           
private  java.lang.String initialFilesLocation
           
(package private)  boolean initialized
           
private  java.lang.Object initSync
          we don't want to sync the check method because the jmx will synchronize on the object too
private  java.lang.String lastDispatcherException
           
private  java.lang.String lastMessage
           
private  java.lang.String lastMessageKey
           
private static java.util.logging.Logger log
           
private  ReplManagerPlugin manager
           
private  java.lang.String masterConn
           
private  long maxChunkSize
           
private  int maxNumOfEntries
           
private  java.lang.String maxNumOfEntriesKey
           
private  long maxReplKey
           
private  java.lang.Object mbeanHandle
           
private  long messageSeq
           
private  long minReplKey
           
private  java.lang.String name
           
private  java.lang.String oldReplKeyPropertyName
           
private  java.lang.String ownVersion
           
private  I_Info persistentInfo
           
private  long ptpQueueEntries
          used for monitoring: to know how many entries are ptp (normally initial updates)
private  I_Queue queue
          The queue associated to this slave.
private  long queueEntries
           
private  java.lang.String replPrefix
           
private  java.lang.String replPrefixGroup
           
private  java.lang.String sessionName
           
private  java.lang.String slaveSessionId
           
private  java.lang.String sqlResponse
           
private  java.lang.String srcVersion
           
private  boolean stalled
           
private  int status
           
private  java.lang.String statusTopic
           
private  int tmpStatus
          These properties are used to transport the information from the check to the postCheck method.
private  long[] transactionSeq
           
private  long transactionSeqVisible
           
 
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.replication.ReplicationConstants
ABSOLUTE_COUNT, ACTION_ATTR, ALREADY_PROCESSED_ATTR, ALTER_ACTION, CATALOG_ATTR, CONTRIB_PERSISTENT_MAP, CREATE_ACTION, DB_ID_ATTR, DELETE_ACTION, DROP_ACTION, DUMP_ACTION, DUMP_CONTENT_ATTR, DUMP_FILENAME, DUMP_POSTFIX, END_OF_TRANSITION, EXCEPTION_ATTR, EXTRA_REPL_KEY_ATTR, GUID_ATTR, INITIAL_DATA_END, INITIAL_DATA_END_TO_REMOTE, INITIAL_DATA_ID, INITIAL_DUMP_AS_XML, INITIAL_FILES_LOCATION, INITIAL_UPDATE_COLLECT, INITIAL_UPDATE_ONLY_REGISTER, INITIAL_UPDATE_START_BATCH, INITIAL_XML_CMD, INSERT_ACTION, KEEP_TRANSACTION_OPEN, MASTER_ATTR, MAX_ENTRIES_ATTR, MESSAGE_SEQ, NUM_OF_TRANSACTIONS, OLD_CONTENT_ATTR, PURPOSE_REPLICATION, REPL_KEY_ATTR, REPL_MANAGER_SESSION, REPL_MANAGER_TOPIC, REPL_PREFIX_DEFAULT, REPL_PREFIX_GROUP_KEY, REPL_PREFIX_KEY, REPL_REQUEST_CANCEL_UPDATE, REPL_REQUEST_RECREATE_TRIGGERS, REPL_REQUEST_UPDATE, REPL_VERSION, REPLICATION_CMD, REPLICATION_FORCE_SENDING, REPLICATION_MAX_ENTRIES_DEFAULT, REPLICATION_MAX_ENTRIES_KEY, REPLICATION_SEND_UNCHANGED_UPDATES, REPLICATION_VERSION, REQUEST_BROADCAST_SQL_TOPIC, REQUEST_CANCEL_UPDATE_TOPIC, REQUEST_INITIAL_DATA_TOPIC, REQUEST_RECREATE_TRIGGERS, RESPONSE_INITIAL_DATA_TOPIC, SCHEMA_ATTR, SIMPLE_MESSAGE, SLAVE_NAME, SQL_TOPIC_ATTR, STATEMENT_ACTION, STATEMENT_ATTR, STATEMENT_ID_ATTR, STATEMENT_PRIO_ATTR, SUPPORTED_VERSIONS, TABLE_NAME_ATTR, TRANSACTION_ATTR, TRANSACTION_SEQ, UPDATE_ACTION, VERSION_ATTR, VERSION_TOKEN
 
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(Global global, ReplManagerPlugin manager, java.lang.String slaveSessionId, 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.
private  void cancelUpdateAsyncPart()
          The cancelUpdate is invoked asynchronously to avoid log blocking of the monitor when the cancel operation is going on.
private  void changeLastMessage(java.lang.String newMsg)
           
 java.util.ArrayList check(java.util.List<I_Entry> entries, I_Queue queue)
           
 void checkStatus()
          Checks on the backend data which has to be displayed on the MBean.
 void clearQueue()
           
private  long clearQueueSync()
           
static byte[] decompressQueueEntryContent(ReferenceEntry entry)
           
 void doContinue(boolean doPersist)
           
 void doPause(boolean doPersist)
           
private  void doTransform(MsgUnit msgUnit)
           
 java.lang.String dumpEntries(int maxNum, long maxSize, java.lang.String fileName)
           
 java.lang.String dumpFirstEntry()
           
private  ReplSlave getCascaded()
          Returns null if the manager is null or if the cascaded object does not exist.
 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.
private  ServerScope getEngineGlobal(Global glob)
           
 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()
           
private  I_AdminSession getSession()
           
 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.
private  void initTransactionSequenceIfNeeded(java.lang.String warnText)
          This method is needed since in some cases writing operations on the counters can occur before the init method has been invoked.
 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(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
private  void sendStatusInformation(java.lang.String status)
           
 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.
private  void setMaxReplKey(long replKey, long[] transKey, long msgKey, long minReplKey, long ptpQueueEntries)
          Note that the transKey shall not be the transactionSeq instance otherwise it will never detect a change
 void setSqlResponse(java.lang.String sqlResponse)
           
private  void setStatus(int status)
           
 void shutdown()
           
private  void startCascadedAndChangeStatus()
           
private  java.lang.String storeChunkLocally(ReferenceEntry entry, ClientProperty location, ClientProperty subDirProp)
          Returns the name of the directory where the entries have been stored.
 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
 

Field Detail

log

private static java.util.logging.Logger log

CONN_STALLED

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

CONN_CONNECTED

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

CONN_DISCONNECTED

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

slaveSessionId

private java.lang.String slaveSessionId

name

private java.lang.String name

statusTopic

private java.lang.String statusTopic

dataTopic

private java.lang.String dataTopic

global

private Global global

initialized

boolean initialized

minReplKey

private long minReplKey

maxReplKey

private long maxReplKey

status

private int status

mbeanHandle

private java.lang.Object mbeanHandle

sqlResponse

private java.lang.String sqlResponse

forceSending

private boolean forceSending

persistentInfo

private I_Info persistentInfo

oldReplKeyPropertyName

private java.lang.String oldReplKeyPropertyName

dbWatcherSessionName

private java.lang.String dbWatcherSessionName

manager

private ReplManagerPlugin manager

replPrefix

private java.lang.String replPrefix

replPrefixGroup

private java.lang.String replPrefixGroup

cascadedReplSlave

private java.lang.String cascadedReplSlave

cascadedReplPrefix

private java.lang.String cascadedReplPrefix

forcedCounter

private long forcedCounter

ownVersion

private java.lang.String ownVersion

srcVersion

private java.lang.String srcVersion

doTransform

private boolean doTransform

initialFilesLocation

private java.lang.String initialFilesLocation

lastMessage

private java.lang.String lastMessage

lastDispatcherException

private java.lang.String lastDispatcherException

dispatcherActive

private boolean dispatcherActive

queueEntries

private long queueEntries

connected

private boolean connected

sessionName

private java.lang.String sessionName

transactionSeq

private long[] transactionSeq

messageSeq

private long messageSeq

transactionSeqVisible

private long transactionSeqVisible

tmpStatus

private int tmpStatus
These properties are used to transport the information from the check to the postCheck method.


lastMessageKey

private java.lang.String lastMessageKey

maxChunkSize

private long maxChunkSize

masterConn

private java.lang.String masterConn

initSync

private java.lang.Object initSync
we don't want to sync the check method because the jmx will synchronize on the object too


queue

private I_Queue queue
The queue associated to this slave. It is associated on first invocation of check


stalled

private boolean stalled

ptpQueueEntries

private long ptpQueueEntries
used for monitoring: to know how many entries are ptp (normally initial updates)


initialDataTopic

private java.lang.String initialDataTopic

cbQueueEntries

private long cbQueueEntries
The real amount of entries in the cb queue (not calculated)


countSingleMessages

private boolean countSingleMessages

maxNumOfEntries

private int maxNumOfEntries

maxNumOfEntriesKey

private java.lang.String maxNumOfEntriesKey
Constructor Detail

ReplSlave

public ReplSlave(Global global,
                 ReplManagerPlugin manager,
                 java.lang.String slaveSessionId,
                 ConnectQosData connQosData)
          throws XmlBlasterException
Throws:
XmlBlasterException
Method Detail

getTopic

public java.lang.String getTopic()
Specified by:
getTopic in interface ReplSlaveMBean

getMinReplKey

public long getMinReplKey()
Specified by:
getMinReplKey in interface ReplSlaveMBean

getMaxReplKey

public long getMaxReplKey()
Specified by:
getMaxReplKey in interface ReplSlaveMBean

getStatusAsInt

public int getStatusAsInt()
Specified by:
getStatusAsInt in interface I_ReplSlave

getStatus

public java.lang.String getStatus()
Specified by:
getStatus in interface I_ReplSlave
Specified by:
getStatus in interface ReplSlaveMBean

init

public void init(I_Info info)
          throws java.lang.Exception
The info comes as the client properties of the subscription Qos. Avoids double configuration.

Specified by:
init in interface I_ContribPlugin
Throws:
java.lang.Exception

initTransactionSequenceIfNeeded

private void initTransactionSequenceIfNeeded(java.lang.String warnText)
This method is needed since in some cases writing operations on the counters can occur before the init method has been invoked.

Parameters:
warnText - if null no warning will be written, otherwise the specified text will be output as a warning.

setStatus

private final void setStatus(int status)

setMaxReplKey

private final void setMaxReplKey(long replKey,
                                 long[] transKey,
                                 long msgKey,
                                 long minReplKey,
                                 long ptpQueueEntries)
Note that the transKey shall not be the transactionSeq instance otherwise it will never detect a change

Parameters:
replKey -
transKey -
msgKey -
minReplKey -

reInitiate

public boolean reInitiate(I_Info info)
                   throws java.lang.Exception
Specified by:
reInitiate in interface I_ReplSlave
Throws:
java.lang.Exception

run

public boolean run(I_Info info,
                   java.lang.String dbWatcherSessionId,
                   java.lang.String cascadeReplPrefix,
                   java.lang.String cascadeSlaveSessionName,
                   boolean onlyRegister)
            throws java.lang.Exception
Description copied from interface: I_ReplSlave
Starts a replication

Specified by:
run in interface I_ReplSlave
Parameters:
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.
Returns:
Throws:
java.lang.Exception

prepareForRequest

public void prepareForRequest(I_Info individualInfo)
                       throws java.lang.Exception
This is the first step in the process of requesting the initial Data.

Specified by:
prepareForRequest in interface I_ReplSlave
Throws:
java.lang.Exception
See Also:
I_ReplSlave.prepareForRequest(I_Info)

sendStatusInformation

private void sendStatusInformation(java.lang.String status)
                            throws java.lang.Exception
Throws:
java.lang.Exception

requestInitialData

public void requestInitialData(java.lang.String dbWatcherSessionId,
                               boolean onlyRegister)
                        throws java.lang.Exception
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.

Specified by:
requestInitialData in interface I_ReplSlave
Throws:
java.lang.Exception
See Also:
org.xmlBlaster.contrib.replication.I_ReplSlave#requestInitialData()

getEngineGlobal

private ServerScope getEngineGlobal(Global glob)

getSession

private I_AdminSession getSession()
                           throws java.lang.Exception
Throws:
java.lang.Exception

reactivateDestination

public void reactivateDestination(long minReplKey,
                                  long maxReplKey)
                           throws java.lang.Exception
Description copied from interface: I_ReplSlave
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.

Specified by:
reactivateDestination in interface I_ReplSlave
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
See Also:
org.xmlBlaster.contrib.replication.I_ReplSlave#reactivateDestination()

shutdown

public void shutdown()
Specified by:
shutdown in interface I_ContribPlugin
See Also:
org.xmlBlaster.contrib.dbwriter.I_ContribPlugin#shutdown()

doTransform

private final void doTransform(MsgUnit msgUnit)
                        throws java.lang.Exception
Throws:
java.lang.Exception

storeChunkLocally

private java.lang.String storeChunkLocally(ReferenceEntry entry,
                                           ClientProperty location,
                                           ClientProperty subDirProp)
                                    throws java.lang.Exception
Returns the name of the directory where the entries have been stored.

Parameters:
entry - The entry to add as a chunk.
location - The location where to add it.
subDirProp -
Returns:
Throws:
java.lang.Exception

changeLastMessage

private void changeLastMessage(java.lang.String newMsg)
Parameters:
newMsg - If newMsg is null, it cleans the message otherwise the behaviour depens on doAdd
doAdd - if true, the message is added to the current message, if false it is replaced.

check

public java.util.ArrayList check(java.util.List<I_Entry> entries,
                                 I_Queue queue)
                          throws java.lang.Exception
Specified by:
check in interface I_ReplSlave
Throws:
java.lang.Exception

startCascadedAndChangeStatus

private final void startCascadedAndChangeStatus()
                                         throws java.lang.Exception
Throws:
java.lang.Exception

getSqlResponse

public java.lang.String getSqlResponse()
Specified by:
getSqlResponse in interface ReplSlaveMBean
Returns:
Returns the sqlResponse.

setSqlResponse

public void setSqlResponse(java.lang.String sqlResponse)
Specified by:
setSqlResponse in interface I_ReplSlave
Parameters:
sqlResponse - The sqlResponse to set.

getUsedPropertyKeys

public java.util.Set getUsedPropertyKeys()
Description copied from interface: I_ContribPlugin
Gets all property keys which may be used by this object.

Specified by:
getUsedPropertyKeys in interface I_ContribPlugin
Returns:
See Also:
I_ContribPlugin.getUsedPropertyKeys()

setDispatcher

public boolean setDispatcher(boolean status)
Specified by:
setDispatcher in interface I_ReplSlave

setDispatcher

public final boolean setDispatcher(boolean status,
                                   boolean doPersist)
                            throws java.lang.Exception
Specified by:
setDispatcher in interface I_ReplSlave
Throws:
java.lang.Exception

doContinue

public void doContinue(boolean doPersist)
                throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
org.xmlBlaster.contrib.replication.ReplSlaveMBean#doContinue()

doPause

public void doPause(boolean doPersist)
             throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
org.xmlBlaster.contrib.replication.ReplSlaveMBean#doPause()

handleException

public void handleException(java.lang.Throwable ex)
Description copied from interface: I_ReplSlave
Pauses the dispatcher. and sets the message.

Specified by:
handleException in interface I_ReplSlave

toggleActive

public boolean toggleActive()
                     throws java.lang.Exception
Toggles the dispatcher from active to inactive or vice versa. Returns the actual state.

Specified by:
toggleActive in interface ReplSlaveMBean
Returns:
the actual state.
Throws:
java.lang.Exception
See Also:
ReplSlaveMBean.toggleActive()

cancelInitialUpdate

public void cancelInitialUpdate(boolean async)
                         throws java.lang.Exception
TODO fix this since it potentially could delete request from other slaves since the DbWatcher is serving several slaves. Cancels an ongoing initialUpdate Request.

Specified by:
cancelInitialUpdate in interface I_ReplSlave
Throws:
java.lang.Exception

cancelInitialUpdate

public void cancelInitialUpdate()
                         throws java.lang.Exception
TODO fix this since it potentially could delete request from other slaves since the DbWatcher is serving several slaves. Cancels an ongoing initialUpdate Request.

Specified by:
cancelInitialUpdate in interface ReplSlaveMBean
Throws:
java.lang.Exception

cancelUpdateAsyncPart

private void cancelUpdateAsyncPart()
The cancelUpdate is invoked asynchronously to avoid log blocking of the monitor when the cancel operation is going on.


clearQueueSync

private long clearQueueSync()

clearQueue

public void clearQueue()
                throws java.lang.Exception
Specified by:
clearQueue in interface ReplSlaveMBean
Throws:
java.lang.Exception

removeQueueEntries

public long removeQueueEntries(long entries)
                        throws java.lang.Exception
Specified by:
removeQueueEntries in interface ReplSlaveMBean
Throws:
java.lang.Exception

kill

public void kill()
          throws java.lang.Exception
Specified by:
kill in interface ReplSlaveMBean
Throws:
java.lang.Exception

reInitiateReplication

public java.lang.String reInitiateReplication()
                                       throws java.lang.Exception
Specified by:
reInitiateReplication in interface ReplSlaveMBean
Throws:
java.lang.Exception

getReplPrefix

public java.lang.String getReplPrefix()
Specified by:
getReplPrefix in interface I_ReplSlave
Specified by:
getReplPrefix in interface ReplSlaveMBean

getReplPrefixGroup

public java.lang.String getReplPrefixGroup()
Specified by:
getReplPrefixGroup in interface ReplSlaveMBean

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface ReplSlaveMBean

isActive

public boolean isActive()
Convenience method enforced by the MBean which returns true if the dispatcher of the slave session is active, false otherwise.

Specified by:
isActive in interface ReplSlaveMBean

getQueueEntries

public long getQueueEntries()
Convenience method enforced by the MBean which returns the number of entries in the queue.

Specified by:
getQueueEntries in interface ReplSlaveMBean

isConnected

public boolean isConnected()
Convenience method enforced by the MBean which returns true if the real slave is connected or false otherwise.

Specified by:
isConnected in interface ReplSlaveMBean

isStalled

public boolean isStalled()
Convenience method enforced by the MBean which returns true if the connection to the real slave is stalled or false otherwise.


getSessionName

public java.lang.String getSessionName()
Specified by:
getSessionName in interface I_ReplSlave
Specified by:
getSessionName in interface ReplSlaveMBean

getLastMessage

public java.lang.String getLastMessage()
Specified by:
getLastMessage in interface ReplSlaveMBean

checkStatus

public void checkStatus()
Description copied from interface: I_ReplSlave
Checks on the backend data which has to be displayed on the MBean.

Specified by:
checkStatus in interface I_ReplSlave

postCheck

public void postCheck(MsgUnit[] processedMsgUnits)
               throws java.lang.Exception
Specified by:
postCheck in interface I_ReplSlave
Throws:
java.lang.Exception

getTransactionSeq

public long getTransactionSeq()
Specified by:
getTransactionSeq in interface ReplSlaveMBean

decompressQueueEntryContent

public static byte[] decompressQueueEntryContent(ReferenceEntry entry)

dumpEntries

public java.lang.String dumpEntries(int maxNum,
                                    long maxSize,
                                    java.lang.String fileName)
Specified by:
dumpEntries in interface ReplSlaveMBean

dumpFirstEntry

public java.lang.String dumpFirstEntry()
Specified by:
dumpFirstEntry in interface ReplSlaveMBean

getCascaded

private ReplSlave getCascaded()
Returns null if the manager is null or if the cascaded object does not exist.


isCascading

public boolean isCascading()
Specified by:
isCascading in interface ReplSlaveMBean

getCascadedSessionName

public java.lang.String getCascadedSessionName()
Specified by:
getCascadedSessionName in interface ReplSlaveMBean

getCascadedQueueEntries

public long getCascadedQueueEntries()
Specified by:
getCascadedQueueEntries in interface ReplSlaveMBean

getCascadedTransactionSeq

public long getCascadedTransactionSeq()
Specified by:
getCascadedTransactionSeq in interface ReplSlaveMBean

getCascadedStatus

public java.lang.String getCascadedStatus()
Specified by:
getCascadedStatus in interface ReplSlaveMBean

isCascadedActive

public boolean isCascadedActive()
Specified by:
isCascadedActive in interface ReplSlaveMBean

isCascadedConnected

public boolean isCascadedConnected()
Specified by:
isCascadedConnected in interface ReplSlaveMBean

getCascadedVersion

public java.lang.String getCascadedVersion()
Specified by:
getCascadedVersion in interface ReplSlaveMBean

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getConnection

public java.lang.String getConnection()
Returns a string telling in which state the connection is. It can be stalled, connected or disconnected.

Specified by:
getConnection in interface ReplSlaveMBean
Returns:

getMasterConnection

public java.lang.String getMasterConnection()
Specified by:
getMasterConnection in interface ReplSlaveMBean

getCascadedConnection

public java.lang.String getCascadedConnection()
Specified by:
getCascadedConnection in interface ReplSlaveMBean

getCascadedMasterConnection

public java.lang.String getCascadedMasterConnection()
Specified by:
getCascadedMasterConnection in interface ReplSlaveMBean

incrementPtPEntries

public void incrementPtPEntries(long numOfTransactions)
Description copied from interface: I_ReplSlave
Increments the amount of entries in the ptp counter queue

Specified by:
incrementPtPEntries in interface I_ReplSlave

setCountSingleMsg

public void setCountSingleMsg(boolean countSingleMsg)
Specified by:
setCountSingleMsg in interface ReplSlaveMBean

isCountSingleMsg

public boolean isCountSingleMsg()
Specified by:
isCountSingleMsg in interface ReplSlaveMBean

getMaxNumOfEntries

public int getMaxNumOfEntries()
Specified by:
getMaxNumOfEntries in interface I_ReplSlave
Specified by:
getMaxNumOfEntries in interface ReplSlaveMBean

setMaxNumOfEntries

public void setMaxNumOfEntries(int maxNumOfEntries)
Sets the maximum number of entries to be sent in one single message. Entries means here the number of entries retrieved from the callback queue.

Specified by:
setMaxNumOfEntries in interface ReplSlaveMBean

onDeadLetter

public void onDeadLetter(java.util.Map qosClientProperties)
Description copied from interface: I_ReplSlave
Invoked by the ReplManagerPlugin when a deadMessage is published because an error

Specified by:
onDeadLetter in interface I_ReplSlave

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.