|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Gump
This interface represents a grid machine provider. It provides grid machines
to consumers. The consumers that will receive the grid machines in the form
of Gum
instances, must implement the GumpClient
interface. The consumers will receive Gums asynchronously through invocations
of the GumpClient.hereIsGum()
method.
There are no guarantee that the provider will return any grid machine at all.
They will be provided accordingly to the availability and prioritizing
policies of the Gump
implementation. Moreover, the
Gum
s provided may become unavailable at any time.
The request for Gum
s should work in the following way: When a
consumer need grid machines it will invoke the method
Gump#requestGums
. The request will be registered at this
provider and should receive Gum
s, if available. If a request
is satisfied (i.e. it's got all the machines it's asked), the consumer should
invoke the Gump#pauseRequest
method, to tell the consumer it
need no more Gum
s. If a machine currently allocated to a
satisfied request is lost, the consumer will invoke the
Gump#resumeRequest
method. This will tell the provider that
the request need machines again. When a request should be finished (i.e. the
job is finished) the consumer should invoke the
Gump#finishRequestGums
at the provider. The provider will then
take all the machines in use from the consumer, and clean the information
about the request.
The methods Gump#requestGums, Gump#pauseRequest, Gump#resumeRequest and Gump#finishRequestGums must result in a broadcast to the entire Ourgrid community (i.e. all know peers).
This interface is part of the core interfaces of the OurGrid project, along
with Gum
and GumpClient
. They define a general
way of getting access to and use machines on a grid, abstracting differences
on doing so.
Method Summary | |
---|---|
void |
disposeGum(long requestID,
GumID gumID)
Informs the provider that a given grid machine is not needed anymore. |
void |
finishRequestGums(long requestID)
Informs the provider that it must stop providing grid machines for the consumer who made a given request. |
ObjectID |
getObjectID()
Returns the identification object related to this GridMachineProvider . |
void |
pauseRequestGums(long requestID)
Suspends a request for gums. |
void |
requestGums(RequestSpec requestSpec)
Requests grid machines according to the specification contained in a RequestSpec . |
void |
resumeRequestGums(long requestID)
Resumes a request for gums. |
void |
unwantedGum(long requestID,
GumID gumID)
Informs the provider that a given grid machine is not needed anymore. |
Method Detail |
---|
void requestGums(RequestSpec requestSpec) throws java.rmi.RemoteException, RequestAlreadyExistsException
RequestSpec
. This event must be broadcasted to the entire
Ourgrid community (that is, all know peers).
requestSpec
- specification of the request
java.rmi.RemoteException
- if some RMI error occurs during the method
invocation.
RequestAlreadyExistsException
- another request with the same ID
already existsvoid finishRequestGums(long requestID) throws java.rmi.RemoteException
requestID
- the unique ID that represents the request that needs no
more grid machines.
java.rmi.RemoteException
- if some RMI error occurs during the method
invocation.void pauseRequestGums(long requestID) throws java.rmi.RemoteException
requestID
- the identification of the request that will be
suspended.
java.rmi.RemoteException
- if some RMI error occurs during the method
invocation.void resumeRequestGums(long requestID) throws java.rmi.RemoteException
requestID
- the identification of the request that will be resumed.
java.rmi.RemoteException
- if some RMI error occurs during the method
invocation.void disposeGum(long requestID, GumID gumID) throws java.rmi.RemoteException
unwantedGum(long, org.ourgrid.common.id.GumID)
call should
be used.
requestID
- the unique ID that represents the request that wants to
dispose the grid machine.gumID
- identification of the grid machine
java.rmi.RemoteException
- if some RMI error occurs during the method
invocation.unwantedGum(long, GumID)
void unwantedGum(long requestID, GumID gumID) throws java.rmi.RemoteException
disposeGum(long, org.ourgrid.common.id.GumID)
,
when a Peer receives this call it will no longer deliver this machines to
the same request.
requestID
- the unique ID that represents the request which no
longer wants this grid machine.gumID
- identification of the grid machine
java.rmi.RemoteException
- if some RMI error occurs during the method
invocation.disposeGum(long, GumID)
ObjectID getObjectID() throws java.rmi.RemoteException
GridMachineProvider
.
java.rmi.RemoteException
- if some RMI error occurs during the method
invocation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |