|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
General interface for a Frugal Resource, capable of performing work for the caller. It does not offer leases, as it yields control to the caller's code.
| 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. |
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. |
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. |
| 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)
throws java.rmi.RemoteException
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 double globalMaxLoad()
throws java.rmi.RemoteException
public long globalMaxSpeed()
throws java.rmi.RemoteException
public long machineCount()
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||