|
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.impl.InitialUpdater
public class InitialUpdater
Nested Class Summary | |
---|---|
class |
InitialUpdater.ConnectionInfo
|
Field Summary | |
---|---|
protected I_Info |
info
|
protected I_ChangePublisher |
publisher
used to publish CREATE changes |
Fields inherited from interface org.xmlBlaster.contrib.ContribConstants |
---|
FILE_DATE, FILENAME_ATTR, FILENAME_ATTR_OLD_FASHION, SUBDIR_ATTR, TIMESTAMP_ATTR, TOPIC_NAME |
Constructor Summary | |
---|---|
InitialUpdater(I_DbSpecific dbSpecific)
Not doing anything. |
Method Summary | |
---|---|
java.lang.String |
buildFilename(java.lang.String replPrefix_,
java.lang.String requestedVersion)
It builds the name to return in case the version is different from the current version. |
void |
cancelUpdate(java.lang.String slaveName)
|
void |
collectInitialUpdate()
|
byte[] |
executeStatement(java.lang.String sql,
long maxResponseEntries,
boolean isHighPrio,
boolean isMaster,
java.lang.String sqlTopic,
java.lang.String statementId)
|
InitialUpdater.ConnectionInfo |
getConnectionInfo(java.sql.Connection conn)
|
java.lang.String |
getTopic()
|
java.util.Set |
getUsedPropertyKeys()
Gets all property keys which may be used by this object. |
void |
init(I_Info info_)
|
java.lang.String |
initialCommand(java.lang.String[] slaveNames,
java.lang.String completeFilename,
InitialUpdater.ConnectionInfo connInfo,
java.lang.String version)
This is the intial command which is invoked on the OS. |
void |
initialCommandPre()
|
void |
initialUpdate(java.lang.String replTopic,
java.lang.String replManagerAddress,
java.lang.String slaveName,
java.lang.String requestedVersion,
java.lang.String initialFilesLocation,
boolean onlyRegister)
|
java.lang.String |
publishCreate(int counter,
SqlInfo updateInfo,
long newReplKey,
java.lang.String destination)
Publishes a 'CREATE TABLE' operation to the XmlBlaster. |
void |
reachedAlive(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState,
org.xmlBlaster.client.I_XmlBlasterAccess connection)
Sends a new registration message |
void |
reachedAliveSync(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState,
org.xmlBlaster.client.I_XmlBlasterAccess connection)
Invoked when the dispatcher goes to synch again after having delivered entries which where in the queue when the state changed to ALIVE. |
void |
reachedDead(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState,
org.xmlBlaster.client.I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess informing the client that the connection was lost (i.e. |
void |
reachedPolling(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState,
org.xmlBlaster.client.I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess informing the client that the connection state has changed to POLLING. |
void |
recreateTriggers()
|
byte[] |
replace(byte[] oldContent,
java.util.Map clientProperties)
Replaces or modifies the oldcontent. |
void |
sendEndOfTransitionMessage(java.lang.String[] slaveSessionNames)
This method is used where the end of transition message has to be sent separately (for example for read-only applications without triggers) |
void |
sendInitialDataResponse(java.lang.String[] slaveSessionNames,
java.lang.String shortFilename,
java.lang.String replManagerAddress,
long minKey,
long maxKey,
java.lang.String requestedVersion,
java.lang.String currentVersion,
java.lang.String initialFilesLocation)
|
void |
sendInitialDataResponseOnly(java.lang.String[] slaveSessionNames,
java.lang.String replManagerAddress,
long minKey,
long maxKey)
Sending this message will reactivate the Dispatcher of the associated slave |
void |
shutdown()
|
void |
startInitialUpdateBatch()
|
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 |
Field Detail |
---|
protected I_ChangePublisher publisher
protected I_Info info
Constructor Detail |
---|
public InitialUpdater(I_DbSpecific dbSpecific)
Method Detail |
---|
public final java.util.Set getUsedPropertyKeys()
I_ContribPlugin
getUsedPropertyKeys
in interface I_ContribPlugin
I_ContribPlugin.getUsedPropertyKeys()
public InitialUpdater.ConnectionInfo getConnectionInfo(java.sql.Connection conn)
public final void init(I_Info info_) throws java.lang.Exception
init
in interface I_ContribPlugin
java.lang.Exception
I_ContribPlugin.init(I_Info)
public final void shutdown() throws java.lang.Exception
shutdown
in interface I_ContribPlugin
java.lang.Exception
I_ContribPlugin.shutdown()
public final java.lang.String publishCreate(int counter, SqlInfo updateInfo, long newReplKey, java.lang.String destination) throws java.lang.Exception
counter
- The counter indicating which message number it is. The create
opeation itself will have '0', the subsequent associated INSERT
operations will have an increasing number (it is the number of
the message not the number of the associated INSERT operation).destination
- in case it is a ptp it is sent only to that destination,
otherwise it is sent as a pub/sub. This parameter also determines on
which topic to publish.
java.lang.Exception
public final void sendInitialDataResponseOnly(java.lang.String[] slaveSessionNames, java.lang.String replManagerAddress, long minKey, long maxKey) throws java.lang.Exception
topic
- filename
- replManagerAddress
- slaveName
- minKey
- maxKey
-
java.lang.Exception
public final void sendInitialDataResponse(java.lang.String[] slaveSessionNames, java.lang.String shortFilename, java.lang.String replManagerAddress, long minKey, long maxKey, java.lang.String requestedVersion, java.lang.String currentVersion, java.lang.String initialFilesLocation) throws java.lang.Exception
java.lang.Exception
public void sendEndOfTransitionMessage(java.lang.String[] slaveSessionNames) throws javax.jms.JMSException
slaveSessionNames
-
javax.jms.JMSException
public final java.lang.String initialCommand(java.lang.String[] slaveNames, java.lang.String completeFilename, InitialUpdater.ConnectionInfo connInfo, java.lang.String version) throws java.lang.Exception
argument
- the argument to execute. It is normally the absolute file name to be
exported/imported. Can be null, if null, one is generated by using the current timestamp.conn
- the connection to perform a commit on. Can be null, if null, no commit
is done asynchronously.
java.lang.Exception
public java.lang.String buildFilename(java.lang.String replPrefix_, java.lang.String requestedVersion)
replPrefix_
- requestedVersion
-
public final void initialCommandPre() throws java.lang.Exception
java.lang.Exception
public void reachedAlive(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState, org.xmlBlaster.client.I_XmlBlasterAccess connection)
reachedAlive
in interface org.xmlBlaster.client.I_ConnectionStateListener
oldState
- The previous state of the connection.I_ConnectionStateListener.reachedAlive(org.xmlBlaster.util.dispatch.ConnectionStateEnum, org.xmlBlaster.client.I_XmlBlasterAccess)
public void reachedAliveSync(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState, org.xmlBlaster.client.I_XmlBlasterAccess connection)
org.xmlBlaster.client.I_ConnectionStateListener
reachedAliveSync
in interface org.xmlBlaster.client.I_ConnectionStateListener
oldState
- is always ALIVE.public void reachedDead(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState, org.xmlBlaster.client.I_XmlBlasterAccess connection)
org.xmlBlaster.client.I_ConnectionStateListener
reachedDead
in interface org.xmlBlaster.client.I_ConnectionStateListener
oldState
- The previous state of the connection.I_ConnectionStateListener.reachedDead(org.xmlBlaster.util.dispatch.ConnectionStateEnum, org.xmlBlaster.client.I_XmlBlasterAccess)
public void reachedPolling(org.xmlBlaster.util.dispatch.ConnectionStateEnum oldState, org.xmlBlaster.client.I_XmlBlasterAccess connection)
org.xmlBlaster.client.I_ConnectionStateListener
reachedPolling
in interface org.xmlBlaster.client.I_ConnectionStateListener
oldState
- The previous state of the connection.I_ConnectionStateListener.reachedPolling(org.xmlBlaster.util.dispatch.ConnectionStateEnum, org.xmlBlaster.client.I_XmlBlasterAccess)
public byte[] replace(byte[] oldContent, java.util.Map clientProperties)
org.xmlBlaster.util.I_ReplaceContent
replace
in interface org.xmlBlaster.util.I_ReplaceContent
clientProperties
- the map can either be used as attributes or it can be modified in
this method.
public final void update(java.lang.String topic, java.io.InputStream is, java.util.Map attrMap)
I_Update
update
in interface I_Update
topic
- The topic nameattrMap
- A map with attribute, can be nullorg.xmlBlaster.contrib.I_Update#update(java.lang.String, byte[], java.util.Map)
public void collectInitialUpdate()
collectInitialUpdate
in interface I_ReplSource
public byte[] executeStatement(java.lang.String sql, long maxResponseEntries, boolean isHighPrio, boolean isMaster, java.lang.String sqlTopic, java.lang.String statementId) throws java.lang.Exception
executeStatement
in interface I_ReplSource
java.lang.Exception
public void recreateTriggers() throws java.lang.Exception
recreateTriggers
in interface I_ReplSource
java.lang.Exception
public void cancelUpdate(java.lang.String slaveName)
cancelUpdate
in interface I_ReplSource
public void initialUpdate(java.lang.String replTopic, java.lang.String replManagerAddress, java.lang.String slaveName, java.lang.String requestedVersion, java.lang.String initialFilesLocation, boolean onlyRegister)
initialUpdate
in interface I_ReplSource
public java.lang.String getTopic()
getTopic
in interface I_ReplSource
public void startInitialUpdateBatch()
startInitialUpdateBatch
in interface I_ReplSource
|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |