org.xmlBlaster.contrib.replication
Class ReplicationScheduler
java.lang.Object
java.util.TimerTask
org.xmlBlaster.contrib.dbwatcher.detector.AlertScheduler
org.xmlBlaster.contrib.replication.ReplicationScheduler
- All Implemented Interfaces:
- java.lang.Runnable, I_AlertProducer
public class ReplicationScheduler
- extends AlertScheduler
ReplicationScheduler extends the AlertScheduler which is a poller to the database. The only purpose of this
extention is to call a stored procedure which triggers a detection of changes in structure of the tables
currently watched and/or replicated. The call to this stored procedure is only needed in such database
implementations where it is not possible to get CREATE TABLE, DROP TABLE or ALTER TABLE events by means of
trigger. This is for example the case of PostGres 8.0.
- Author:
- Michele Laghi
Method Summary |
void |
init(I_Info info,
I_ChangeDetector changeDetector)
Needs to be called after construction. |
void |
run()
Used by scheduler thread internally. |
void |
shutdown()
Stop the scheduler. |
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dbSpecific
private I_DbSpecific dbSpecific
isInit
private boolean isInit
ReplicationScheduler
public ReplicationScheduler()
ReplicationScheduler
public ReplicationScheduler(I_Info info,
I_ChangeDetector changeDetector)
throws java.lang.Exception
- Create a scheduler, calls
init(org.xmlBlaster.contrib.I_Info, org.xmlBlaster.contrib.dbwatcher.detector.I_ChangeDetector)
.
- Parameters:
info
- The configuration environmentchangeDetector
- The class to be alerted then and again
- Throws:
java.lang.Exception
init
public void init(I_Info info,
I_ChangeDetector changeDetector)
throws java.lang.Exception
- Description copied from interface:
I_AlertProducer
- Needs to be called after construction.
- Specified by:
init
in interface I_AlertProducer
- Overrides:
init
in class AlertScheduler
- Parameters:
info
- The configuration environment
- Throws:
java.lang.Exception
- Can be any plugin specific exception- See Also:
I_DataConverter.init(I_Info)
run
public void run()
- Used by scheduler thread internally.
- Specified by:
run
in interface java.lang.Runnable
- Overrides:
run
in class AlertScheduler
shutdown
public void shutdown()
throws java.lang.Exception
- Stop the scheduler.
- Specified by:
shutdown
in interface I_AlertProducer
- Overrides:
shutdown
in class AlertScheduler
- Throws:
java.lang.Exception
- of any type- See Also:
I_AlertProducer.shutdown()
Copyright © 1999-2014 The xmlBlaster.org contributers.