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:
- The maximum number of requests that an engine can process concurrently
- The maximum number of requests that engine will be able to queue when its concurrency limit has been reached.
- 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.
- Author:
- The OGSA-DAI Team
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
-
ConcurrencySettings
public ConcurrencySettings()
-
Create a set of concurrency settings with the default values.
- The maximum number of requests that an engine can process concurrently will be 1.
- The maximum number of requests that engine will be able to queue when its concurrency limit has been reached will be 0.
- The maximum duration in milliseconds that requests will be allowed by the engine to process before being terminated will be 0.
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
maxRequests
is less than 1 (one).
maxQueueLength
is less than 0 (zero).
requestProcessingTimeout
is less than 0 (zero).
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