public interface MaxThreadsConstraintMBean extends DeploymentMBean
This MBean defines the max number of concurrent threads that can execute requests sharing this max constraint.
MaxThreadsConstraint can be used to tell the server that the requests are constrained by an external resource like a database and allocating more threads that the external resource limit is not going to help since the extra threads are just going to wait.
DEFAULT_ORDER, MAX_ORDER, MIN_ORDER
DEFAULT_EMPTY_BYTE_ARRAY
Modifier and Type | Method and Description |
---|---|
String |
getConnectionPoolName()
Name of the connection pool whose size is taken as the max constraint.
|
int |
getCount()
Maximum number of concurrent threads that can execute requests sharing this
constraint.
|
int |
getQueueSize()
Desired size of the MaxThreadsConstraint queue for requests pending execution.
|
void |
setConnectionPoolName(String connectionPoolName)
Name of the connection pool whose size is taken as the max constraint.
|
void |
setCount(int count)
Max number of concurrent threads that can execute requests sharing this
constraint.
|
void |
setQueueSize(int queueSize)
Desired size of the MaxThreadsConstraint queue for requests pending execution.
|
addTarget, getDeploymentOrder, getTargets, removeTarget, setDeploymentOrder, setTargets
freezeCurrentValue, getId, getInheritedProperties, getName, getNotes, isDynamicallyCreated, isInherited, isSet, restoreDefaultValue, setComments, setDefaultedMBean, setName, setNotes, setPersistenceEnabled, unSet
getMBeanInfo, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setParent
getAttribute, getAttributes, invoke, setAttribute, setAttributes
postDeregister, postRegister, preDeregister, preRegister
addNotificationListener, getNotificationInfo, removeNotificationListener
addPropertyChangeListener, createChildCopyIncludingObsolete, getParentBean, isEditable, removePropertyChangeListener
int getCount()
Maximum number of concurrent threads that can execute requests sharing this constraint.
A count of 0 or -1 is treated as if the constraint is not present. This means that no constraint is enforced for these two values. A count > 0 can be dynamically changed to 0 to indicate that constraint enforcement is no longer needed.
void setCount(int count)
Max number of concurrent threads that can execute requests sharing this constraint.
A count of 0 or -1 is treated as if the constraint is not present. This means that no constraint is enforced for these two values. A count > 0 can be dynamically changed to 0 to indicate that constraint enforcement is no longer needed.
String getConnectionPoolName()
Name of the connection pool whose size is taken as the max constraint.
This can be the name of a JDBC data source. The max capacity of the data source is used as the constraint.
void setConnectionPoolName(String connectionPoolName)
Name of the connection pool whose size is taken as the max constraint.
This can be the name of a JDBC data source. The max capacity of the data source is used as the constraint.
void setQueueSize(int queueSize)
Desired size of the MaxThreadsConstraint queue for requests pending execution.
Set the approximate size of the MaxThreadsConstraint requests queue. Requests are added to this queue if they are not yet eligible for execution due the the maximum number of concurrent threads that can execute requests sharing this constraint has been reached. The actual size of the queue created may be different from the value set here. For example, it may be rounded up to the nearest power of 2. Setting a large queue size would increase memory consumption. It is best to not set the queue size to be larger than necessary.
int getQueueSize()
Desired size of the MaxThreadsConstraint queue for requests pending execution.