All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class replica.RemoteObjectReference

java.lang.Object
   |
   +----replica.RemoteObjectReference

public class RemoteObjectReference
extends Object
This class is only important if you want to add your own replication strategy. It provides system-wide unique IDs.

Version:
1.0
Author:
Markus Jäger

Constructor Index

 o RemoteObjectReference(String, int, UniqueID)
This method creates a system-wide unique ID.

Method Index

 o equals(Object)
This method compares two IDs.
 o getHostName()
This method returns the name of the computer the process is located.
 o getID()
This method returns the unique ID which is only valid within the process.
 o getPort()
This method returns the port on which the process is listening.
 o hashCode()
This method determins the Hashcode of the RemoteObjectReference.
 o toString()
This method generates a string representation.

Constructors

 o RemoteObjectReference
 public RemoteObjectReference(String newHost,
                              int newPort,
                              UniqueID newID)
This method creates a system-wide unique ID.

Parameters:
newHost - The name of the computer the process is located.
newPort - The port on which the process is listening.
newID - A unique ID (valid within the process).

Methods

 o getHostName
 public String getHostName()
This method returns the name of the computer the process is located.

Returns:
The name of the computer
 o getPort
 public int getPort()
This method returns the port on which the process is listening.

Returns:
The port
 o getID
 public UniqueID getID()
This method returns the unique ID which is only valid within the process.

Returns:
The port
 o equals
 public boolean equals(Object obj)
This method compares two IDs.

Parameters:
obj - RemoteObjectReference to compare with
Returns:
True if equal IDs
Overrides:
equals in class Object
 o hashCode
 public int hashCode()
This method determins the Hashcode of the RemoteObjectReference.

Returns:
Hashcode
Overrides:
hashCode in class Object
 o toString
 public String toString()
This method generates a string representation.

Returns:
String representation
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index