|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.contrib.replication.ReplicationWriter
public class ReplicationWriter
Field Summary | |
---|---|
private I_Update |
callback
|
private I_DbSpecific |
dbSpecific
|
private java.io.OutputStream |
debugOs
|
private boolean |
doAlter
|
private boolean |
doCreate
|
private boolean |
doDrop
|
private boolean |
doStatement
|
private boolean |
exceptionInTransaction
|
private boolean |
hasInitialCmd
|
private java.lang.String |
importLocation
|
protected I_Info |
info
|
private boolean |
keepDumpFiles
|
private java.sql.Connection |
keptConnection
|
private static java.util.logging.Logger |
log
|
(package private) I_Mapper |
mapper
|
private static java.lang.String |
ME
|
private boolean |
nirvanaClient
|
private boolean |
overwriteTables
|
private I_Parser |
parserForOldInUpdates
|
protected I_DbPool |
pool
|
private I_PrePostStatement |
prePostStatement
|
private boolean |
recreateTables
|
private java.lang.String |
schemaToWipeout
|
private static int |
SQL_INFO_CACHE_MAX_SIZE_DEFAULT
|
private java.util.Map |
sqlInfoCache
|
private int |
sqlInfoCacheMaxSize
|
Fields inherited from interface org.xmlBlaster.contrib.ContribConstants |
---|
FILE_DATE, FILENAME_ATTR, FILENAME_ATTR_OLD_FASHION, SUBDIR_ATTR, TIMESTAMP_ATTR, TOPIC_NAME |
Constructor Summary | |
---|---|
ReplicationWriter()
|
Method Summary | |
---|---|
private void |
addToSqlInfoCache(SqlInfo sqlInfo)
|
private boolean |
checkIfAlreadyProcessed(SqlInfo dbInfo)
Checks weather an entry has already been processed, in which case it will not be processed anymore |
private void |
clearSqlInfoCache()
|
private void |
deleteFiles(java.util.Map attrMap)
|
private void |
deleteFiles(java.lang.String filename)
|
private java.lang.String |
getCompleteFileName(java.lang.String filename)
|
private java.lang.String |
getKey(java.lang.String catalog,
java.lang.String schema,
java.lang.String tableName)
|
private java.lang.String |
getStringAttribute(java.lang.String key,
SqlRow row,
SqlDescription description)
It first searches in the row and if nothing found it searches in the description. |
private SqlDescription |
getTableDescription(java.lang.String catalog,
java.lang.String schema,
java.lang.String tableName,
java.sql.Connection conn)
Returns the structure information of the table in question. |
private SqlInfo |
getTableDescriptionFromCache(java.lang.String catalog,
java.lang.String schema,
java.lang.String tableName)
|
java.util.Set |
getUsedPropertyKeys()
Gets all property keys which may be used by this object. |
void |
init(I_Info info_)
|
private boolean |
isAllowedCommand(java.lang.String command)
|
private int |
modifyColumnsIfNecessary(java.lang.String originalCatalog,
java.lang.String originalSchema,
java.lang.String originalTable,
SqlRow row)
Returns the number of columns modified. |
private void |
removeTableDescriptionFromCache(java.lang.String catalog,
java.lang.String schema,
java.lang.String tableName)
|
void |
shutdown()
|
void |
store(SqlInfo dbInfo)
|
void |
update(java.lang.String topic,
java.io.InputStream is,
java.util.Map attrMap)
The message received from the MoM or from another source. |
private void |
updateDump(java.lang.String topic,
java.io.InputStream is,
java.util.Map attrMap)
This is invoked for dump files |
private void |
updateManualTransfer(java.lang.String topic,
java.io.InputStream is,
java.util.Map attrMap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String ME
private static java.util.logging.Logger log
protected I_DbPool pool
protected I_Info info
private I_DbSpecific dbSpecific
I_Mapper mapper
private boolean overwriteTables
private boolean recreateTables
private java.lang.String importLocation
private I_Update callback
private boolean keepDumpFiles
private boolean doDrop
private boolean doCreate
private boolean doAlter
private boolean doStatement
private java.lang.String schemaToWipeout
private I_PrePostStatement prePostStatement
private boolean hasInitialCmd
private I_Parser parserForOldInUpdates
private boolean nirvanaClient
private java.util.Map sqlInfoCache
private static final int SQL_INFO_CACHE_MAX_SIZE_DEFAULT
private int sqlInfoCacheMaxSize
private boolean exceptionInTransaction
private java.sql.Connection keptConnection
private java.io.OutputStream debugOs
Constructor Detail |
---|
public ReplicationWriter()
Method Detail |
---|
public java.util.Set getUsedPropertyKeys()
I_ContribPlugin
getUsedPropertyKeys
in interface I_ContribPlugin
I_ContribPlugin.getUsedPropertyKeys()
public void init(I_Info info_) throws java.lang.Exception
init
in interface I_ContribPlugin
java.lang.Exception
public void shutdown() throws java.lang.Exception
shutdown
in interface I_ContribPlugin
java.lang.Exception
I_Plugin
private java.lang.String getStringAttribute(java.lang.String key, SqlRow row, SqlDescription description)
key
- row
-
private boolean isAllowedCommand(java.lang.String command)
private final int modifyColumnsIfNecessary(java.lang.String originalCatalog, java.lang.String originalSchema, java.lang.String originalTable, SqlRow row) throws java.lang.Exception
originalCatalog
- originalSchema
- originalTable
- row
- if null, nothing is changed
java.lang.Exception
private boolean checkIfAlreadyProcessed(SqlInfo dbInfo)
dbInfo
-
public void store(SqlInfo dbInfo) throws java.lang.Exception
store
in interface I_Writer
java.lang.Exception
private final java.lang.String getKey(java.lang.String catalog, java.lang.String schema, java.lang.String tableName)
private final SqlInfo getTableDescriptionFromCache(java.lang.String catalog, java.lang.String schema, java.lang.String tableName)
private final void removeTableDescriptionFromCache(java.lang.String catalog, java.lang.String schema, java.lang.String tableName)
private final void addToSqlInfoCache(SqlInfo sqlInfo)
private final void clearSqlInfoCache()
private SqlDescription getTableDescription(java.lang.String catalog, java.lang.String schema, java.lang.String tableName, java.sql.Connection conn) throws java.lang.Exception
schema
- tableName
- conn
-
java.lang.Exception
private final java.lang.String getCompleteFileName(java.lang.String filename)
private void deleteFiles(java.lang.String filename)
private void deleteFiles(java.util.Map attrMap)
private void updateDump(java.lang.String topic, java.io.InputStream is, java.util.Map attrMap) throws java.lang.Exception
java.lang.Exception
private void updateManualTransfer(java.lang.String topic, java.io.InputStream is, java.util.Map attrMap) throws java.lang.Exception
java.lang.Exception
public void update(java.lang.String topic, java.io.InputStream is, java.util.Map attrMap) throws java.lang.Exception
I_Update
update
in interface I_Update
topic
- The topic nameattrMap
- A map with attribute, can be null
java.lang.Exception
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |