org.netbeans.api.debugger.jpda/2 2.31.1

org.netbeans.api.debugger.jpda
Class DeadlockDetector

java.lang.Object
  extended by org.netbeans.api.debugger.jpda.DeadlockDetector

public abstract class DeadlockDetector
extends Object

Service that detects deadlocks and fires an event when the deadlock occurs.

 Since JDI interfaces evolve from one version to another, it's strongly recommended
 not to implement this abstract class in client code. New methods can be added to
 this class at any time to keep up with the JDI functionality.

Since:
2.16

Nested Class Summary
static class DeadlockDetector.Deadlock
          Representation of a deadlock - one set of mutually deadlocked threads.
 
Field Summary
static String PROP_DEADLOCK
          Name of property which is fired when deadlock occurs.
 
Constructor Summary
DeadlockDetector()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add a PropertyChangeListener to this deadlock detector.
protected  DeadlockDetector.Deadlock createDeadlock(Collection<JPDAThread> threads)
          Utility method used by the implementing class to create deadlock instances.
 Set<DeadlockDetector.Deadlock> getDeadlocks()
          Get the set of detected deadlocks.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove a PropertyChangeListener from this deadlock detector.
protected  void setDeadlocks(Set<DeadlockDetector.Deadlock> deadlocks)
          Used by overriding class to set the deadlocks when found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_DEADLOCK

public static final String PROP_DEADLOCK
Name of property which is fired when deadlock occurs.

See Also:
Constant Field Values
Constructor Detail

DeadlockDetector

public DeadlockDetector()
Method Detail

getDeadlocks

public final Set<DeadlockDetector.Deadlock> getDeadlocks()
Get the set of detected deadlocks.

Returns:
The set of deadlocks.

setDeadlocks

protected final void setDeadlocks(Set<DeadlockDetector.Deadlock> deadlocks)
Used by overriding class to set the deadlocks when found.

Parameters:
deadlocks - The set of deadlocks.

createDeadlock

protected final DeadlockDetector.Deadlock createDeadlock(Collection<JPDAThread> threads)
Utility method used by the implementing class to create deadlock instances.

Parameters:
threads - The threads in deadlock
Returns:
Deadlock instance

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener l)
Add a PropertyChangeListener to this deadlock detector.

Parameters:
l - The listener

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener l)
Remove a PropertyChangeListener from this deadlock detector.

Parameters:
l - The listener

org.netbeans.api.debugger.jpda/2 2.31.1

Built on December 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.