org.xmlBlaster.contrib.replication
Class ReplSourceEngine
java.lang.Object
org.xmlBlaster.contrib.replication.ReplSourceEngine
- All Implemented Interfaces:
- ContribConstants, I_Update, ReplicationConstants, I_ReplaceContent
public class ReplSourceEngine
- extends java.lang.Object
- implements I_Update, ReplicationConstants, I_ReplaceContent
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 |
Method Summary |
MsgQosData |
preparePubQos(MsgQosData qosData)
|
private void |
prepareQosMap(java.util.Map props)
|
byte[] |
replace(byte[] oldContent,
java.util.Map clientProperties)
Replaces or modifies the oldcontent. |
void |
sendEndOfTransitionMessage(I_Info info,
java.lang.String initialDataTopic,
java.lang.String[] slaveSessionNames)
|
void |
sendEndOfTransitionMessage(I_Info info,
XBSession session,
java.lang.String initialFilesLocation,
java.lang.String shortFilename,
java.lang.String dumpId,
XBMessageProducer producer)
|
void |
sendInitialDataResponse(java.lang.String[] slaveSessionNames,
java.lang.String replManagerAddress,
long minKey,
long maxKey)
Sending this message will reactivate the Dispatcher of the associated slave |
static void |
sendInitReplMsg(I_ChangePublisher publisher,
java.lang.String[] slaveSessionNames,
java.lang.String prefixWithVersion,
java.lang.String cascadeSlaveSessionName,
java.lang.String cascadeReplicationPrefix,
java.lang.String realInitialFilesLocation,
boolean force)
Sending this message will reactivate the Dispatcher of the associated slave |
void |
update(java.lang.String topic,
java.io.InputStream is,
java.util.Map attrMap)
The message received from the MoM or from another source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final java.util.logging.Logger log
replPrefix
private java.lang.String replPrefix
publisher
private I_ChangePublisher publisher
source
private I_ReplSource source
messageSeq
private long messageSeq
ReplSourceEngine
public ReplSourceEngine(java.lang.String replPrefix,
I_ChangePublisher publisher,
I_ReplSource source)
update
public final void update(java.lang.String topic,
java.io.InputStream is,
java.util.Map attrMap)
- Description copied from interface:
I_Update
- The message received from the MoM or from another source.
- Specified by:
update
in interface I_Update
- Parameters:
topic
- The topic nameattrMap
- A map with attribute, can be null- See Also:
org.xmlBlaster.contrib.I_Update#update(java.lang.String, byte[], java.util.Map)
sendInitialDataResponse
public final void sendInitialDataResponse(java.lang.String[] slaveSessionNames,
java.lang.String replManagerAddress,
long minKey,
long maxKey)
throws java.lang.Exception
- Sending this message will reactivate the Dispatcher of the associated slave
- Parameters:
topic
- filename
- replManagerAddress
- slaveName
- minKey
- maxKey
-
- Throws:
java.lang.Exception
sendInitReplMsg
public static void sendInitReplMsg(I_ChangePublisher publisher,
java.lang.String[] slaveSessionNames,
java.lang.String prefixWithVersion,
java.lang.String cascadeSlaveSessionName,
java.lang.String cascadeReplicationPrefix,
java.lang.String realInitialFilesLocation,
boolean force)
throws java.lang.Exception
- Sending this message will reactivate the Dispatcher of the associated slave
- Parameters:
topic
- filename
- replManagerAddress
- slaveName
- minKey
- maxKey
-
- Throws:
java.lang.Exception
sendEndOfTransitionMessage
public void sendEndOfTransitionMessage(I_Info info,
java.lang.String initialDataTopic,
java.lang.String[] slaveSessionNames)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
sendEndOfTransitionMessage
public void sendEndOfTransitionMessage(I_Info info,
XBSession session,
java.lang.String initialFilesLocation,
java.lang.String shortFilename,
java.lang.String dumpId,
XBMessageProducer producer)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
preparePubQos
public MsgQosData preparePubQos(MsgQosData qosData)
prepareQosMap
private void prepareQosMap(java.util.Map props)
replace
public byte[] replace(byte[] oldContent,
java.util.Map clientProperties)
- Description copied from interface:
I_ReplaceContent
- Replaces or modifies the oldcontent. The returned instance can be the same as
passed as the oldContent or it can be a new instance.
- Specified by:
replace
in interface I_ReplaceContent
clientProperties
- the map can either be used as attributes or it can be modified in
this method.
- Returns:
- value
Copyright © 1999-2014 The xmlBlaster.org contributers.