net.rmi.rmiSynth
Class HostManager
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
net.rmi.rmiSynth.HostManager
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, HostManagerInterface
public class HostManager
- extends java.rmi.server.UnicastRemoteObject
- implements HostManagerInterface
The HostManager is invoked
remotely by unicast remote protocol. New
workers that enter into the grid must know the
IP address of the HostManager We need to
provide a leasing mechanism that expires a
host. First start the host manager. Then start
the computation servers. Finally start the
compute client
- See Also:
- Serialized Form
| 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 |
getClass, notify, notifyAll, wait, wait, wait |
hostManagerAddress
public static final java.lang.String hostManagerAddress
- See Also:
- Constant Field Values
getHosts
public Host[] getHosts()
throws java.rmi.RemoteException
- Specified by:
getHosts in interface HostManagerInterface
- Throws:
java.rmi.RemoteException
getProxy
public static HostManagerInterface getProxy()
- Use getProxy to gain remote access to the
host manager. If proxy was already
obtained, this invocation will not look it
up again.
add
public void add(Host h)
throws java.rmi.RemoteException
- Specified by:
add in interface HostManagerInterface
- Throws:
java.rmi.RemoteException
contains
public boolean contains(Host h)
indexOf
public int indexOf(Host h,
int index)
equals
public static boolean equals(Host h1,
Host h2)
getNextHost
public Host getNextHost()
throws java.rmi.RemoteException
getNextHost returns the next
host in the list, with wrap-around.
- Specified by:
getNextHost in interface HostManagerInterface
- Throws:
java.rmi.RemoteException
removeOldHosts
public void removeOldHosts()
remove
public void remove(Host h)
update
public void update(Host h)
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
main
public static void main(java.lang.String[] args)