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
-
RemoteObjectReference(String, int, UniqueID)
- This method creates a system-wide unique ID.
-
equals(Object)
-
This method compares two IDs.
-
getHostName()
- This method returns the name of the computer the process is located.
-
getID()
- This method returns the unique ID which is only valid within the process.
-
getPort()
- This method returns the port on which the process is listening.
-
hashCode()
-
This method determins the Hashcode of the RemoteObjectReference.
-
toString()
-
This method generates a string representation.
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).
getHostName
public String getHostName()
- This method returns the name of the computer the process is located.
- Returns:
- The name of the computer
getPort
public int getPort()
- This method returns the port on which the process is listening.
- Returns:
- The port
getID
public UniqueID getID()
- This method returns the unique ID which is only valid within the process.
- Returns:
- The port
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
hashCode
public int hashCode()
- This method determins the Hashcode of the RemoteObjectReference.
- Returns:
- Hashcode
- Overrides:
- hashCode in class Object
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