|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.body.request.RequestQueueImpl |
RequestQueueImpl.RequestFilterOnMethodName |
Nested classes inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
AbstractEventProducer.ListenerList |
Field Summary | |
protected boolean |
shouldWait
|
Fields inherited from class org.objectweb.proactive.core.body.request.RequestQueueImpl |
ownerID, requestFilterOnMethodName, requestQueue, SEND_ADD_REMOVE_EVENT |
Fields inherited from class org.objectweb.proactive.core.event.AbstractEventProducer |
eventListeners, logger, shouldSerializeListeners |
Constructor Summary | |
BlockingRequestQueueImpl(UniqueID ownerID)
|
Method Summary | |
int |
add(Request r)
Adds the given request to the end of the queue |
int |
addToFront(Request r)
Adds the given request to the front of the queue before all other request already in the queue |
protected Request |
barrierBlockingRemove()
Blocks the calling thread until there is a request available Returns immediately if there is already one. |
protected Request |
barrierBlockingRemoveOldest(long timeout)
Blocks the calling thread until there is a request available Returns immediately if there is already one. |
protected Request |
barrierRemoveOldest()
|
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(RequestFilter requestFilter,
boolean oldest,
long timeout)
|
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(RequestFilter requestFilter,
long timeout)
Blocks the calling thread until there is a request that can be accepted be the given RequestFilter but tries to limit the time the thread is blocked to timeout. |
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(RequestFilter requestFilter,
long timeout)
Blocks the calling thread until there is a request that can be accepted be the given RequestFilter, but tries to limit the time the thread is blocked to timeout. |
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 |
resume()
Resumes the service of requests. |
void |
suspend()
Blocks the service of requests. |
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, getInternalQueue, 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, getInternalQueue, getOldest, getOldest, getOldest, getYoungest, getYoungest, getYoungest, hasRequest, isEmpty, iterator, processRequests, removeOldest, removeOldest, removeOldest, removeRequestQueueEventListener, removeYoungest, removeYoungest, removeYoungest, size |
Field Detail |
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 int add(Request r)
RequestQueue
add
in interface RequestQueue
add
in class RequestQueueImpl
public int addToFront(Request r)
RequestQueue
addToFront
in interface RequestQueue
addToFront
in class RequestQueueImpl
public Request blockingRemoveOldest(RequestFilter requestFilter)
BlockingRequestQueue
blockingRemoveOldest
in interface BlockingRequestQueue
requestFilter
- the request filter that select the request to be returned
public Request blockingRemoveOldest(RequestFilter requestFilter, long timeout)
BlockingRequestQueue
blockingRemoveOldest
in interface BlockingRequestQueue
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(RequestFilter requestFilter, long timeout)
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(RequestFilter requestFilter, boolean oldest, long timeout)
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
protected Request barrierBlockingRemoveOldest(long timeout)
protected Request barrierRemoveOldest()
protected Request barrierBlockingRemove()
public void suspend()
suspend
in interface BlockingRequestQueue
public void resume()
resume
in interface BlockingRequestQueue
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |