nathan.middleware
Class ReplicatedObjectMapping

java.lang.Object
  extended by nathan.middleware.ReplicatedObjectMapping
All Implemented Interfaces:
java.io.Serializable

public class ReplicatedObjectMapping
extends java.lang.Object
implements java.io.Serializable

ReplicatedObjectMapping is used to store information about the replicated objects in the system, along with information about the front end to the active replication manager.

Author:
Nathan Balon
See Also:
Serialized Form

Constructor Summary
ReplicatedObjectMapping()
          Creates a new instance of ReplicatedObjectMapping
ReplicatedObjectMapping(boolean isReplicated, RemoteObjectReference ror)
          Creates a new instance of ReplicatedObjectMapping
 
Method Summary
 void addReplicatedObject(RemoteObjectReference ror)
          Adds a new replicated object.
 java.net.InetAddress getFrontEndAddress()
          Get the address of where the front of the replication manager is located.
 int getFrontEndPort()
          Gets the port number of the front end.
 RemoteObjectReference getFrontEndROR()
          Get the remote object reference for the front end so that it can be located
 java.util.Vector getReplicatedObjects()
          Gets all of the replicated objects of the front end.
 boolean isReplicated()
          Returns true if replication is being used.
 void removeReplicatedObject(RemoteObjectReference ror)
          Removes a specific remote object from the replication manager.
 void setFrontEnd(java.net.InetAddress address, int port)
          Sets the front end address
 void setFrontEndAddress(java.net.InetAddress frontEndAddress)
          Sets the address of the Front end.
 void setFrontEndPort(int frontEndPort)
          Sets the port number for the front end.
 void setReplicated(boolean isReplicated)
          Sets if repilication is used.
 void setReplicatedObjects(java.util.Vector<RemoteObjectReference> replicateObjects)
          Set the replicated objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicatedObjectMapping

public ReplicatedObjectMapping()
Creates a new instance of ReplicatedObjectMapping


ReplicatedObjectMapping

public ReplicatedObjectMapping(boolean isReplicated,
                               RemoteObjectReference ror)
Creates a new instance of ReplicatedObjectMapping

Parameters:
isReplicated - Is the replication being used.
ror - The RemoteObjectReference of the front end.
Method Detail

getFrontEndROR

public RemoteObjectReference getFrontEndROR()
Get the remote object reference for the front end so that it can be located

Returns:
RemoteObjectReference of the front end.

getFrontEndAddress

public java.net.InetAddress getFrontEndAddress()
Get the address of where the front of the replication manager is located.

Returns:
InetAddress the frontEnd address.

setFrontEndAddress

public void setFrontEndAddress(java.net.InetAddress frontEndAddress)
Sets the address of the Front end.

Parameters:
frontEndAddress - The frontEnd address to set.

getFrontEndPort

public int getFrontEndPort()
Gets the port number of the front end.

Returns:
int Returns the frontEndPort.

setFrontEndPort

public void setFrontEndPort(int frontEndPort)
Sets the port number for the front end.

Parameters:
frontEndPort - The frontEndPort to set.

setFrontEnd

public void setFrontEnd(java.net.InetAddress address,
                        int port)
Sets the front end address

Parameters:
address - The IP address of the front end.
port - The port number of the front end.

getReplicatedObjects

public java.util.Vector getReplicatedObjects()
Gets all of the replicated objects of the front end.

Returns:
Returns the replicateObjects.

setReplicatedObjects

public void setReplicatedObjects(java.util.Vector<RemoteObjectReference> replicateObjects)
Set the replicated objects.

Parameters:
replicateObjects - The replicateObjects to set.

addReplicatedObject

public void addReplicatedObject(RemoteObjectReference ror)
Adds a new replicated object.

Parameters:
ror - The remote object reference for a remote object.

removeReplicatedObject

public void removeReplicatedObject(RemoteObjectReference ror)
Removes a specific remote object from the replication manager.

Parameters:
ror - The remote object reference to be removed.

isReplicated

public boolean isReplicated()
Returns true if replication is being used.

Returns:
boolean is replication used.

setReplicated

public void setReplicated(boolean isReplicated)
Sets if repilication is used.

Parameters:
isReplicated -