|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--edu.jhu.cnds.Frugal.FrugalManagerServer
A server class, designed to register Frugal Manager implementations with lookup services.
This class also takes responsibility for updating Frugal Resource classes with information about the global maximum load and the number of Frugal Resources available. Obviously, the Frugal Manager defines the global state relative to the lookup services and groups it monitors itself. If there are several FrugalManagerServers running, viewing different but intersecting sets of groups and services, the Frugal Resource classes they manage in common can display inconsistent information. The Frugal Managers will continue to behave correctly relative to the world they know of. Frugal Resources have no functional reason to monitor the lookup services. They use the global state only to display their cost to users using lookup browsers. Therefore, this behavior is not likely to change.
| Field Summary | |
protected net.jini.lookup.JoinManager |
isabella
Workhorse server class from Sun. |
protected net.jini.lease.LeaseRenewalManager |
serviceLease
LeaseRenewalManager for this class' leases. |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
FrugalManagerServer(java.lang.String[] argv)
Loads persistent data, creates an implementation of the Frugal Manager service, and registers it. |
|
| Method Summary | |
void |
checkpoint()
Saves recent changes to this class' persistent data. |
void |
dock()
Kills the service. |
java.lang.Object |
getAdmin()
Returns an administrative interface for the relevant Frugal Manager. |
net.jini.lookup.JoinManager |
getIsabella()
Returns this class' JoinManager. |
java.io.File |
getMonument()
Returns the persistent storage for this server. |
protected void |
inform(FrugalResourceRemote r)
Informs a Frugal Resource of the global state. |
static void |
main(java.lang.String[] argv)
Starts the server running. |
void |
setMonument(java.io.File monument)
Sets the persistent storage for this server. |
protected void |
startAdjutant()
Initializes a FrugalManagerEars class that watches for Frugal Resources. |
protected void |
update()
Updates known Frugal Resources every minute with information about the global state. |
| 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 |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected transient net.jini.lease.LeaseRenewalManager serviceLease
protected net.jini.lookup.JoinManager isabella
| Constructor Detail |
public FrugalManagerServer(java.lang.String[] argv)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.rmi.RemoteException
argv - These should be the same arguments as those passed to main.| Method Detail |
public static void main(java.lang.String[] argv)
argv - List of command-line argument strings.
protected void startAdjutant()
throws java.rmi.RemoteException
protected void update()
throws java.io.IOException
public void dock()
public java.io.File getMonument()
public void setMonument(java.io.File monument)
monument - The new persistent storage location.public net.jini.lookup.JoinManager getIsabella()
public java.lang.Object getAdmin()
throws java.rmi.RemoteException
public void checkpoint()
throws java.io.IOException,
java.lang.ClassNotFoundException
protected void inform(FrugalResourceRemote r)
throws java.rmi.RemoteException
r - A Frugal Resource that may not yet know the global state.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||