edu.cmu.mse.vault.repman
Class VaultReplicationServer

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byedu.cmu.mse.vault.repman.VaultReplicationServer
All Implemented Interfaces:
IVaultReplicationManager, java.rmi.Remote, java.io.Serializable

public class VaultReplicationServer
extends java.rmi.server.UnicastRemoteObject
implements IVaultReplicationManager

Author:
Soumya
See Also:
Serialized Form

Field Summary
static java.util.Properties properties
           
static java.lang.String VAULT_REP_MANAGER
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
protected VaultReplicationServer()
           
 
Method Summary
 java.util.List getAccountRefNames()
          Returns a java.util.List of Account references.
 int getCurrentActiveReplicas()
          Returns number of current active replicas
 java.util.List getCustomerRefNames()
          Returns a java.util.List of Customer references.
 java.lang.String getJNDIHostName()
          Returns a host name where the global JNDI server is running.
 int getNumberOfReplicas()
          Returns the number of active replicas
 java.util.List getTransactionRefNames()
          Returns a java.util.List of Transaction references.
static void loadProperties()
          Load properties from the vaultjndi.properties file.
static void main(java.lang.String[] arg)
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VAULT_REP_MANAGER

public static final java.lang.String VAULT_REP_MANAGER
See Also:
Constant Field Values

properties

public static java.util.Properties properties
Constructor Detail

VaultReplicationServer

protected VaultReplicationServer()
                          throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

main

public static void main(java.lang.String[] arg)

loadProperties

public static void loadProperties()
Load properties from the vaultjndi.properties file. Now, the properties file contains three properties - MAX_NUM_SERVER_INSTANCES - PERIOD_CHECK_JNDI - PREFIX_JNDI_NAME


getJNDIHostName

public java.lang.String getJNDIHostName()
                                 throws java.rmi.RemoteException
Description copied from interface: IVaultReplicationManager
Returns a host name where the global JNDI server is running.

Specified by:
getJNDIHostName in interface IVaultReplicationManager
Returns:
Throws:
java.rmi.RemoteException

getAccountRefNames

public java.util.List getAccountRefNames()
                                  throws java.rmi.RemoteException
Description copied from interface: IVaultReplicationManager
Returns a java.util.List of Account references. The client must take these values and use them to get actual object from the JNDI server.

Specified by:
getAccountRefNames in interface IVaultReplicationManager
Returns:
Throws:
java.rmi.RemoteException

getCustomerRefNames

public java.util.List getCustomerRefNames()
                                   throws java.rmi.RemoteException
Description copied from interface: IVaultReplicationManager
Returns a java.util.List of Customer references. The client must take these values and use them to get actual object from the JNDI server.

Specified by:
getCustomerRefNames in interface IVaultReplicationManager
Returns:
Throws:
java.rmi.RemoteException

getTransactionRefNames

public java.util.List getTransactionRefNames()
                                      throws java.rmi.RemoteException
Description copied from interface: IVaultReplicationManager
Returns a java.util.List of Transaction references. The client must take these values and use them to get actual object from the JNDI server.

Specified by:
getTransactionRefNames in interface IVaultReplicationManager
Returns:
Throws:
java.rmi.RemoteException

getNumberOfReplicas

public int getNumberOfReplicas()
                        throws java.rmi.RemoteException
Description copied from interface: IVaultReplicationManager
Returns the number of active replicas

Specified by:
getNumberOfReplicas in interface IVaultReplicationManager
Returns:
Throws:
java.rmi.RemoteException

getCurrentActiveReplicas

public int getCurrentActiveReplicas()
                             throws java.rmi.RemoteException
Description copied from interface: IVaultReplicationManager
Returns number of current active replicas

Specified by:
getCurrentActiveReplicas in interface IVaultReplicationManager
Returns:
Throws:
java.rmi.RemoteException