com.ibm.dtfj.java
Interface JavaMonitor


public interface JavaMonitor

Represents a monitor, either an object monitor or a raw monitor.

Author:
pburka

Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Iterator getEnterWaiters()
          Get the set of threads waiting to enter the monitor
 ImagePointer getID()
          Get the identifier for this monitor
 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.
 java.util.Iterator getNotifyWaiters()
          Get the set of threads waiting to be notified on the monitor (in the Object.wait method)
 JavaObject getObject()
          Get the object associated with this monitor.
 JavaThread getOwner()
          Get the thread which currently owns the monitor
 int hashCode()
           
 

Method Detail

getObject

JavaObject getObject()
Get the object associated with this monitor.

Returns:
the object associated with this monitor, or null if this is a raw monitor

getName

java.lang.String getName()
                         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:
CorruptDataException

getOwner

JavaThread getOwner()
                    throws CorruptDataException
Get the thread which currently owns the monitor

Returns:
the owner of the monitor, or null if the monitor is unowned
Throws:
CorruptDataException

getEnterWaiters

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:
JavaThread, CorruptData

getNotifyWaiters

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:
JavaThread, CorruptData

getID

ImagePointer getID()
Get the identifier for this monitor

Returns:
The pointer which uniquely identifies this monitor in memory.

equals

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

hashCode

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