nathan.middleware
Class RemoteObjectMapping

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

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

RemoteObjectMapping 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
Advance Operating Systems CIS 578
University of Michigan Dearborn
Remote Method Invocation Middleware Project
See Also:
Serialized Form

Constructor Summary
RemoteObjectMapping()
          Creates a new instance of RemoteObjectMapping
RemoteObjectMapping(boolean isReplicated, RemoteObjectReference ror)
          Creates a new instance of RemoteObjectMapping
 
Method Summary
 void addRemoteObject(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 getRemoteObjects()
          Gets all of the replicated objects of the front end.
 boolean isReplicated()
          Returns true if replication is being used.
 void removeRemoteObject(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.
 int size()
          Returns the number of replicated objects managed by the frontend.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteObjectMapping

public RemoteObjectMapping()
Creates a new instance of RemoteObjectMapping


RemoteObjectMapping

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

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.

getRemoteObjects

public java.util.Vector getRemoteObjects()
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.

addRemoteObject

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

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

removeRemoteObject

public void removeRemoteObject(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 -

size

public int size()
Returns the number of replicated objects managed by the frontend.

Returns:
the number of replicated objects.