org.xmlBlaster.contrib.replication
Class ReplicationAgent
java.lang.Object
org.xmlBlaster.contrib.replication.ReplicationAgent
- All Implemented Interfaces:
- I_InitialUpdateListener
public class ReplicationAgent
- extends java.lang.Object
- implements I_InitialUpdateListener
Test basic functionality.
To run most of the tests you need to have a database (for example Postgres).
The connection configuration (url, password etc.) is configured as JVM
property or in #createTest(I_Info, Map)
and
#setUpDbPool(I_Info)
- Author:
- Michele Laghi
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReplicationAgent
public ReplicationAgent()
- Default ctor.
prepare
public GlobalInfo prepare(java.lang.String[] args)
throws java.lang.Exception
- Throws:
java.lang.Exception
isRunning
public boolean isRunning()
main
public static void main(java.lang.String[] args)
- Keys are the info objects and values are maps containing the used properties as key/value pairs.
getDbWatcher
public I_ChangeListener getDbWatcher()
getDbWriter
public DbWriter getDbWriter()
createWriterInfo
public I_Info createWriterInfo(GlobalInfo cfgInfo)
throws java.lang.Exception
- Throws:
java.lang.Exception
init
public void init(I_Info readerInfo,
I_Info writerInfo)
throws java.lang.Exception
- Initializes the necessary stuff (encapsulated DbWatcher and DbWriter) and starts the DbWriter.
Note that the DbWatcher is only started if used, i.e. if the readerInfo is not null.
- Parameters:
readerInfo
- writerInfo
-
- Throws:
java.lang.Exception
startInitialUpdate
public void startInitialUpdate()
throws java.lang.Exception
- Specified by:
startInitialUpdate
in interface I_InitialUpdateListener
- Throws:
java.lang.Exception
stopInitialUpdate
public void stopInitialUpdate()
throws java.lang.Exception
- Specified by:
stopInitialUpdate
in interface I_InitialUpdateListener
- Throws:
java.lang.Exception
shutdown
public void shutdown()
process
public final void process(I_Info readerInfo,
I_Info writerInfo)
throws java.lang.Exception
- Throws:
java.lang.Exception
registerForUpdates
public void registerForUpdates(I_Update registeredForUpdates)
Copyright © 1999-2014 The xmlBlaster.org contributers.