Class QueryContention
java.lang.Object
com.ibm.jzos.wlm.QueryContention
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:
-
Query resource contentions of all types in current address space. A
QueryContentionResultobject is returned as a result of the query.QueryContentionResult result = QueryContention.query(); -
Query resource contentions of all types in a specific address space, for example, asid 0050 in hex values.
byte[] asid = new byte[] { (byte)0x00, (byte)0x50}; QueryContentionResult result = QueryContention.query(asid); -
Query chronic resource contentions only in current address space.
QueryContentionResult result = queryContention.query(QueryContention.REQTYPE_CHRONIC_CONTENTIONS); -
Retrieve information from the
QueryContentionResultobject 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? -
Traverse the contentions list for information about each contention.
for (int i = 0; i invalid input: '<' 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(); }
- Since:
- 2.4.5
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRequest contentions of all types.static final intRequest only chronic resource contentions.static final intRequest only short time/standard enqueue holds. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryContentionResultquery()Query contentions of all types in the current address space.static QueryContentionResultquery(byte[] asid) Query contentions of all types in an address space.static QueryContentionResultquery(int requestType) Query contentions of a particular type in the current address space.static QueryContentionResultquery(int requestType, byte[] asid) Query contentions of a particular type in an address space.
-
Field Details
-
REQTYPE_ALL
public static final int REQTYPE_ALLRequest contentions of all types.- See Also:
-
REQTYPE_ENQHOLDS
public static final int REQTYPE_ENQHOLDSRequest only short time/standard enqueue holds.- See Also:
-
REQTYPE_CHRONIC_CONTENTIONS
public static final int REQTYPE_CHRONIC_CONTENTIONSRequest only chronic resource contentions.- See Also:
-
-
Method Details
-
query
Query contentions of all types in the current address space.- Returns:
- query result
- Throws:
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.UnsupportedOperationException- if SYSEVENT QRYCONT is not supported by the z/OS release on the system
-
query
public static QueryContentionResult query(int requestType) throws RcException, UnsupportedOperationException Query contentions of a particular type in the current address space.- Parameters:
requestType- request contentions of the requestType. Valid types are:- REQTYPE_ALL, requesting contentions of all types. Default if requestType is not provided
- REQTYPE_ENQHOLDS, requesting only short time/standard enqueue holds
- REQTYPE_CHRONIC_CONTENTIONS, requesting only chronic resource contentions
- Returns:
- query result
- Throws:
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.UnsupportedOperationException- if SYSEVENT QRYCONT is not supported by the z/OS release on the system
-
query
public static QueryContentionResult query(byte[] asid) throws RcException, UnsupportedOperationException Query contentions of all types in an address space.- Parameters:
asid- two-byte address space identifier in hex values- Returns:
- query result
- Throws:
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.UnsupportedOperationException- if SYSEVENT QRYCONT is not supported by the z/OS release on the system
-
query
public static QueryContentionResult query(int requestType, byte[] asid) throws RcException, UnsupportedOperationException Query contentions of a particular type in an address space.- Parameters:
requestType- request contentions of the requestType. Valid types are:- REQTYPE_ALL, requesting contentions of all types. Default if requestType is not provided
- REQTYPE_ENQHOLDS, requesting only short time/standard enqueue holds
- REQTYPE_CHRONIC_CONTENTIONS, requesting only chronic resource contentions
asid- two-byte address space identifier in hex values- Returns:
- query result
- Throws:
IllegalArgumentException- if an invalid requestTypeIllegalArgumentException- 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.UnsupportedOperationException- if SYSEVENT QRYCONT is not supported by the z/OS release on the system
-