Interface EventSet
- All Superinterfaces:
Collection<Event>, Iterable<Event>, Mirror, Set<Event>
public interface EventSet extends Mirror, Set<Event>
Event objects may be created at a given time by the target VirtualMachine. For example, there may be more than one BreakpointRequest for a given Location or you might single step to the same location as a BreakpointRequest. These Event objects are delivered together as an EventSet. For uniformity, an EventSet is always used to deliver Event objects. EventSets are delivered by the EventQueue. EventSets are unmodifiable. Associated with the issuance of an event set, suspensions may have occurred in the target VM. These suspensions correspond with the suspend policy. To assure matching resumes occur, it is recommended, where possible, to complete the processing of an event set with EventSet.resume().
The events that are grouped in an EventSet are restricted in the following ways:
- Always singleton sets:
- Only with other VMDeathEvents:
- Only with other ThreadStartEvents for the same thread:
- Only with other ThreadDeathEvents for the same thread:
- Only with other ClassPrepareEvents for the same class:
- Only with other ClassUnloadEvents for the same class:
- Only with other AccessWatchpointEvents for the same field access:
- Only with other ModificationWatchpointEvents for the same field modification:
- Only with other ExceptionEvents for the same exception occurrence:
- Only with other MethodExitEvents for the same method exit:
- Only with other Monitor contended enter events for the same monitor object:
- Monitor Contended Enter Event
- Only with other Monitor contended entered events for the same monitor object:
- Monitor Contended Entered Event
- Only with other Monitor wait events for the same monitor object:
- Monitor Wait Event
- Only with other Monitor waited events for the same monitor object:
- Monitor Waited Event
- Only with other members of this group, at the same location and in the same thread:
- Since:
- 1.3
- See Also:
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
EventIterator |
eventIterator() |
Return an iterator specific to Event objects. |
void |
resume() |
Resumes threads suspended by this event set. |
int |
suspendPolicy() |
Returns the policy used to suspend threads in the target VM for this event set. |
Methods declared in interface Collection
parallelStream, removeIf, stream, toArray | Modifier and Type | Method | Description |
|---|---|---|
default Stream |
parallelStream() |
Returns a possibly parallel Stream with this collection as its source. |
default boolean |
removeIf |
Removes all of the elements of this collection that satisfy the given predicate (optional operation). |
default Stream |
stream() |
Returns a sequential Stream with this collection as its source. |
default <T> T[] |
toArray |
Returns an array containing all of the elements in this collection, using the provided generator function to allocate the returned array. |
Methods declared in interface Iterable
forEach | Modifier and Type | Method | Description |
|---|---|---|
default void |
forEach |
Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. |
Methods declared in interface Mirror
toString, virtualMachine | Modifier and Type | Method | Description |
|---|---|---|
String |
toString() |
Returns a String describing this mirror |
VirtualMachine |
virtualMachine() |
Gets the VirtualMachine to which this Mirror belongs. |
Methods declared in interface Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray | Modifier and Type | Method | Description |
|---|---|---|
boolean |
add |
Adds the specified element to this set if it is not already present (optional operation). |
boolean |
addAll |
Adds all of the elements in the specified collection to this set if they're not already present (optional operation). |
void |
clear() |
Removes all of the elements from this set (optional operation). |
boolean |
contains |
Returns true if this set contains the specified element. |
boolean |
containsAll |
Returns true if this set contains all of the elements of the specified collection. |
boolean |
equals |
Compares the specified object with this set for equality. |
int |
hashCode() |
Returns the hash code value for this set. |
boolean |
isEmpty() |
Returns true if this set contains no elements. |
Iterator |
iterator() |
Returns an iterator over the elements in this set. |
boolean |
remove |
Removes the specified element from this set if it is present (optional operation). |
boolean |
removeAll |
Removes from this set all of its elements that are contained in the specified collection (optional operation). |
boolean |
retainAll |
Retains only the elements in this set that are contained in the specified collection (optional operation). |
int |
size() |
Returns the number of elements in this set (its cardinality). |
default Spliterator |
spliterator() |
Creates a Spliterator over the elements in this set. |
Object[] |
toArray() |
Returns an array containing all of the elements in this set. |
<T> T[] |
toArray |
Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. |
Method Details
suspendPolicy
int suspendPolicy()
EventRequest for the possible policy values. In rare cases, the suspend policy may differ from the requested value if a ClassPrepareEvent has occurred in a debugger system thread. See ClassPrepareEvent.thread() for details.
- Returns:
- the suspendPolicy which is either
SUSPEND_ALL,SUSPEND_EVENT_THREADorSUSPEND_NONE.
eventIterator
EventIterator eventIterator()
Event objects.resume
void resume()
suspendPolicy() is EventRequest.SUSPEND_ALL, a call to this method is equivalent to VirtualMachine.resume(). If the suspend policy is EventRequest.SUSPEND_EVENT_THREAD, a call to this method is equivalent to ThreadReference.resume() for the event thread. Otherwise, a call to this method is a no-op.
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.