org.objectweb.proactive.Service Class Reference

Collaboration diagram for org.objectweb.proactive.Service:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Service (Body body)
 Creates a new intance of Service based on the given body.
String toString ()
void serve (Request request)
 Serves the request given in parameter.
void fifoServing ()
 Invoke the default FIFO policy to pick up the requests from the request queue.
void lifoServing ()
 Invoke the LIFO policy to pick up the requests from the request queue.
void blockingServeOldest ()
 Serves the oldest request in the request queue.
void blockingServeOldest (long timeout)
 Serves the oldest request in request queue.
void blockingServeOldest (RequestFilter requestFilter, long timeout)
 Serves the oldest request matching the criteria given be the filter.
void blockingServeOldest (String methodName)
 Serves the oldest request for a method of name methodName.
void blockingServeOldest (RequestFilter requestFilter)
 Serves the oldest request matching the criteria given be the filter.
void serveOldest ()
 Serves the oldest request in the request queue.
void serveOldest (String methodName)
 Serves the oldest request for a method of name methodName.
void serveOldest (RequestFilter requestFilter)
 Serves the oldest request matching the criteria given be the filter.
void blockingServeYoungest ()
 Serves the youngest request in the request queue.
void blockingServeYoungest (long timeout)
 Serves the youngest request in request queue.
void blockingServeYoungest (String methodName)
 Serves the youngest request for a method of name methodName.
void blockingServeYoungest (RequestFilter requestFilter)
 Serves the youngest request matching the criteria given be the filter.
void blockingServeYoungest (RequestFilter requestFilter, long timeout)
 Serves the youngest request matching the criteria given be the filter.
void serveYoungest ()
 Serves the youngest request in the request queue.
void serveYoungest (String methodName)
 Serves the youngest request for a method of name methodName.
void serveYoungest (RequestFilter requestFilter)
 Serves the youngest request matching the criteria given be the filter.
void serveAll (String methodName)
 Serves all requests for the method named methodName.
void serveAll (RequestFilter requestFilter)
 Serves all requests accepted by the given filter.
void flushingServeYoungest ()
 Serves the youngest request and discard all other requests.
void flushingServeYoungest (String methodName)
 Serves the most recent request (youngest) for the method named methodName and discards all the other requests of the same name.
void flushingServeYoungest (RequestFilter requestFilter)
 Serves the most recent request (youngest) accepted by the given filter and discards all the other requests also accepted by this sasme filter.
void flushingServeOldest ()
 Serves the oldest request and discard all other requests.
void flushingServeOldest (String methodName)
 Serves the oldest request for the method named methodName and discards all the other requests of the same name.
void flushingServeOldest (RequestFilter requestFilter)
 Serves the oldest request accepted by the given filter and discards all the other requests also accepted by this sasme filter.
void waitForRequest ()
 blocks until a request is available or until the body terminate
boolean hasRequestToServe ()
 true if and only if at least one request is available
boolean hasRequestToServe (String methodName)
 true if and only if at least one request with the given name is available
int getRequestCount ()
 Returns the number of request(s) in the queue.
void flushAll ()
 Removes all request from the queue.
Request getOldest ()
 Returns the oldest request from the queue or null if the queue is empty The request queue is unchanged by this call.
Request getOldest (String methodName)
 Returns the oldest request whose method name is s or null if no match The request queue is unchanged by this call.
Request getOldest (RequestFilter requestFilter)
 Returns the oldest request that matches the criteria defined by the given filter The request queue is unchanged by this call.
Request blockingGetOldest ()
 Returns the oldest request from the queue If no request is available the method block until one request can be returned The request queue is unchanged by this call.
Request getYoungest ()
 Returns the youngest request from the queue or null if the queue is empty The request queue is unchanged by this call.
Request getYoungest (String methodName)
 Returns the youngest request whose method name is s or null if no match The request queue is unchanged by this call.
Request getYoungest (RequestFilter requestFilter)
 Returns the youngest request that matches the criteria defined by the given filter The request queue is unchanged by this call.
Request blockingGetYoungest ()
 Returns the youngest request from the queue If no request is available the method block until one request can be returned The request queue is unchanged by this call.
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 (String methodName)
 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 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 the timeout.
Request blockingRemoveYoungest (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.

Protected Attributes

Body body
BlockingRequestQueue requestQueue
LifeCycleController lifeCycleController = null

Classes

class  AcceptAllRequestFilter
 AcceptAllRequestFilter is a RequestFilter that matches any request. More...
class  FlushingServeOldestRequestProcessor
 FlushingServeOldestRequestProcessor is a RequestProcessor that serves only the oldest request accepted by the given RequestFilter and removes all other requests accepted by that same Filter. More...
class  FlushingServeYoungestRequestProcessor
 FlushingServeYoungestRequestProcessor is a RequestProcessor that serves only the youngest request accepted by the given RequestFilter and removes all other requests accepted by that same Filter. More...
class  RequestFilterOnMethodName
 RequestFilterOnMethodName is a RequestFilter that matches only request of a given method name. More...
class  ServingRequestProcessor
 ServingRequestProcessor is a simple RequestProcessor that serves and removes all requests accepted by a given RequestFilter. More...

Detailed Description

Service is a utility class that provides many useful methods to serve requests. It is usually instantiated once at the begining of the runActivity() method of an active object in order to be used for serving requests. For instance :

 public void runActivity(org.objectweb.proactive.Body body) {
   org.objectweb.proactive.Service service = new org.objectweb.proactive.Service(body);
 ...
 }
 
For intance the live method of the bounded buffer example :
  public void runActivity(org.objectweb.proactive.Body body) {
    org.objectweb.proactive.Service service = new org.objectweb.proactive.Service(body);
    while (body.isActive()) {
      if (count == 0) {
        // if the buffer is empty
        service.blockingServeOldest("put"); // Serve the first buffer.put call
      } else if (count == size) {
        // if the buffer is full
        service.blockingServeOldest("get"); // Serve the first buffer.get call
      } else {
        // if the buffer is neither empty nor full
        service.blockingServeOldest(); // Serve the first buffer.xxx call
      }
    }
  }
 

Author:
ProActive Team
Version:
1.0, 2001/10/23
Since:
ProActive 0.9
See also:
RunActive

Definition at line 82 of file Service.java.


Constructor & Destructor Documentation

org.objectweb.proactive.Service.Service ( Body  body  ) 

Creates a new intance of Service based on the given body.

Parameters:
body the body that helper service is for.

Definition at line 100 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.LocalBodyStrategy.getRequestQueue(), and org.objectweb.proactive.Service.lifeCycleController.


Member Function Documentation

void org.objectweb.proactive.Service.serve ( Request  request  ) 

Serves the request given in parameter.

Parameters:
request the request to be served

Definition at line 124 of file Service.java.

References org.objectweb.proactive.Service.body, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

Referenced by org.objectweb.proactive.core.body.migration.MixedLocationServer.runActivity().

void org.objectweb.proactive.Service.fifoServing (  ) 

Invoke the default FIFO policy to pick up the requests from the request queue.

This does not return until the body terminate, as the active thread enters in an infinite loop for processing the request in the FIFO order.

Definition at line 133 of file Service.java.

References org.objectweb.proactive.Service.blockingServeOldest(), org.objectweb.proactive.Service.body, org.objectweb.proactive.Body.isActive(), and org.objectweb.proactive.Service.lifeCycleController.

void org.objectweb.proactive.Service.lifoServing (  ) 

Invoke the LIFO policy to pick up the requests from the request queue.

This does not return until the body terminate, as the active thread enters in an infinite loop for processing the request in the LIFO order.

Definition at line 151 of file Service.java.

References org.objectweb.proactive.Service.blockingServeYoungest(), org.objectweb.proactive.Service.body, and org.objectweb.proactive.Body.isActive().

void org.objectweb.proactive.Service.blockingServeOldest (  ) 

Serves the oldest request in the request queue.

The method blocks if there is no request until one request is received or until the body terminates.

Definition at line 164 of file Service.java.

Referenced by org.objectweb.proactive.Service.blockingServeOldest(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.endActivity(), org.objectweb.proactive.Service.fifoServing(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.getNodes(), org.objectweb.proactive.scheduler.policy.AbstractPolicy.runActivity(), org.objectweb.proactive.p2p.service.P2PAcquaintanceManager.runActivity(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.runActivity(), org.objectweb.proactive.p2p.loadbalancer.P2PLoadBalancer.runActivity(), org.objectweb.proactive.core.component.collectiveitfs.GatherFuturesHandler.runActivity(), org.objectweb.proactive.core.component.body.ComponentActivity.runActivity(), and org.objectweb.proactive.calcium.proactive.ActiveObjectSkernel< T >.runActivity().

void org.objectweb.proactive.Service.blockingServeOldest ( long  timeout  ) 

Serves the oldest request in request queue.

The method blocks if there is no request until one request is received or until the body terminates. The method does not block more than the given timeout.

Parameters:
timeout how long the thread can be blocked for.

Definition at line 175 of file Service.java.

References org.objectweb.proactive.Service.blockingServeOldest().

void org.objectweb.proactive.Service.blockingServeOldest ( RequestFilter  requestFilter,
long  timeout 
)

Serves the oldest request matching the criteria given be the filter.

The method blocks if there is no matching request until one matching request is received or until the body terminates. The method does not block more than the given timeout.

Parameters:
requestFilter The request filter accepting the request
timeout the timeout in ms

Definition at line 187 of file Service.java.

References org.objectweb.proactive.core.body.request.BlockingRequestQueue.blockingRemoveOldest(), org.objectweb.proactive.Service.body, org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

void org.objectweb.proactive.Service.blockingServeOldest ( String  methodName  ) 

Serves the oldest request for a method of name methodName.

The method blocks if there is no matching request until one matching request is received or until the body terminates.

Parameters:
methodName The name of the request to serve

Definition at line 197 of file Service.java.

References org.objectweb.proactive.Service.blockingServeOldest().

void org.objectweb.proactive.Service.blockingServeOldest ( RequestFilter  requestFilter  ) 

Serves the oldest request matching the criteria given be the filter.

The method blocks if there is no matching request until one matching request is received or until the body terminates.

Parameters:
requestFilter The request filter accepting the request

Definition at line 207 of file Service.java.

References org.objectweb.proactive.Service.blockingServeOldest().

void org.objectweb.proactive.Service.serveOldest (  ) 

Serves the oldest request in the request queue.

If there is no request, the method returns with no effect.

Definition at line 215 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.removeOldest(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

Referenced by org.objectweb.proactive.p2p.service.node.P2PNodeLookup.endActivity(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.getNodes(), org.objectweb.proactive.scheduler.JobNoDescriptor.runActivity(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.runActivity(), and org.objectweb.proactive.core.body.migration.MixedLocationServer.runActivity().

void org.objectweb.proactive.Service.serveOldest ( String  methodName  ) 

Serves the oldest request for a method of name methodName.

If no matching request is found, the method returns with no effect.

Parameters:
methodName The name of the request to serve

Definition at line 224 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.removeOldest(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

void org.objectweb.proactive.Service.serveOldest ( RequestFilter  requestFilter  ) 

Serves the oldest request matching the criteria given be the filter.

If no matching request is found, the method returns with no effect.

Parameters:
requestFilter The request filter accepting the request

Definition at line 233 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.removeOldest(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

void org.objectweb.proactive.Service.blockingServeYoungest (  ) 

Serves the youngest request in the request queue.

The method blocks if there is no request until one request is received or until the body terminates.

Definition at line 244 of file Service.java.

Referenced by org.objectweb.proactive.Service.blockingServeYoungest(), and org.objectweb.proactive.Service.lifoServing().

void org.objectweb.proactive.Service.blockingServeYoungest ( long  timeout  ) 

Serves the youngest request in request queue.

The method blocks if there is no request until one request is received or until the body terminates. The method does not block more than the given timeout.

Parameters:
timeout : for how long the thread can be blocked.

Definition at line 255 of file Service.java.

References org.objectweb.proactive.Service.blockingServeYoungest().

void org.objectweb.proactive.Service.blockingServeYoungest ( String  methodName  ) 

Serves the youngest request for a method of name methodName.

The method blocks if there is no matching request until one matching request is received or until the body terminates.

Parameters:
methodName The name of the request to serve

Definition at line 265 of file Service.java.

References org.objectweb.proactive.Service.blockingServeYoungest().

void org.objectweb.proactive.Service.blockingServeYoungest ( RequestFilter  requestFilter  ) 

Serves the youngest request matching the criteria given be the filter.

The method blocks if there is no matching request until one matching request is received or until the body terminates.

Parameters:
requestFilter The request filter accepting the request

Definition at line 275 of file Service.java.

References org.objectweb.proactive.Service.blockingServeYoungest().

void org.objectweb.proactive.Service.blockingServeYoungest ( RequestFilter  requestFilter,
long  timeout 
)

Serves the youngest request matching the criteria given be the filter.

The method blocks if there is no matching request until one matching request is received or until the body terminates. The method does not block more than the given timeout.

Parameters:
requestFilter The request filter accepting the request
timeout : for how long the thread can be blocked.

Definition at line 287 of file Service.java.

References org.objectweb.proactive.core.body.request.BlockingRequestQueue.blockingRemoveYoungest(), org.objectweb.proactive.Service.body, org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

void org.objectweb.proactive.Service.serveYoungest (  ) 

Serves the youngest request in the request queue.

If there is no request, the method returns with no effect.

Definition at line 295 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.removeYoungest(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

void org.objectweb.proactive.Service.serveYoungest ( String  methodName  ) 

Serves the youngest request for a method of name methodName.

If no matching request is found, the method returns with no effect.

Parameters:
methodName The name of the request to serve

Definition at line 304 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.removeYoungest(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

void org.objectweb.proactive.Service.serveYoungest ( RequestFilter  requestFilter  ) 

Serves the youngest request matching the criteria given be the filter.

If no matching request is found, the method returns with no effect.

Parameters:
requestFilter The request filter accepting the request

Definition at line 313 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.removeYoungest(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.LocalBodyStrategy.serve().

void org.objectweb.proactive.Service.serveAll ( String  methodName  ) 

Serves all requests for the method named methodName.

If there is no request matching the method name, no request is served. All served requests are removed from the RequestQueue.

Parameters:
methodName The name of the request to serve

Definition at line 326 of file Service.java.

Referenced by org.objectweb.proactive.p2p.service.P2PService.askingNode().

void org.objectweb.proactive.Service.serveAll ( RequestFilter  requestFilter  ) 

Serves all requests accepted by the given filter.

All served requests are removed from the RequestQueue.

Parameters:
requestFilter The request filter accepting the request

Definition at line 335 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.processRequests(), and org.objectweb.proactive.Service.requestQueue.

void org.objectweb.proactive.Service.flushingServeYoungest (  ) 

Serves the youngest request and discard all other requests.

After the call the youngest request is served and the request queue is empty. If the request queue is already empty before the call the method has no effect

Definition at line 349 of file Service.java.

Referenced by org.objectweb.proactive.Service.flushingServeYoungest().

void org.objectweb.proactive.Service.flushingServeYoungest ( String  methodName  ) 

Serves the most recent request (youngest) for the method named methodName and discards all the other requests of the same name.

The most recent request is the one served. If there is no match, no request is served or removed. All requests of method name methodName are removed from the request queue.

Parameters:
methodName The name of the request to serve and flush

Definition at line 362 of file Service.java.

References org.objectweb.proactive.Service.flushingServeYoungest().

void org.objectweb.proactive.Service.flushingServeYoungest ( RequestFilter  requestFilter  ) 

Serves the most recent request (youngest) accepted by the given filter and discards all the other requests also accepted by this sasme filter.

The most recent request is the one served. If there is no match, no request is served or removed. All requests accepted by the filter are removed from the request queue.

Parameters:
requestFilter The request filter accepting requests

Definition at line 374 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.processRequests(), and org.objectweb.proactive.Service.requestQueue.

void org.objectweb.proactive.Service.flushingServeOldest (  ) 

Serves the oldest request and discard all other requests.

After the call the oldest request is served and the request queue is empty. If the request queue is already empty before the call the method has no effect

Definition at line 388 of file Service.java.

Referenced by org.objectweb.proactive.Service.flushingServeOldest().

void org.objectweb.proactive.Service.flushingServeOldest ( String  methodName  ) 

Serves the oldest request for the method named methodName and discards all the other requests of the same name.

The oldest request is the one served. If there is no match, no request is served or removed. All requests of method name methodName are removed from the request queue.

Parameters:
methodName The name of the request to serve and flush

Definition at line 401 of file Service.java.

References org.objectweb.proactive.Service.flushingServeOldest().

void org.objectweb.proactive.Service.flushingServeOldest ( RequestFilter  requestFilter  ) 

Serves the oldest request accepted by the given filter and discards all the other requests also accepted by this sasme filter.

The oldest request is the one served. If there is no match, no request is served or removed. All requests accepted by the filter are removed from the request queue.

Parameters:
requestFilter The request filter accepting requests

Definition at line 413 of file Service.java.

References org.objectweb.proactive.Service.body, org.objectweb.proactive.core.body.request.RequestQueue.processRequests(), and org.objectweb.proactive.Service.requestQueue.

boolean org.objectweb.proactive.Service.hasRequestToServe (  ) 

true if and only if at least one request is available

Returns:
true if a request is available, false else.

Definition at line 431 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.isEmpty(), and org.objectweb.proactive.Service.requestQueue.

Referenced by org.objectweb.proactive.p2p.service.P2PService.askingNode(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.endActivity(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.getNodes(), org.objectweb.proactive.scheduler.policy.AbstractPolicy.runActivity(), org.objectweb.proactive.p2p.service.node.P2PNodeLookup.runActivity(), and org.objectweb.proactive.core.body.migration.MixedLocationServer.runActivity().

boolean org.objectweb.proactive.Service.hasRequestToServe ( String  methodName  ) 

true if and only if at least one request with the given name is available

Returns:
true if a request with the given name is available, false else.

Definition at line 439 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.hasRequest(), and org.objectweb.proactive.Service.requestQueue.

int org.objectweb.proactive.Service.getRequestCount (  ) 

Returns the number of request(s) in the queue.

Returns:
the number of request(s) in the queue.

Definition at line 447 of file Service.java.

References org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.core.body.request.RequestQueue.size().

void org.objectweb.proactive.Service.flushAll (  ) 

Removes all request from the queue.

No request is served.

Definition at line 454 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.clear(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.getOldest (  ) 

Returns the oldest request from the queue or null if the queue is empty The request queue is unchanged by this call.

Returns:
the oldest request or null

Definition at line 467 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getOldest(), and org.objectweb.proactive.Service.requestQueue.

Referenced by org.objectweb.proactive.p2p.service.node.P2PNodeLookup.runActivity().

Request org.objectweb.proactive.Service.getOldest ( String  methodName  ) 

Returns the oldest request whose method name is s or null if no match The request queue is unchanged by this call.

Parameters:
methodName the name of the method to look for
Returns:
the oldest matching request or null

Definition at line 477 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getOldest(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.getOldest ( RequestFilter  requestFilter  ) 

Returns the oldest request that matches the criteria defined by the given filter The request queue is unchanged by this call.

Parameters:
requestFilter the filter accepting request on a given criteria
Returns:
the oldest matching request or null

Definition at line 487 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getOldest(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.blockingGetOldest (  ) 

Returns the oldest request from the queue If no request is available the method block until one request can be returned The request queue is unchanged by this call.

Returns:
the oldest request or null

Definition at line 497 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getOldest(), org.objectweb.proactive.core.body.request.BlockingRequestQueue.isDestroyed(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.Service.waitForRequest().

Request org.objectweb.proactive.Service.getYoungest (  ) 

Returns the youngest request from the queue or null if the queue is empty The request queue is unchanged by this call.

Returns:
the youngest request or null

Definition at line 515 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getYoungest(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.getYoungest ( String  methodName  ) 

Returns the youngest request whose method name is s or null if no match The request queue is unchanged by this call.

Parameters:
methodName the name of the method to look for
Returns:
the youngest matching request or null

Definition at line 525 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getYoungest(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.getYoungest ( RequestFilter  requestFilter  ) 

Returns the youngest request that matches the criteria defined by the given filter The request queue is unchanged by this call.

Parameters:
requestFilter the filter accepting request on a given criteria
Returns:
the youngest matching request or null

Definition at line 535 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getYoungest(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.blockingGetYoungest (  ) 

Returns the youngest request from the queue If no request is available the method block until one request can be returned The request queue is unchanged by this call.

Returns:
the oldest request or null

Definition at line 545 of file Service.java.

References org.objectweb.proactive.core.body.request.RequestQueue.getYoungest(), org.objectweb.proactive.core.body.request.BlockingRequestQueue.isDestroyed(), org.objectweb.proactive.Service.requestQueue, and org.objectweb.proactive.Service.waitForRequest().

Request org.objectweb.proactive.Service.blockingRemoveOldest ( RequestFilter  requestFilter  ) 

Blocks the calling thread until there is a request that can be accepted be the given RequestFilter.

Returns immediately if there is already one. The request returned is non null unless the thread has been asked not to wait anymore.

Parameters:
requestFilter the request filter that select the request to be returned
Returns:
the oldest request found in the queue that is accepted by the filter.

Definition at line 566 of file Service.java.

References org.objectweb.proactive.Service.blockingRemoveOldest().

Referenced by org.objectweb.proactive.core.body.migration.MixedLocationServer.runActivity().

Request org.objectweb.proactive.Service.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.

Returns immediately if there is already one. The request returned is non null unless the thread has been asked not to wait anymore.

Parameters:
requestFilter the request filter that select the request to be returned
timeout : for how long the thread can be blocked.
Returns:
the oldest request found in the queue that is accepted by the filter.

Definition at line 579 of file Service.java.

References org.objectweb.proactive.core.body.request.BlockingRequestQueue.blockingRemoveOldest(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.blockingRemoveOldest ( String  methodName  ) 

Blocks the calling thread until there is a request of name methodName Returns immediately if there is already one.

The request returned is non null unless the thread has been asked not to wait anymore.

Parameters:
methodName the name of the method to wait for
Returns:
the oldest request of name methodName found in the queue.

Definition at line 591 of file Service.java.

References org.objectweb.proactive.Service.blockingRemoveOldest().

Request org.objectweb.proactive.Service.blockingRemoveOldest (  ) 

Blocks the calling thread until there is a request available Returns immediately if there is already one.

The request returned is non null unless the thread has been asked not to wait anymore.

Returns:
the oldest request found in the queue.

Definition at line 601 of file Service.java.

Referenced by org.objectweb.proactive.Service.blockingRemoveOldest().

Request org.objectweb.proactive.Service.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.

Returns immediately if there is already one. The request returned is non null if a request has been found during the given time.

Parameters:
timeout : for how long the thread can be blocked.
Returns:
the oldest request found in the queue or null.

Definition at line 613 of file Service.java.

References org.objectweb.proactive.Service.blockingRemoveOldest().

Request org.objectweb.proactive.Service.blockingRemoveYoungest ( RequestFilter  requestFilter  ) 

Blocks the calling thread until there is a request that can be accepted be the given RequestFilter.

Returns immediately if there is already one. The request returned is non null unless the thread has been asked not to wait anymore.

Parameters:
requestFilter the request filter that select the request to be returned
Returns:
the youngest request found in the queue that is accepted by the filter.

Definition at line 629 of file Service.java.

References org.objectweb.proactive.Service.blockingRemoveYoungest().

Request org.objectweb.proactive.Service.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 the timeout.

Returns immediately if there is already one. The request returned is non null unless the thread has been asked not to wait anymore.

Parameters:
requestFilter the request filter that select the request to be returned
timeout : for how long the thread can be blocked.
Returns:
the youngest request found in the queue that is accepted by the filter.

Definition at line 643 of file Service.java.

References org.objectweb.proactive.core.body.request.BlockingRequestQueue.blockingRemoveYoungest(), and org.objectweb.proactive.Service.requestQueue.

Request org.objectweb.proactive.Service.blockingRemoveYoungest ( String  methodName  ) 

Blocks the calling thread until there is a request of name methodName Returns immediately if there is already one.

The request returned is non null unless the thread has been asked not to wait anymore.

Parameters:
methodName the name of the method to wait for
Returns:
the youngest request of name methodName found in the queue.

Definition at line 655 of file Service.java.

References org.objectweb.proactive.Service.blockingRemoveYoungest().

Request org.objectweb.proactive.Service.blockingRemoveYoungest (  ) 

Blocks the calling thread until there is a request available Returns immediately if there is already one.

The request returned is non null unless the thread has been asked not to wait anymore.

Returns:
the youngest request found in the queue.

Definition at line 666 of file Service.java.

Referenced by org.objectweb.proactive.Service.blockingRemoveYoungest().

Request org.objectweb.proactive.Service.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.

Returns immediately if there is already one. The request returned is non null if a request has been found during the given time.

Parameters:
timeout : for how long the thread can be blocked.
Returns:
the youngest request found in the queue or null.

Definition at line 678 of file Service.java.

References org.objectweb.proactive.Service.blockingRemoveYoungest().


The documentation for this class was generated from the following file:
Generated on Mon Jan 22 15:16:14 2007 for ProActive by  doxygen 1.5.1