|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Field Summary | |
static java.lang.String |
NEEDS_PUBLISHER_KEY
key for the property defining if the publisher is needed on the implementation of this interface. |
static boolean[] |
WIPEOUT_ALL
|
static int |
WIPEOUT_FUNCTIONS
|
static int |
WIPEOUT_INDEXES
|
static boolean[] |
WIPEOUT_NO_TABLES
|
static boolean[] |
WIPEOUT_ONLY_TABLES
|
static int |
WIPEOUT_PACKAGES
|
static int |
WIPEOUT_PROCEDURES
|
static int |
WIPEOUT_SEQUENCES
|
static int |
WIPEOUT_SYNONYMS
|
static int |
WIPEOUT_TABLES
|
static int |
WIPEOUT_TRIGGERS
|
static int |
WIPEOUT_VIEWS
|
| Method Summary | |
void |
addSchemaToWatch(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema)
Adds a schema to be watched. |
boolean |
addTableToWatch(TableToWatchInfo tableToWatch,
boolean force,
java.lang.String[] destinations,
boolean forceSend)
Adds a table to be watcher/replicated. |
void |
addTrigger(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String tableName)
|
void |
addTriggersIfNeeded(boolean force,
java.lang.String[] destinations,
boolean forceSend)
Creates the necessary triggers if needed, i.e. |
void |
bootstrap(java.sql.Connection conn,
boolean doWarn,
boolean force)
This method is invoked for the initial setup of the database. |
byte[] |
broadcastStatement(java.lang.String sql,
long maxResponseEntries,
boolean isHighPrio,
boolean isMaster,
java.lang.String sqlTopic,
java.lang.String statementId)
broadcasts a statement to be replicated. |
void |
cancelUpdate(java.lang.String replSlave)
Tells the DbSpecific to cancel the ongoing initial update for the given slave. |
void |
checkTriggerConsistency(boolean doFix)
Checks if the triggers are consistent, i.e. |
void |
cleanup(java.sql.Connection conn,
boolean doWarn)
This method is invoked for the cleanup while testing. |
void |
clearCancelUpdate(java.lang.String replSlave)
Tells the DbSpecific to clear the cancel flag for ongoing updates for the given slave. |
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. |
java.lang.String |
getCreateTableStatement(SqlDescription infoDescription,
I_Mapper mapper)
Returns the statement necessary to create a new table. |
java.lang.String |
getName()
|
long |
incrementReplKey(java.sql.Connection conn)
Increments and retreives the repl_key sequence counter. |
void |
initialCommand(java.lang.String[] slaveNames,
java.lang.String completeFilename,
java.lang.String version)
This is the intial command which is invoked on the OS. |
void |
initialCommandPre()
This is the command/script which is invoked before cleaning up resources on the initial update on the slave side (before the wipeout of the schema to be replicated). |
void |
initiateUpdate(java.lang.String topic,
java.lang.String replManagerAddress,
java.lang.String[] slaveName,
java.lang.String version,
java.lang.String initialFilesLocation)
Initiates an initial update. |
boolean |
isDatasourceReadonly()
|
void |
readNewTable(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.util.Map attrs,
boolean sendInitialContents)
Reads the metadata and content of the specified table. |
void |
removeTableToWatch(TableToWatchInfo tableToWatch,
boolean removeAlsoSchemaTrigger)
Removes a table from the repl_tables. |
boolean |
removeTrigger(java.lang.String triggerName,
java.lang.String tableName,
boolean isSchemaTrigger)
removes the specified trigger from the specified table. |
void |
setAttributeTransformer(I_AttributeTransformer transformer)
|
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 interface org.xmlBlaster.contrib.I_ContribPlugin |
getUsedPropertyKeys, init, shutdown |
| Field Detail |
public static final int WIPEOUT_TRIGGERS
public static final int WIPEOUT_SEQUENCES
public static final int WIPEOUT_FUNCTIONS
public static final int WIPEOUT_PACKAGES
public static final int WIPEOUT_PROCEDURES
public static final int WIPEOUT_VIEWS
public static final int WIPEOUT_TABLES
public static final int WIPEOUT_SYNONYMS
public static final int WIPEOUT_INDEXES
public static final boolean[] WIPEOUT_ALL
public static final boolean[] WIPEOUT_ONLY_TABLES
public static final boolean[] WIPEOUT_NO_TABLES
public static final java.lang.String NEEDS_PUBLISHER_KEY
| Method Detail |
public void bootstrap(java.sql.Connection conn,
boolean doWarn,
boolean force)
throws java.lang.Exception
conn - 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.
java.lang.Exception
public void cleanup(java.sql.Connection conn,
boolean doWarn)
throws java.lang.Exception
conn - doWarn - if false no warning is given on excrption.
java.lang.Exception
public void readNewTable(java.lang.String catalog,
java.lang.String schema,
java.lang.String table,
java.util.Map attrs,
boolean sendInitialContents)
throws java.lang.Exception
catalog - can be nullschema - can be nulltable - can not be nullattrs - can be nullsendInitialContents - if true it will send all the contents of the added table, if false it
will not send anything. So normally if you made a dump of the Database you don't want
to send all the content of the tables again.
java.lang.Exception
public java.lang.String getCreateTableStatement(SqlDescription infoDescription,
I_Mapper mapper)
infoDescription - The description from which to create the statement.mapper - the mapper to convert the table name (and in future the column names). Can be null,
if null, no mapping is done.
public java.lang.String createTableTrigger(SqlDescription infoDescription,
TableToWatchInfo tableToWatch)
infoDescription -
public void forceTableChangeCheck()
throws java.lang.Exception
java.lang.Exception
public long incrementReplKey(java.sql.Connection conn)
throws java.lang.Exception
conn - the connection (it must not be null)
java.lang.Exception - if an exception occurs.
public boolean addTableToWatch(TableToWatchInfo tableToWatch,
boolean force,
java.lang.String[] destinations,
boolean forceSend)
throws java.lang.Exception
force - if true, then the trigger is added even if it exists already.destinations - can be null. If it has to be sent to an individual client you pass its session name here.
If you pass null, then it is published in pub/sub modus. If you want to publish it to more than one client,
you pass more destinations.forceSend - if true, all content data of the table will be sent.
java.lang.Exception - if an exception occurs on the backend. For example if the table already has been
added, it will throw an exception.
public void addSchemaToWatch(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema)
throws java.lang.Exception
catalog - schema -
java.lang.Exception
public void removeTableToWatch(TableToWatchInfo tableToWatch,
boolean removeAlsoSchemaTrigger)
throws java.lang.Exception
tableToWatch - removeAlsoSchemaTrigger - if true it will also remove the associated schema trigger.
java.lang.Exceptionpublic java.lang.StringBuffer getColumnStatement(SqlColumn colInfoDescription)
colInfoDescription - The info object describing this column.
public void initiateUpdate(java.lang.String topic,
java.lang.String replManagerAddress,
java.lang.String[] slaveName,
java.lang.String version,
java.lang.String initialFilesLocation)
throws java.lang.Exception
topic - replManagerAddress - the address to which to send acknowleges.slaveName - the name of the slave interested in these updatesversion - 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
public void initialCommand(java.lang.String[] slaveNames,
java.lang.String completeFilename,
java.lang.String version)
throws java.lang.Exception
slaveNames - an array containing the slaveNames to be updated. can be null.completeFilename - the filename to be used to execute.version - the version for which to start replication. If null the current version
is ment.
java.lang.Exception
public void initialCommandPre()
throws java.lang.Exception
java.lang.Exception - if an exception occurs when executing the script.
public boolean removeTrigger(java.lang.String triggerName,
java.lang.String tableName,
boolean isSchemaTrigger)
triggerName - tableName - isSchemaTrigger - true if the trigger to be removed is a schema trigger.
java.lang.Exception
public int wipeoutSchema(java.lang.String catalog,
java.lang.String schema,
boolean[] objectsToWipeout)
throws java.lang.Exception
catalog - schema - 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 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
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.Exceptionpublic java.lang.String getName()
public void addTriggersIfNeeded(boolean force,
java.lang.String[] destinations,
boolean forceSend)
throws java.lang.Exception
force - to force recreation of triggers even if they exist already.
java.lang.Exception
public boolean triggerExists(java.sql.Connection conn,
TableToWatchInfo tableToWatch)
throws java.lang.Exception
tableToWatch - The object containing the table to be checked for trigger
java.lang.Exception - If an exception occurs in the backend.
public void checkTriggerConsistency(boolean doFix)
throws java.lang.Exception
doFix -
java.lang.Exception
public byte[] broadcastStatement(java.lang.String sql,
long maxResponseEntries,
boolean isHighPrio,
boolean isMaster,
java.lang.String sqlTopic,
java.lang.String statementId)
throws java.lang.Exception
sql - maxResponseEntries - isHighPrio - isMaster - true if it is on the master side, i.e. in the DbWatcher. Then it will first put an entry in the
ITEMS table and thereafter execute the statement.sqlTopic - the topic on which the response will be published.statementId - The unique Id identifying this statement. This will also be the topic on which the response is sent.
java.lang.Exceptionpublic void cancelUpdate(java.lang.String replSlave)
replSlave - the String identifying the slave name.public void clearCancelUpdate(java.lang.String replSlave)
replSlave - the String identifying the slave name.public void setAttributeTransformer(I_AttributeTransformer transformer)
public boolean isDatasourceReadonly()
public void addTrigger(java.sql.Connection conn,
java.lang.String catalog,
java.lang.String schema,
java.lang.String tableName)
throws java.lang.Exception
java.lang.Exception
|
xmlBlaster 1.6.2 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||