|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.xmlBlaster.contrib.replication.impl.InitialUpdater
| Nested Class Summary | |
class |
InitialUpdater.ConnectionInfo
|
(package private) class |
InitialUpdater.ExecuteListener
|
(package private) class |
InitialUpdater.ExecutionThread
|
| Field Summary | |
private boolean |
collectInitialUpdates
|
private java.lang.String |
CREATE_COUNTER_KEY
|
private I_DbSpecific |
dbSpecific
|
protected I_Info |
info
|
private java.lang.String |
initialCmd
|
private java.lang.String |
initialCmdPath
|
private java.lang.String |
initialCmdPre
|
private long |
initialCmdSleepDelay
|
private java.lang.String |
initialDataTopic
|
private boolean |
initialDumpAsXml
|
private int |
initialDumpMaxSize
|
private boolean |
keepDumpFiles
|
private static java.util.logging.Logger |
log
|
private java.util.Map |
preparedUpdates
Contains updates to be executed where the key is the version |
protected I_ChangePublisher |
publisher
used to publish CREATE changes |
private java.lang.String |
replPrefix
|
private ReplSourceEngine |
replSourceEngine
|
private java.util.Map |
runningExecutes
|
private java.lang.String |
stringToCheck
|
| 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)
|
private java.lang.String |
getSupportedVersions(java.lang.String currentReplVersion)
|
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)
|
private void |
osExecute(java.lang.String[] slaveNames,
java.lang.String cmd,
InitialUpdater.ConnectionInfo connInfo)
Executes an Operating System command. |
java.lang.String |
publishCreate(int counter,
SqlInfo updateInfo,
long newReplKey,
java.lang.String destination)
Publishes a 'CREATE TABLE' operation to the XmlBlaster. |
void |
reachedAlive(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
Sends a new registration message |
void |
reachedDead(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
This is the callback method invoked from XmlBlasterAccess informing the client that the connection was lost (i.e. |
void |
reachedPolling(ConnectionStateEnum oldState,
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 |
private java.lang.String CREATE_COUNTER_KEY
private static java.util.logging.Logger log
protected I_ChangePublisher publisher
protected I_Info info
private java.lang.String initialCmd
private java.lang.String initialCmdPre
private java.lang.String initialCmdPath
private boolean keepDumpFiles
private java.lang.String replPrefix
private I_DbSpecific dbSpecific
private java.lang.String stringToCheck
private java.util.Map runningExecutes
private java.lang.String initialDataTopic
private java.util.Map preparedUpdates
private boolean collectInitialUpdates
private boolean initialDumpAsXml
private int initialDumpMaxSize
private long initialCmdSleepDelay
private ReplSourceEngine replSourceEngine
| Constructor Detail |
public InitialUpdater(I_DbSpecific dbSpecific)
| Method Detail |
public final java.util.Set getUsedPropertyKeys()
I_ContribPlugin
getUsedPropertyKeys in interface I_ContribPluginI_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_ContribPluginjava.lang.ExceptionI_ContribPlugin.init(I_Info)
public final void shutdown()
throws java.lang.Exception
shutdown in interface I_ContribPluginjava.lang.ExceptionI_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
replManagerAddress - 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
private void osExecute(java.lang.String[] slaveNames,
java.lang.String cmd,
InitialUpdater.ConnectionInfo connInfo)
throws java.lang.Exception
cmd -
java.lang.Exception
private java.lang.String getSupportedVersions(java.lang.String currentReplVersion)
throws java.lang.Exception
java.lang.Exception
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
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(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
reachedAlive in interface I_ConnectionStateListeneroldState - The previous state of the connection.I_ConnectionStateListener.reachedAlive(org.xmlBlaster.util.dispatch.ConnectionStateEnum, org.xmlBlaster.client.I_XmlBlasterAccess)
public void reachedDead(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListener
reachedDead in interface I_ConnectionStateListeneroldState - The previous state of the connection.I_ConnectionStateListener.reachedDead(org.xmlBlaster.util.dispatch.ConnectionStateEnum, org.xmlBlaster.client.I_XmlBlasterAccess)
public void reachedPolling(ConnectionStateEnum oldState,
I_XmlBlasterAccess connection)
I_ConnectionStateListener
reachedPolling in interface I_ConnectionStateListeneroldState - 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)
I_ReplaceContent
replace in interface I_ReplaceContentoldContent - 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_Updatetopic - 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_ReplSourcejava.lang.Exception
public void recreateTriggers()
throws java.lang.Exception
recreateTriggers in interface I_ReplSourcejava.lang.Exceptionpublic 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_ReplSourcepublic java.lang.String getTopic()
getTopic in interface I_ReplSourcepublic void startInitialUpdateBatch()
startInitialUpdateBatch in interface I_ReplSource
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||