|
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.SpecificDefault org.xmlBlaster.contrib.replication.impl.SpecificDbReadonly
public class SpecificDbReadonly
Field Summary |
---|
Fields inherited from class org.xmlBlaster.contrib.replication.impl.SpecificDefault |
---|
blockLoop, COMMIT_NO, COMMIT_YES, dbMetaHelper, dbPool, info, initialUpdater, isDbWriteable, replacer, replaceVariable, replPrefix, replVersion, ROLLBACK_NO, ROLLBACK_YES, transformer |
Fields inherited from interface org.xmlBlaster.contrib.replication.I_DbSpecific |
---|
NEEDS_PUBLISHER_KEY, WIPEOUT_ALL, WIPEOUT_FUNCTIONS, WIPEOUT_INDEXES, WIPEOUT_NO_TABLES, WIPEOUT_ONLY_TABLES, WIPEOUT_PACKAGES, WIPEOUT_PROCEDURES, WIPEOUT_SEQUENCES, WIPEOUT_SYNONYMS, WIPEOUT_TABLES, WIPEOUT_TRIGGERS, WIPEOUT_VIEWS |
Constructor Summary | |
---|---|
SpecificDbReadonly()
|
Method Summary | |
---|---|
void |
addSchemaToWatch(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema)
Adds a schema to be watched. |
void |
addTriggersIfNeeded(boolean force,
java.lang.String[] destinations,
boolean forceSend)
If force is true, it deletes first all entries from the Tables table (kind of reset). |
void |
bootstrap(java.sql.Connection conn,
boolean doWarn,
boolean force)
This method is invoked for the initial setup of the database. |
void |
checkTriggerConsistency(boolean doFix)
Checks the consistency of the triggers. |
void |
cleanup(java.sql.Connection conn,
boolean doWarn)
This method is invoked for the cleanup while testing. |
java.lang.String |
createTableTrigger(SqlDescription infoDescription,
TableToWatchInfo tableToWatch)
Creates a string containing the trigger of the table to be watched. |
void |
forceTableChangeCheck()
Invokes the function to check wether a table has been created, dropped or altered. |
java.lang.StringBuffer |
getColumnStatement(SqlColumn colInfoDescription)
This method should actually be protected since it is not used on the outside. |
java.lang.String |
getContentFromGuid(java.lang.String guid,
java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
I_AttributeTransformer transformer)
This is used for cases where it was not possible to retrieve the (new) content of an entry synchronously in the PL/SQL Code. |
long |
incrementReplKey(java.sql.Connection conn)
Increments and retreives the ${replPrefix}key sequence counter. |
void |
init(I_Info info)
|
void |
initiateUpdate(java.lang.String topic,
java.lang.String replManagerAddress,
java.lang.String[] slaveNames,
java.lang.String requestedVersion,
java.lang.String initialFilesLocation)
Initiates an initial update. |
boolean |
isDatasourceReadonly()
|
boolean |
removeTrigger(java.lang.String triggerName,
java.lang.String tableName,
boolean isSchemaTrigger)
removes the specified trigger from the specified table. |
protected boolean |
sequenceExists(java.sql.Connection conn,
java.lang.String sequenceName)
|
protected boolean |
triggerExists(java.sql.Connection conn,
java.lang.String triggerName)
|
boolean |
triggerExists(java.sql.Connection conn,
TableToWatchInfo tableToWatch)
Checks wether a trigger really exists or not. |
int |
wipeoutSchema(java.lang.String catalog,
java.lang.String schema,
boolean[] objectsToWipeout)
Cleans up the complete schema. |
Methods inherited from class org.xmlBlaster.contrib.replication.impl.SpecificDefault |
---|
addTableToWatch, addTrigger, broadcastStatement, cancelUpdate, checkSequenceForCreation, checkTableForCreation, checkTriggerForCreation, clearCancelUpdate, getContentFromClasspath, getCreateTableStatement, getName, getObjectName, getOwnSchema, getReplPrefix, getUsedPropertyKeys, initialCommand, initialCommandPre, main, readNewTable, releaseIntoPool, releaseIntoPool, removeFromPool, removeFromPool, removeSchemaTriggers, removeTableToWatch, setAttributeTransformer, shutdown, toString, updateFromFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpecificDbReadonly()
Method Detail |
---|
public void init(I_Info info) throws java.lang.Exception
init
in interface I_ContribPlugin
init
in class SpecificDefault
java.lang.Exception
I_ContribPlugin.init(I_Info)
public void addTriggersIfNeeded(boolean force, java.lang.String[] destinations, boolean forceSend)
SpecificDefault
addTriggersIfNeeded
in interface I_DbSpecific
addTriggersIfNeeded
in class SpecificDefault
force
- to force recreation of triggers even if they exist already.public final void checkTriggerConsistency(boolean doFix)
SpecificDefault
checkTriggerConsistency
in interface I_DbSpecific
checkTriggerConsistency
in class SpecificDefault
public final void bootstrap(java.sql.Connection conn, boolean doWarn, boolean force)
I_DbSpecific
bootstrap
in interface I_DbSpecific
bootstrap
in class SpecificDefault
doWarn
- if false no warning is given on excrption.force
- if true, then everything is cleaned up, if false, then tables and sequences are
only rebuilt if not existing.In case of an exception you need to cleanup the connection yourself.
public final void cleanup(java.sql.Connection conn, boolean doWarn)
I_DbSpecific
cleanup
in interface I_DbSpecific
cleanup
in class SpecificDefault
doWarn
- if false no warning is given on excrption.In case of an exception you need to cleanup
the connection yourself.
public final void forceTableChangeCheck()
I_DbSpecific
forceTableChangeCheck
in interface I_DbSpecific
forceTableChangeCheck
in class SpecificDefault
public final void initiateUpdate(java.lang.String topic, java.lang.String replManagerAddress, java.lang.String[] slaveNames, java.lang.String requestedVersion, java.lang.String initialFilesLocation) throws java.lang.Exception
I_DbSpecific
initiateUpdate
in interface I_DbSpecific
initiateUpdate
in class SpecificDefault
replManagerAddress
- the address to which to send acknowleges.slaveNames
- the name of the slave interested in these updatesrequestedVersion
- the version for which to start replication. If null the current versioninitialFilesLocation
- tells where to store the initial files in case the replication data
has to be transfered manually by means of copying files.
is ment.
java.lang.Exception
org.xmlBlaster.contrib.replication.I_DbSpecific#initiateUpdate(java.lang.String)
protected boolean sequenceExists(java.sql.Connection conn, java.lang.String sequenceName) throws java.lang.Exception
sequenceExists
in class SpecificDefault
java.lang.Exception
protected boolean triggerExists(java.sql.Connection conn, java.lang.String triggerName) throws java.lang.Exception
triggerExists
in class SpecificDefault
java.lang.Exception
public void addSchemaToWatch(java.sql.Connection conn, java.lang.String catalog, java.lang.String schema) throws java.lang.Exception
I_DbSpecific
java.lang.Exception
public java.lang.String createTableTrigger(SqlDescription infoDescription, TableToWatchInfo tableToWatch)
I_DbSpecific
public java.lang.StringBuffer getColumnStatement(SqlColumn colInfoDescription)
I_DbSpecific
colInfoDescription
- The info object describing this column.
public java.lang.String getContentFromGuid(java.lang.String guid, java.lang.String catalog, java.lang.String schema, java.lang.String table, I_AttributeTransformer transformer) throws java.lang.Exception
I_DbSpecific
guid
- the unique Id identifying this entry. This is needed. Can not be nullcatalog
- can be nullschema
- can be nulltable
- must be defined (can not be null).transformer
- An optional plugin
java.lang.Exception
public boolean removeTrigger(java.lang.String triggerName, java.lang.String tableName, boolean isSchemaTrigger)
I_DbSpecific
isSchemaTrigger
- true if the trigger to be removed is a schema trigger.
public boolean triggerExists(java.sql.Connection conn, TableToWatchInfo tableToWatch) throws java.lang.Exception
I_DbSpecific
tableToWatch
- The object containing the table to be checked for trigger
java.lang.Exception
- If an exception occurs in the backend.public int wipeoutSchema(java.lang.String catalog, java.lang.String schema, boolean[] objectsToWipeout) throws java.lang.Exception
I_DbSpecific
objectsToWipeout
- a boolean[] array containing 9 elements telling wether the specified objects of a certain
type have to be wiped out or not. For the relationship between position and meaning see the static variables.
If you pass null here all object types are wiped out.
java.lang.Exception
public long incrementReplKey(java.sql.Connection conn) throws java.lang.Exception
SpecificDefault
incrementReplKey
in interface I_DbSpecific
incrementReplKey
in class SpecificDefault
conn
- the connection (it must not be null)
java.lang.Exception
- if an exception occurs.I_DbSpecific.incrementReplKey(Connection)
public boolean isDatasourceReadonly()
isDatasourceReadonly
in interface I_DbSpecific
isDatasourceReadonly
in class SpecificDefault
|
xmlBlaster 2.2.0 contributions API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |