Product Information > JADE Object Manager Guide > Chapter 4 - JADE System Instrumentation and Diagnosis > NodegetMutexCounts Method

Node::getMutexCounts Method

getMutexCounts(jdo:                    JadeDynamicObject input;
               includeZeroContentions: Boolean);

The Node class getMutexCounts method retrieves the number of contentions on mutexes used internally by JADE for the node identified as the method receiver.

The contention counts are returned as Integer64 properties of the JadeDynamicObject instance specified by the jdo parameter. The name of each property represents the internal mutex name, and the value represents the number of times that mutex has been contended (that is, the number of times execution of a thread has been temporarily suspended because another thread was executing in a section of code protected by the mutex).

The contention counts are cumulative from the time the specified node is initiated.

The includeZeroContentions parameter indicates whether mutexes that have not yet encountered any contentions should be included in the returned information. If you set this parameter to false, only information for those mutexes that have had at least one contention are added to the dynamic object. If you set it to true, information about all current mutexes is added.

The calling process is responsible for creating and deleting the JadeDynamicObject instance. The getMutexCounts method clears any existing properties from the JadeDynamicObject instance each time it is called.

Because mutexes can be dynamically created and deleted, the number of mutexes reported and the order in which the properties are added to the dynamic object may vary from call to call.

If a mutex is deleted then recreated between calls to the getMutexCounts method, the contention count can appear to reduce in value. Any application attempting to calculate contention count differences should therefore take this into account.

The mutex contention information is primarily for internal use by the Jade Software Corporation. High mutex contention counts may indicate bottlenecks that are impacting overall system performance.

For an example of the use of and output from this method, see the getMutexCounts method in Volume 2 of the JADE Encyclopaedia of Classes.