|
|||||||||
| 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.FrugalResourceImpl
Concrete implementation of a Frugal Resource, capable of performing work for the caller.
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
FrugalResourceImpl()
This constructor performs no actions at this time. |
|
FrugalResourceImpl(FrugalResourceServer backend)
Constructs a new implementation of the Frugal Resource interface. |
|
| Method Summary | |
long |
currentFreeMemory()
Provides information used to calculate the cost to use this resource. |
long |
currentSpeed()
Provides information used to calculate the cost to use this resource. |
long |
currentUsedMemory()
Provides information used to calculate the cost to use this resource. |
void |
exit()
Exits the VM. |
java.lang.Object |
getAdmin()
Returns an administrative interface for this Frugal Resource. |
double |
globalMaxLoad()
Provides information to the CostBean. |
long |
globalMaxSpeed()
Provides information to the CostBean. |
void |
inform(long machines,
double globalMax,
long globalMaxSpeed)
Receives information on global state. |
long |
machineCount()
Provides information to the CostBean. |
double |
maxLoad()
Provides information used to calculate the cost to use this resource. |
long |
maxSpeed()
Provides information used to calculate the cost to use this resource. |
long |
minSpeed()
Provides information used to calculate the cost to use this resource. |
void |
run()
Creates a load tester implementation, which will test the speed of the system where this Frugal Resource is executing, performing calculations for 1 second in every 30. |
java.lang.Object[] |
run(Projectable submittedClass,
java.lang.Object[] argv)
Performs work for a remote class. |
void |
startTesting()
Spawns a thread that tests the speed of the system where this Frugal Resource is executing, performing calculations for 1 second in every 30. |
long |
totalMemory()
Provides information used to calculate the cost to use this resource. |
| 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 |
| Constructor Detail |
public FrugalResourceImpl()
throws java.rmi.RemoteException
public FrugalResourceImpl(FrugalResourceServer backend)
throws java.rmi.RemoteException
backend - The server that advertises this implementation on the various lookup groups.| Method Detail |
public java.lang.Object[] run(Projectable submittedClass,
java.lang.Object[] argv)
throws java.rmi.RemoteException
submittedClass - A class containing the code for the work it should do. The Frugal Resource will invoke its 'main' method with the given arguments.argv - Arguments to that class.
public void exit()
throws java.rmi.RemoteException
public void inform(long machines,
double globalMax,
long globalMaxSpeed)
machines - The number of Frugal Resources in the system.globalMax - The highest load seen, globally, rounded to the next highest integral power of 2.globalMaxSpeed - The highest speed seen, globally.
public long machineCount()
throws java.rmi.RemoteException
public double globalMaxLoad()
throws java.rmi.RemoteException
public long globalMaxSpeed()
throws java.rmi.RemoteException
public long totalMemory()
throws java.rmi.RemoteException
public long currentFreeMemory()
throws java.rmi.RemoteException
public long currentUsedMemory()
throws java.rmi.RemoteException
public long currentSpeed()
throws java.rmi.RemoteException
public long maxSpeed()
throws java.rmi.RemoteException
public long minSpeed()
throws java.rmi.RemoteException
public double maxLoad()
throws java.rmi.RemoteException
public void startTesting()
throws java.rmi.RemoteException
public void run()
public java.lang.Object getAdmin()
throws java.rmi.RemoteException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||