|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.peer.manager.request.RequestManager
public class RequestManager
Keeps track of all the requests and manage them.
Method Summary | |
---|---|
RequestEntry |
createRequestEntry(RequestSpec requestSpec)
Creates and stores a request. |
void |
deleteConsumerRequests(ObjectID consumerID)
|
void |
deleteRequest(long requestID)
Informs that this request was canceled by its consumer. |
java.util.Collection<RequestEntry> |
getAliveRequests(RequestSpec.RequestSource source)
|
java.util.Collection<RequestEntry> |
getConsumerRequests(ObjectID peerID)
Recovers a Collection containing all PeerID
local RequestEntry |
java.util.Collection<java.lang.Long> |
getConsumerRequestsIDs(ObjectID consumerID)
Recovers a Collection containing all PeerID
local RequestEntry |
java.util.Collection<GumpClient> |
getConsumers(RequestSpec.RequestSource source)
Gets a Collection containing all consumers (local or remote) |
java.util.Collection<ObjectID> |
getConsumersIDs(RequestSpec.RequestSource source)
Gets a Collection containing all Id's of current consumers |
GumpClient |
getGumpClient(long requestID)
Get the GumpClient of the given request id. |
java.util.Collection<GumID> |
getGums(GumpClient gumpClient)
|
java.util.Collection<GumID> |
getGums(GumpClient gumpClient,
AllocationEntry.GumSource source)
|
java.util.Collection<GumID> |
getGums(ObjectID peerID)
|
java.util.Collection<GumID> |
getGums(ObjectID peerID,
AllocationEntry.GumSource source)
|
static RequestManager |
getInstance()
|
java.util.Collection<GumID> |
getRequestGums(long requestID)
|
int |
getRequestNeededGums(long requestId)
|
java.util.Collection<RequestEntry> |
getRequests(GumpClient gumpClient)
Recovers a Collection containing all
GumpClient local RequestEntry |
RequestSpec |
getRequestSpec(long requestID)
|
java.util.Collection<RequestEntry> |
getRequestsThatNeedGums(java.util.Collection<RequestEntry> requestList)
Selects the requests that still need Gums. |
java.util.Collection<RequestEntry> |
getRequestsWithAllocatedGums(RequestSpec.RequestSource source)
|
java.util.Set<GumID> |
getUnwantedGumsForRequest(long requestID)
|
void |
hereIsGumToRequest(long requestID,
GumID gumID)
Refresh this request about the hereIsGuM() command. |
void |
pauseRequestGums(long requestID)
Indicates that a request does not want more gums as far. |
void |
removeGumFromRequest(long requestID,
GumID gumID)
Refresh this request about the dispose instruction. |
boolean |
requestExists(long requestID)
|
boolean |
requestHasGum(long requestId,
GumID gumID)
|
boolean |
requestIsLocal(long requestID)
|
boolean |
requestIsPaused(long requestId)
|
boolean |
requestNeedMoreGums(long requestId)
|
boolean |
requestWantsGum(long requestID,
GumID gumID)
|
static void |
reset()
|
void |
resumeRequestGums(long requestID)
Indicates that a request needs gums again. |
void |
unwantedGum(long requestID,
GumID gumID)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static RequestManager getInstance()
public RequestEntry createRequestEntry(RequestSpec requestSpec) throws RequestAlreadyExistsException
RequestAlreadyExistsException
public boolean requestExists(long requestID)
public GumpClient getGumpClient(long requestID) throws RequestDoesNotExistException
GumpClient
of the given request id.
RequestDoesNotExistException
public void deleteRequest(long requestID)
public void pauseRequestGums(long requestID) throws RequestDoesNotExistException
RequestDoesNotExistException
public void resumeRequestGums(long requestID) throws RequestDoesNotExistException
RequestDoesNotExistException
public void hereIsGumToRequest(long requestID, GumID gumID) throws RequestDoesNotExistException
hereIsGuM()
command.
RequestDoesNotExistException
public void removeGumFromRequest(long requestID, GumID gumID)
dispose
instruction.
public java.util.Collection<RequestEntry> getAliveRequests(RequestSpec.RequestSource source)
public java.util.Collection<RequestEntry> getRequestsWithAllocatedGums(RequestSpec.RequestSource source)
public java.util.Collection<RequestEntry> getRequests(GumpClient gumpClient)
Collection
containing all
GumpClient
local RequestEntry
public java.util.Collection<RequestEntry> getConsumerRequests(ObjectID peerID)
Collection
containing all PeerID
local RequestEntry
public java.util.Collection<java.lang.Long> getConsumerRequestsIDs(ObjectID consumerID)
Collection
containing all PeerID
local RequestEntry
public java.util.Collection<GumID> getGums(GumpClient gumpClient, AllocationEntry.GumSource source)
public java.util.Collection<GumID> getGums(GumpClient gumpClient)
public java.util.Collection<GumID> getGums(ObjectID peerID)
public java.util.Collection<GumID> getGums(ObjectID peerID, AllocationEntry.GumSource source)
public java.util.Collection<GumpClient> getConsumers(RequestSpec.RequestSource source)
source
- Choose if the list to be returned will be composed by local
or remote consumers
public java.util.Collection<ObjectID> getConsumersIDs(RequestSpec.RequestSource source)
source
- Choose if the list to be returned will be composed by local
or remote consumers
public java.util.Collection<RequestEntry> getRequestsThatNeedGums(java.util.Collection<RequestEntry> requestList)
public void unwantedGum(long requestID, GumID gumID) throws RequestDoesNotExistException
RequestDoesNotExistException
public java.util.Set<GumID> getUnwantedGumsForRequest(long requestID) throws RequestDoesNotExistException
RequestDoesNotExistException
public static void reset()
public java.util.Collection<GumID> getRequestGums(long requestID) throws RequestDoesNotExistException
RequestDoesNotExistException
public boolean requestIsLocal(long requestID) throws RequestDoesNotExistException
RequestDoesNotExistException
public void deleteConsumerRequests(ObjectID consumerID)
public RequestSpec getRequestSpec(long requestID) throws RequestDoesNotExistException
RequestDoesNotExistException
public boolean requestWantsGum(long requestID, GumID gumID) throws RequestDoesNotExistException
RequestDoesNotExistException
public boolean requestNeedMoreGums(long requestId) throws RequestDoesNotExistException
RequestDoesNotExistException
public int getRequestNeededGums(long requestId) throws RequestDoesNotExistException
RequestDoesNotExistException
public boolean requestIsPaused(long requestId) throws RequestDoesNotExistException
RequestDoesNotExistException
public boolean requestHasGum(long requestId, GumID gumID) throws RequestDoesNotExistException
RequestDoesNotExistException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |