uk.org.ogsadai.engine
Class ConcurrencySettings

java.lang.Object
  |
  +--uk.org.ogsadai.engine.ConcurrencySettings

public class ConcurrencySettings
extends java.lang.Object

Class holding the concurrency settings of an engine. These are:

Author:
The OGSA-DAI Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
          Copyright statement
private static int MAX_QUEUE_LENGTH
           
private static int MAX_REQUESTS
          Default concurrency settings
private  int mMaxQueueLength
           
private  int mMaxRequests
          Current concurrency settings
private  long mRequestProcessingTimeout
           
private static long REQUEST_PROCESSING_TIMEOUT
           
 
Constructor Summary
ConcurrencySettings()
          Create a set of concurrency settings with the default values.
ConcurrencySettings(int maxRequests, int maxQueueLength, long requestProcessingTimeout)
          Create a set of concurrency settings with the given values.
 
Method Summary
 int getMaxQueueLength()
          Get maximum queue length.
 int getMaxRequests()
          Get maximum number of requests
 long getRequestProcessingTimeout()
          Get request processing timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
Copyright statement

See Also:
Constant Field Values

MAX_REQUESTS

private static final int MAX_REQUESTS
Default concurrency settings

See Also:
Constant Field Values

MAX_QUEUE_LENGTH

private static final int MAX_QUEUE_LENGTH
See Also:
Constant Field Values

REQUEST_PROCESSING_TIMEOUT

private static final long REQUEST_PROCESSING_TIMEOUT
See Also:
Constant Field Values

mMaxRequests

private int mMaxRequests
Current concurrency settings


mMaxQueueLength

private int mMaxQueueLength

mRequestProcessingTimeout

private long mRequestProcessingTimeout
Constructor Detail

ConcurrencySettings

public ConcurrencySettings()
Create a set of concurrency settings with the default values.


ConcurrencySettings

public ConcurrencySettings(int maxRequests,
                           int maxQueueLength,
                           long requestProcessingTimeout)
                    throws java.lang.IllegalArgumentException
Create a set of concurrency settings with the given values.

Parameters:
maxRequests - The maximum number of requests that the engine will be configured to process concurrently.
maxQueueLength - The maximum number of requests that engine will be able to queue when its concurrency limit has been reached.
requestProcessingTimeout - The maximum duration in milliseconds that requests will be allowed by the engine to process before being terminated. A value of zero results in no time limit being imposed on processing.
Throws:
java.lang.IllegalArgumentException - If
Method Detail

getMaxRequests

public int getMaxRequests()
Get maximum number of requests

Returns:
number

getMaxQueueLength

public int getMaxQueueLength()
Get maximum queue length.

Returns:
length

getRequestProcessingTimeout

public long getRequestProcessingTimeout()
Get request processing timeout.

Returns:
timeout