|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.event.AbstractEventProducer | +--org.objectweb.proactive.core.body.request.RequestQueueImpl | +--org.objectweb.proactive.core.body.request.BlockingRequestQueueImpl
Nested Class Summary |
Nested classes inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
AbstractEventProducer.ListenerList |
Field Summary | |
static org.apache.log4j.Logger |
logger
|
protected boolean |
shouldWait
|
Fields inherited from class org.objectweb.proactive.core.body.request.RequestQueueImpl |
ownerID, requestQueue, SEND_ADD_REMOVE_EVENT |
Fields inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
eventListeners, shouldSerializeListeners |
Constructor Summary | |
BlockingRequestQueueImpl(UniqueID ownerID)
|
Method Summary | |
void |
add(Request r)
Adds the given request to the end of the queue |
void |
addToFront(Request r)
Adds the given request to the front of the queue before all other request already in the queue |
protected Request |
blockingRemove(boolean oldest)
Blocks the calling thread until there is a request available Returns immediately if there is already one. |
protected Request |
blockingRemove(long timeout,
boolean oldest)
Blocks the calling thread until there is a request available but try to limit the time the thread is blocked to timeout. |
protected Request |
blockingRemove(RequestFilter requestFilter,
boolean oldest)
|
protected Request |
blockingRemove(java.lang.String methodName,
boolean oldest)
Blocks the calling thread until there is a request of name methodName Returns immediately if there is already one. |
Request |
blockingRemoveOldest()
Blocks the calling thread until there is a request available Returns immediately if there is already one. |
Request |
blockingRemoveOldest(long timeout)
Blocks the calling thread until there is a request available but try to limit the time the thread is blocked to timeout. |
Request |
blockingRemoveOldest(RequestFilter requestFilter)
Blocks the calling thread until there is a request that can be accepted be the given RequestFilter. |
Request |
blockingRemoveOldest(java.lang.String methodName)
Blocks the calling thread until there is a request of name methodName Returns immediately if there is already one. |
Request |
blockingRemoveYoungest()
Blocks the calling thread until there is a request available Returns immediately if there is already one. |
Request |
blockingRemoveYoungest(long timeout)
Blocks the calling thread until there is a request available but try to limit the time the thread is blocked to timeout. |
Request |
blockingRemoveYoungest(RequestFilter requestFilter)
Blocks the calling thread until there is a request that can be accepted be the given RequestFilter. |
Request |
blockingRemoveYoungest(java.lang.String methodName)
Blocks the calling thread until there is a request of name methodName Returns immediately if there is already one. |
void |
destroy()
Destroys this BlockingQueue by removing all its content, unblocking all thread waiting for a request and making sure that no thread will block again. |
boolean |
isDestroyed()
Returns if this BlockingQueue is destroyed |
void |
waitForRequest()
Blocks the calling thread until there is a request available. |
Methods inherited from class org.objectweb.proactive.core.body.request.RequestQueueImpl |
addRequestQueueEventListener, clear, getOldest, getOldest, getOldest, getYoungest, getYoungest, getYoungest, hasRequest, isEmpty, iterator, notifyOneListener, processRequests, removeOldest, removeOldest, removeOldest, removeRequestQueueEventListener, removeYoungest, removeYoungest, removeYoungest, size, toString |
Methods inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
addListener, hasListeners, notifyAllListeners, removeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.proactive.core.body.request.RequestQueue |
addRequestQueueEventListener, clear, getOldest, getOldest, getOldest, getYoungest, getYoungest, getYoungest, hasRequest, isEmpty, iterator, processRequests, removeOldest, removeOldest, removeOldest, removeRequestQueueEventListener, removeYoungest, removeYoungest, removeYoungest, size |
Field Detail |
public static org.apache.log4j.Logger logger
protected boolean shouldWait
Constructor Detail |
public BlockingRequestQueueImpl(UniqueID ownerID)
Method Detail |
public void destroy()
BlockingRequestQueue
destroy
in interface BlockingRequestQueue
public boolean isDestroyed()
BlockingRequestQueue
isDestroyed
in interface BlockingRequestQueue
public void add(Request r)
RequestQueue
add
in interface RequestQueue
add
in class RequestQueueImpl
r
- the request to addpublic void addToFront(Request r)
RequestQueue
addToFront
in interface RequestQueue
addToFront
in class RequestQueueImpl
r
- the request to addpublic Request blockingRemoveOldest(RequestFilter requestFilter)
BlockingRequestQueue
blockingRemoveOldest
in interface BlockingRequestQueue
requestFilter
- the request filter that select the request to be returned
public Request blockingRemoveOldest(java.lang.String methodName)
BlockingRequestQueue
blockingRemoveOldest
in interface BlockingRequestQueue
methodName
- the name of the method to wait for
public Request blockingRemoveOldest()
BlockingRequestQueue
blockingRemoveOldest
in interface BlockingRequestQueue
public Request blockingRemoveOldest(long timeout)
BlockingRequestQueue
blockingRemoveOldest
in interface BlockingRequestQueue
public Request blockingRemoveYoungest(RequestFilter requestFilter)
BlockingRequestQueue
blockingRemoveYoungest
in interface BlockingRequestQueue
requestFilter
- the request filter that select the request to be returned
public Request blockingRemoveYoungest(java.lang.String methodName)
BlockingRequestQueue
blockingRemoveYoungest
in interface BlockingRequestQueue
methodName
- the name of the method to wait for
public Request blockingRemoveYoungest()
BlockingRequestQueue
blockingRemoveYoungest
in interface BlockingRequestQueue
public Request blockingRemoveYoungest(long timeout)
BlockingRequestQueue
blockingRemoveYoungest
in interface BlockingRequestQueue
public void waitForRequest()
BlockingRequestQueue
waitForRequest
in interface BlockingRequestQueue
protected Request blockingRemove(RequestFilter requestFilter, boolean oldest)
protected Request blockingRemove(java.lang.String methodName, boolean oldest)
methodName
- the name of the method to wait foroldest
- true if the request to remove is the oldest, false for the youngest
protected Request blockingRemove(boolean oldest)
oldest
- true if the request to remove is the oldest, false for the youngest
protected Request blockingRemove(long timeout, boolean oldest)
timeout
- the maximum time to waitoldest
- true if the request to remove is the oldest, false for the youngest
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |