public class QueryContention
extends java.lang.Object
A wrapper for z/OS SYSEVENT QRYCONT.
For more information on SYSEVENT QRYCONT, please refer to "z/OS MVS Authorized Assembler Services Reference SET-WTO" and "z/OS MVS Diagnosis: Reference".
Query resource contentions in an address space. The query can be performed to request contentions of all types, or limited only to standard/shortime enqueue holds or chronic resource contentions.
Usage examples:
QueryContentionResult
object is returned as a result of the query.
QueryContentionResult result = QueryContention.query();
byte[] asid = new byte[] { (byte)0x00, (byte)0x50};
QueryContentionResult result = QueryContention.query(asid);
QueryContentionResult result = queryContention.query(QueryContention.REQTYPE_CHRONIC_CONTENTIONS);
QueryContentionResult object returned from a query.
ResourceContention[] resourceContentions =
result.getResourceContentions(); // The list of contentions returned from the query
int numContentions = result.getNumberOfContentions(); // Number of contentions in the list
boolean additionalContentions = result.hasMoreContentions(); // Are there additional contentions other than those returned?
for (int i = 0; i < resourceContentions.length; i++) {
ResourceContention contention = resourceContentions[i];
String subsystemType = contention.getSubsystemType();
String subsystemName = contention.getSubsystemName();
byte[] startTime = contention.getStartTime();
int contentionID = contention.getContentionId();
int count = contention.getCount();
}
QueryContentionResult,
ResourceContention| Modifier and Type | Field and Description |
|---|---|
static int |
REQTYPE_ALL
Request contentions of all types.
|
static int |
REQTYPE_CHRONIC_CONTENTIONS
Request only chronic resource contentions.
|
static int |
REQTYPE_ENQHOLDS
Request only short time/standard enqueue holds.
|
| Modifier and Type | Method and Description |
|---|---|
static QueryContentionResult |
query()
Query contentions of all types in the current address space.
|
static QueryContentionResult |
query(byte[] asid)
Query contentions of all types in an address space.
|
static QueryContentionResult |
query(int requestType)
Query contentions of a particular type in the current address space.
|
static QueryContentionResult |
query(int requestType,
byte[] asid)
Query contentions of a particular type in an address space.
|
public static final int REQTYPE_ALL
public static final int REQTYPE_ENQHOLDS
public static final int REQTYPE_CHRONIC_CONTENTIONS
public static QueryContentionResult query() throws RcException, java.lang.UnsupportedOperationException
RcException - if an error is encountered. See the class comment and the
SYSEVENT QRYCONT documentation for more information on how to interpret the error
information.java.lang.UnsupportedOperationException - if SYSEVENT QRYCONT is not supported by the z/OS release on the systempublic static QueryContentionResult query(int requestType) throws RcException, java.lang.UnsupportedOperationException
requestType - request contentions of the requestType. Valid types are:
java.lang.IllegalArgumentException - if an invalid requestTypeRcException - if an error is encountered. See the class comment and the
SYSEVENT QRYCONT documentation for more information on how to interpret the error
information.java.lang.UnsupportedOperationException - if SYSEVENT QRYCONT is not supported by the z/OS release on the systempublic static QueryContentionResult query(byte[] asid) throws RcException, java.lang.UnsupportedOperationException
asid - two-byte address space identifier in hex valuesjava.lang.IllegalArgumentException - if invalid asid byte lengthRcException - if an error is encountered. See the class comment and the
SYSEVENT QRYCONT documentation for more information on how to interpret the error
information.java.lang.UnsupportedOperationException - if SYSEVENT QRYCONT is not supported by the z/OS release on the systempublic static QueryContentionResult query(int requestType, byte[] asid) throws RcException, java.lang.UnsupportedOperationException
requestType - request contentions of the requestType. Valid types are:
asid - two-byte address space identifier in hex valuesjava.lang.IllegalArgumentException - if an invalid requestTypejava.lang.IllegalArgumentException - if invalid asid byte lengthRcException - if an error is encountered. See the class comment and the
SYSEVENT QRYCONT documentation for more information on how to interpret the error
information.java.lang.UnsupportedOperationException - if SYSEVENT QRYCONT is not supported by the z/OS release on the system