edu.ucsb.nceas.metacat
Class ReplicationHandler

java.lang.Object
  |
  +--java.util.TimerTask
        |
        +--edu.ucsb.nceas.metacat.ReplicationHandler
All Implemented Interfaces:
java.lang.Runnable

public class ReplicationHandler
extends java.util.TimerTask

This class handles deltaT replication checking. Whenever this TimerTask is fired it checks each server in xml_replication for updates and updates the local db as needed.


Constructor Summary
ReplicationHandler(java.io.PrintWriter o)
           
ReplicationHandler(java.io.PrintWriter o, int serverCheckCode)
           
 
Method Summary
static java.util.Hashtable buildServerList(java.sql.Connection conn)
          Method to query xml_replication and build a hashtable of each server and it's last update time.
static org.xml.sax.XMLReader initParser(org.xml.sax.helpers.DefaultHandler dh)
          Method to initialize the message parser
 void run()
          Method that implements TimerTask.run().
 
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
 

Constructor Detail

ReplicationHandler

public ReplicationHandler(java.io.PrintWriter o)

ReplicationHandler

public ReplicationHandler(java.io.PrintWriter o,
                          int serverCheckCode)
Method Detail

run

public void run()
Method that implements TimerTask.run(). It runs whenever the timer is fired.
Overrides:
run in class java.util.TimerTask

buildServerList

public static java.util.Hashtable buildServerList(java.sql.Connection conn)
Method to query xml_replication and build a hashtable of each server and it's last update time.
Parameters:
conn - a connection to the database

initParser

public static org.xml.sax.XMLReader initParser(org.xml.sax.helpers.DefaultHandler dh)
                                        throws java.lang.Exception
Method to initialize the message parser


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.