edu.ucsb.nceas.metacat
Class ReplicationServerList

java.lang.Object
  extended byedu.ucsb.nceas.metacat.ReplicationServerList

public class ReplicationServerList
extends java.lang.Object

A class represent a replication server list in xml_replcation table


Constructor Summary
ReplicationServerList()
          constructor of ReplicationServerList It will build server list.
 
Method Summary
 void addToServerListIfItIsNot(java.lang.String givenServerName)
          To a given server name, to check if it is in the server list.
 boolean getDataReplicationValue(java.lang.String givenServerName)
          To a given server name, try to get its data file replciation option If couldn't find the server in the server list, false will return
 boolean getHubValue(java.lang.String givenServerName)
          To a given server name, try to get its hub option If couldn't find the server in the server list, false will return
 java.lang.String getLastCheckedDate(java.lang.String givenServerName)
          To a given server name, try to get its lastcheck date.
 boolean getReplicationValue(java.lang.String givenServerName)
          To a given server name, try to get its xml replciation option If couldn't find the server in the server list, false will return
 boolean isEmpty()
          Method to determine the server list is empty or not
 boolean isGivenServerInList(java.lang.String givenServerName)
          Method to determine if a given server in the replication server list
 ReplicationServer serverAt(int index)
          Method to get a server object given a index number
 int size()
          Method to get the size of serverList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationServerList

public ReplicationServerList()
constructor of ReplicationServerList It will build server list. If only local host exists, ther server list will be null

Method Detail

isEmpty

public boolean isEmpty()
Method to determine the server list is empty or not


size

public int size()
Method to get the size of serverList


serverAt

public ReplicationServer serverAt(int index)
Method to get a server object given a index number


isGivenServerInList

public boolean isGivenServerInList(java.lang.String givenServerName)
Method to determine if a given server in the replication server list


getLastCheckedDate

public java.lang.String getLastCheckedDate(java.lang.String givenServerName)
To a given server name, try to get its lastcheck date. If couldn't find the server in the server list, null will return


getReplicationValue

public boolean getReplicationValue(java.lang.String givenServerName)
To a given server name, try to get its xml replciation option If couldn't find the server in the server list, false will return


getDataReplicationValue

public boolean getDataReplicationValue(java.lang.String givenServerName)
To a given server name, try to get its data file replciation option If couldn't find the server in the server list, false will return


getHubValue

public boolean getHubValue(java.lang.String givenServerName)
To a given server name, try to get its hub option If couldn't find the server in the server list, false will return


addToServerListIfItIsNot

public void addToServerListIfItIsNot(java.lang.String givenServerName)
To a given server name, to check if it is in the server list. If it is not, add it to server list and the xml_replication table This method is for a document was replicated by a hub and the document's home server is not in the replication table. The value for replicate, datareplicate and hub are all false



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