com.continuent.tungsten.replicator.loader
Class LoaderCtrl

java.lang.Object
  extended by com.continuent.tungsten.replicator.loader.LoaderCtrl

public class LoaderCtrl
extends java.lang.Object


Field Summary
protected static ArgvIterator argvIterator
           
protected  java.lang.String configFile
           
protected static java.lang.String defaultConfigPath
          Default path to replicator.properties if user not specified other.
protected  TungstenProperties loaderProperties
           
 
Constructor Summary
LoaderCtrl(java.lang.String configFile, TungstenProperties loaderProperties)
          Creates a new THLManagerCtrl object.
 
Method Summary
protected  TungstenProperties buildLoaderConfig()
           
protected static void fail()
          Exit with a process failure code.
protected static void fatal(java.lang.String msg, java.lang.Throwable t)
          Abort following a fatal error.
 void loadEvents()
           
static void main(java.lang.String[] argv)
          Read command line arguments in run the Loader process
 void prepare()
          Connect to the underlying database containing THL.
protected static void print(java.lang.String msg)
          Print a message to stdout without trailing new line character.
protected static void println(java.lang.String msg)
          Print a message to stdout with trailing new line character.
protected  TungstenProperties readConfig()
          Reads the replicator.properties.
 void release()
          Disconnect from the THL database.
protected static void succeed()
          Exit with a process success code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultConfigPath

protected static final java.lang.String defaultConfigPath
Default path to replicator.properties if user not specified other.


argvIterator

protected static ArgvIterator argvIterator

configFile

protected java.lang.String configFile

loaderProperties

protected TungstenProperties loaderProperties
Constructor Detail

LoaderCtrl

public LoaderCtrl(java.lang.String configFile,
                  TungstenProperties loaderProperties)
           throws java.lang.Exception
Creates a new THLManagerCtrl object.

Parameters:
configFile - Path to the Tungsten properties file.
Throws:
java.lang.Exception
Method Detail

readConfig

protected TungstenProperties readConfig()
                                 throws java.lang.Exception
Reads the replicator.properties.

Throws:
java.lang.Exception

main

public static void main(java.lang.String[] argv)
Read command line arguments in run the Loader process

Parameters:
argv -

prepare

public void prepare()
             throws ReplicatorException,
                    java.lang.InterruptedException
Connect to the underlying database containing THL.

Throws:
ReplicatorException
java.lang.InterruptedException

release

public void release()
Disconnect from the THL database.


buildLoaderConfig

protected TungstenProperties buildLoaderConfig()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

loadEvents

public void loadEvents()
                throws java.lang.Exception
Throws:
java.lang.Exception

println

protected static void println(java.lang.String msg)
Print a message to stdout with trailing new line character.

Parameters:
msg -

print

protected static void print(java.lang.String msg)
Print a message to stdout without trailing new line character.

Parameters:
msg -

fatal

protected static void fatal(java.lang.String msg,
                            java.lang.Throwable t)
Abort following a fatal error.

Parameters:
msg -
t -

fail

protected static void fail()
Exit with a process failure code.


succeed

protected static void succeed()
Exit with a process success code.