com.ibm.dtfj.java

Interface JavaMonitor


  1. public interface JavaMonitor
Represents a Java monitor (either an object monitor or a raw monitor).

Method Summary

Modifier and Type Method and Description
  1. boolean
equals(java.lang.Object obj)
  1. java.util.Iterator
getEnterWaiters()
Get the set of threads waiting to enter the monitor
  1. ImagePointer
getID()
Get the identifier for this monitor
  1. java.lang.String
getName()
Note that the name of a JavaMonitor is not necessarily meaningful but is provided here as it is usually present in the running VM.
  1. java.util.Iterator
getNotifyWaiters()
Get the set of threads waiting to be notified on the monitor (in the Object.wait method)
  1. JavaObject
getObject()
Get the object associated with this monitor.
  1. JavaThread
getOwner()
Get the thread which currently owns the monitor
  1. int
hashCode()

Method Detail

getObject

  1. JavaObject getObject()
Get the object associated with this monitor.
Returns:
the object associated with this monitor, or null if this is a raw monitor or a valid object could not be retrieved.

getName

  1. java.lang.String getName()
  2. throws CorruptDataException
Note that the name of a JavaMonitor is not necessarily meaningful but is provided here as it is usually present in the running VM. If there is no name for the monitor a synthetic name will be created by DTFJ.
Returns:
the name of the monitor (never null)
Throws:

getOwner

  1. JavaThread getOwner()
  2. throws CorruptDataException
Get the thread which currently owns the monitor
Returns:
the owner of the monitor, or null if the monitor is unowned
Throws:

getEnterWaiters

  1. java.util.Iterator getEnterWaiters( )
Get the set of threads waiting to enter the monitor
Returns:
an iterator over the collection of threads waiting to enter this monitor
See Also:

getNotifyWaiters

  1. java.util.Iterator getNotifyWaiters( )
Get the set of threads waiting to be notified on the monitor (in the Object.wait method)
Returns:
an iterator over the collection of threads waiting to be notified on this monitor
See Also:

getID

  1. ImagePointer getID()
Get the identifier for this monitor
Returns:
The pointer which uniquely identifies this monitor in memory.

equals

  1. boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
True if the given object refers to the same Java Monitor in the image

hashCode

  1. int hashCode()
Overrides:
hashCode in class java.lang.Object