- java.lang.Object
-
- com.ibm.jzos.wlm.QueryContention
-
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:
-
Query resource contentions of all types in current address space. A
QueryContentionResult
object 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
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?
-
Traverse the contentions list for information about each contention.
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(); }
- Since:
- 2.4.5
- See Also:
QueryContentionResult
,ResourceContention
-
Query resource contentions of all types in current address space. A
-
-
Field Summary
Fields Modifier and Type Field 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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Field Detail
-
REQTYPE_ALL
public static final int REQTYPE_ALL
Request contentions of all types.- See Also:
- Constant Field Values
-
REQTYPE_ENQHOLDS
public static final int REQTYPE_ENQHOLDS
Request only short time/standard enqueue holds.- See Also:
- Constant Field Values
-
REQTYPE_CHRONIC_CONTENTIONS
public static final int REQTYPE_CHRONIC_CONTENTIONS
Request only chronic resource contentions.- See Also:
- Constant Field Values
-
-
Method Detail
-
query
public static QueryContentionResult query() throws RcException, java.lang.UnsupportedOperationException
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.java.lang.UnsupportedOperationException
- if SYSEVENT QRYCONT is not supported by the z/OS release on the system
-
query
public static QueryContentionResult query(int requestType) throws RcException, java.lang.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:
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 system
-
query
public static QueryContentionResult query(byte[] asid) throws RcException, java.lang.UnsupportedOperationException
Query contentions of all types in an address space.- Parameters:
asid
- two-byte address space identifier in hex values- Returns:
- query result
- Throws:
java.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
-
query
public static QueryContentionResult query(int requestType, byte[] asid) throws RcException, java.lang.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:
java.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
-
-