Project

General

Profile

« Previous | Next » 

Revision 6118

handle timed replication of system metadata. there are still a few outstanding issues:
-track server location of system metadata-only entries
-replication policy flag for system metadata-only entries?
-locking for replicated entries?
-forced replication of entries

View differences:

ReplicationServerList.java
27 27

  
28 28
package edu.ucsb.nceas.metacat.replication;
29 29

  
30
import java.sql.PreparedStatement;
31
import java.sql.ResultSet;
32
import java.sql.SQLException;
33
import java.util.Date;
34
import java.util.Vector;
35

  
36
import org.apache.log4j.Logger;
37

  
30 38
import edu.ucsb.nceas.metacat.database.DBConnection;
31 39
import edu.ucsb.nceas.metacat.database.DBConnectionPool;
32 40
import edu.ucsb.nceas.metacat.database.DatabaseService;
33 41

  
34
import java.util.Vector;
35
import java.sql.*;
36

  
37
import org.apache.log4j.Logger;
38

  
39 42
/**
40 43
 * A class represent a replication server list in xml_replcation table
41 44
 */
......
95 98
        String serverName = rs.getString(1);
96 99
        logMetacat.info("ServerName: "+serverName);
97 100
        //Last check date
98
        String lastChecked = rs.getString(2);
101
        Date lastChecked = rs.getDate(2);
99 102
        logMetacat.info("Last checked time: "+lastChecked);
100 103
        //Replication value
101 104
        int replication = rs.getInt(3);
......
313 316
   * @param givenServerName, the server's name which we want to get last checked
314 317
   * out date
315 318
   */
316
  public synchronized String getLastCheckedDate(String givenServerName)
319
  public synchronized Date getLastCheckedDate(String givenServerName)
317 320
  {
318 321
    int index = -1;//Variable to store the index
319 322
    ReplicationServer server = null;//Variable for replication server

Also available in: Unified diff