Java 类com.sun.jdi.event.EventSet 实例源码

项目:OpenJSharp    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:jdk8u-jdk    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:openjdk-jdk10    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:openjdk9    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:openjdk9    文件:TargetVM.java   
protected void handleEventCmdSet(Packet p) {
    EventSet eventSet = new EventSetImpl(vm, p);

    if (eventSet != null) {
        queueEventSet(eventSet);
    }
}
项目:jdk8u_jdk    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:lookaside_java-1.8.0-openjdk    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:intellij-ce-playground    文件:DebuggerUtilsEx.java   
@NotNull
public static List<Pair<Breakpoint, Event>> getEventDescriptors(SuspendContextImpl suspendContext) {
  DebuggerManagerThreadImpl.assertIsManagerThread();
  if(suspendContext == null) {
    return Collections.emptyList();
  }
  final EventSet events = suspendContext.getEventSet();
  if(events == null) {
    return Collections.emptyList();
  }
  final List<Pair<Breakpoint, Event>> eventDescriptors = new SmartList<Pair<Breakpoint, Event>>();

  final RequestManagerImpl requestManager = suspendContext.getDebugProcess().getRequestsManager();
  for (final Event event : events) {
    final Requestor requestor = requestManager.findRequestor(event.request());
    if (requestor instanceof Breakpoint) {
      eventDescriptors.add(Pair.create((Breakpoint)requestor, event));
    }
  }
  return eventDescriptors;
}
项目:infobip-open-jdk-8    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:jdk8u-dev-jdk    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:jdk7-jdk    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:openjdk-source-code-learn    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:jdivisitor    文件:EventThread.java   
/**
 * Run the event handling thread.
 * 
 * As long as the thread remains connected to the VM, events are removed
 * from the queue and dispatched.
 */
@Override
public void run() {
    EventQueue queue = vm.eventQueue();

    while (connected) {
        try {
            EventSet eventSet = queue.remove();

            EventIterator eventIterator = eventSet.eventIterator();
            while (eventIterator.hasNext()) {
                handleEvent(eventIterator.nextEvent());
            }
            eventSet.resume();
        } catch (InterruptedException ie) {
            vm.dispose();
            break;
        } catch (VMDisconnectedException vmde) {
            handleDisconnectedException();
            break;
        }
    }
}
项目:OLD-OpenJDK8    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:tools-idea    文件:DebuggerUtilsEx.java   
@NotNull
public static List<Pair<Breakpoint, Event>> getEventDescriptors(SuspendContextImpl suspendContext) {
  DebuggerManagerThreadImpl.assertIsManagerThread();
  if(suspendContext == null) {
    return Collections.emptyList();
  }
  final EventSet events = suspendContext.getEventSet();
  if(events == null) {
    return Collections.emptyList();
  }
  final List<Pair<Breakpoint, Event>> eventDescriptors = new SmartList<Pair<Breakpoint, Event>>();

  final RequestManagerImpl requestManager = suspendContext.getDebugProcess().getRequestsManager();
  for (final Event event : events) {
    final Requestor requestor = requestManager.findRequestor(event.request());
    if (requestor instanceof Breakpoint) {
      eventDescriptors.add(new Pair<Breakpoint, Event>((Breakpoint)requestor, event));
    }
  }
  return eventDescriptors;
}
项目:jive    文件:JiveThread.java   
@Override
public boolean handleEvent(final Event event, final JDIDebugTarget target,
    final boolean suspendVote, final EventSet eventSet)
{
  try
  {
    final int numFrames = getUnderlyingFrameCount();
    if (numFrames <= getRemainingFrames())
    {
      stepEnd(eventSet);
      return false;
    }
    // reset running state and keep going
    setRunning(true);
    deleteStepRequest();
    createSecondaryStepRequest();
    return true;
  }
  catch (final DebugException e)
  {
    logError(e);
    stepEnd(eventSet);
    return false;
  }
}
项目:openjdk-jdk7u-jdk    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:openjdk-icedtea7    文件:EventQueueImpl.java   
EventSet removeInternal() throws InterruptedException {
    EventSet eventSet;
    do {
        // Waiting forever, so removeUnfiltered() is never null
        eventSet = removeUnfiltered(0).internalFilter();
    } while (eventSet == null || eventSet.isEmpty());

    /*
     * Currently, no internal events are requested with a suspend
     * policy other than none, so we don't check for notifySuspend()
     * here. If this changes in the future, there is much
     * infrastructure that needs to be updated.
     */

    return eventSet;
}
项目:gravel    文件:VMRemoteTarget.java   
private void eventLoop() throws InterruptedException {
    System.out.println("eventLoop started");
    EventQueue eventQueue = vm.eventQueue();
    boolean isRunning = true;
    while (isRunning) {
        EventSet eventSet = eventQueue.remove();
        boolean mayResume = true;
        for (Event event : eventSet) {
            System.out.println(event);
            if (event instanceof VMDeathEvent
                    || event instanceof VMDisconnectEvent) {
                isRunning = false;
            } else if (event instanceof ExceptionEvent) {
                mayResume = false;
            }
        }
        if (mayResume) eventSet.resume();
    }
}
项目:JavaTracer    文件:EventThread.java   
/***
* A VMDisconnectedException has happened while dealing with
* another event. We need to flush the event queue, dealing only
* with exit events (VMDeath, VMDisconnect) so that we terminate
* correctly.
*/
   synchronized void handleDisconnectedException() {
       EventQueue queue = vm.eventQueue();
       while (connected) {
           try {
               EventSet eventSet = queue.remove();
               EventIterator iter = eventSet.eventIterator();
               while (iter.hasNext()) {
                   Event event = iter.nextEvent();
                   if (event instanceof VMDeathEvent) {
                       vmDeathManager.vmDeathEvent((VMDeathEvent)event,enableProfiling);
                   } else if (event instanceof VMDisconnectEvent) {
                       connected=disconnect.vmDisconnectEvent((VMDisconnectEvent)event);
                   }
               }
               eventSet.resume(); // Resume the VM

           } catch (InterruptedException exc) {
               exc.printStackTrace();
           }
       }
   }
项目:OpenJSharp    文件:EventQueueImpl.java   
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
项目:OpenJSharp    文件:TargetVM.java   
protected void handleEventCmdSet(Packet p) {
    EventSet eventSet = new EventSetImpl(vm, p);

    if (eventSet != null) {
        queueEventSet(eventSet);
    }
}
项目:OpenJSharp    文件:TargetVM.java   
private void queueEventSet(EventSet eventSet) {
    int maxQueueSize = 0;

    synchronized(eventQueues) {
        Iterator<EventQueue> iter = eventQueues.iterator();
        while (iter.hasNext()) {
            EventQueueImpl queue = (EventQueueImpl)iter.next();
            queue.enqueue(eventSet);
            maxQueueSize = Math.max(maxQueueSize, queue.size());
        }
    }

    controlEventFlow(maxQueueSize);
}
项目:jdk8u-jdk    文件:EventQueueImpl.java   
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
项目:jdk8u-jdk    文件:TargetVM.java   
protected void handleEventCmdSet(Packet p) {
    EventSet eventSet = new EventSetImpl(vm, p);

    if (eventSet != null) {
        queueEventSet(eventSet);
    }
}
项目:jdk8u-jdk    文件:TargetVM.java   
private void queueEventSet(EventSet eventSet) {
    int maxQueueSize = 0;

    synchronized(eventQueues) {
        Iterator<EventQueue> iter = eventQueues.iterator();
        while (iter.hasNext()) {
            EventQueueImpl queue = (EventQueueImpl)iter.next();
            queue.enqueue(eventSet);
            maxQueueSize = Math.max(maxQueueSize, queue.size());
        }
    }

    controlEventFlow(maxQueueSize);
}
项目:openjdk-jdk10    文件:EventQueueImpl.java   
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
项目:openjdk-jdk10    文件:TargetVM.java   
private void queueEventSet(EventSet eventSet) {
    int maxQueueSize = 0;

    synchronized(eventQueues) {
        Iterator<EventQueue> iter = eventQueues.iterator();
        while (iter.hasNext()) {
            EventQueueImpl queue = (EventQueueImpl)iter.next();
            queue.enqueue(eventSet);
            maxQueueSize = Math.max(maxQueueSize, queue.size());
        }
    }

    controlEventFlow(maxQueueSize);
}
项目:acdebugger    文件:PermissionDebugger.java   
private void loop(BreakpointRequest br, Field contextField) throws Exception {
  int lineNumber = br.location().lineNumber();

  br.setSuspendPolicy(BreakpointRequest.SUSPEND_EVENT_THREAD);
  br.enable();
  EventQueue evtQueue = vm.eventQueue();
  boolean run = true;
  while (run) {
    EventSet evtSet = evtQueue.remove();
    EventIterator evtIter = evtSet.eventIterator();
    while (evtIter.hasNext()) {
      try {
        Event evt = evtIter.next();
        EventRequest evtReq = evt.request();
        if (evtReq instanceof BreakpointRequest
            && ((BreakpointRequest) evtReq).location().lineNumber() == lineNumber) {
          new BreakpointProcessor(missingPerms)
              .processBreakpoint(contextField, (BreakpointEvent) evt);

          // TODO: 12/20/17 Remove when full loop processing is restored
          // run = false;
          System.out.println(missingPerms);
          missingPerms.clear();
        }
      } finally {
        evtSet.resume();
      }
    }
  }

  //    System.out.println(missingPerms);
  //    printPerms(missingPerms);
}
项目:openjdk9    文件:EventQueueImpl.java   
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
项目:openjdk9    文件:TargetVM.java   
private void queueEventSet(EventSet eventSet) {
    int maxQueueSize = 0;

    synchronized(eventQueues) {
        Iterator<EventQueue> iter = eventQueues.iterator();
        while (iter.hasNext()) {
            EventQueueImpl queue = (EventQueueImpl)iter.next();
            queue.enqueue(eventSet);
            maxQueueSize = Math.max(maxQueueSize, queue.size());
        }
    }

    controlEventFlow(maxQueueSize);
}
项目:jdk8u_jdk    文件:EventQueueImpl.java   
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
项目:jdk8u_jdk    文件:TargetVM.java   
private void queueEventSet(EventSet eventSet) {
    int maxQueueSize = 0;

    synchronized(eventQueues) {
        Iterator<EventQueue> iter = eventQueues.iterator();
        while (iter.hasNext()) {
            EventQueueImpl queue = (EventQueueImpl)iter.next();
            queue.enqueue(eventSet);
            maxQueueSize = Math.max(maxQueueSize, queue.size());
        }
    }

    controlEventFlow(maxQueueSize);
}
项目:lookaside_java-1.8.0-openjdk    文件:EventQueueImpl.java   
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
项目:lookaside_java-1.8.0-openjdk    文件:TargetVM.java   
protected void handleEventCmdSet(Packet p) {
    EventSet eventSet = new EventSetImpl(vm, p);

    if (eventSet != null) {
        queueEventSet(eventSet);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:TargetVM.java   
private void queueEventSet(EventSet eventSet) {
    int maxQueueSize = 0;

    synchronized(eventQueues) {
        Iterator<EventQueue> iter = eventQueues.iterator();
        while (iter.hasNext()) {
            EventQueueImpl queue = (EventQueueImpl)iter.next();
            queue.enqueue(eventSet);
            maxQueueSize = Math.max(maxQueueSize, queue.size());
        }
    }

    controlEventFlow(maxQueueSize);
}
项目:intellij-ce-playground    文件:SuspendContextImpl.java   
SuspendContextImpl(@NotNull DebugProcessImpl debugProcess,
                   @MagicConstant(flagsFromClass = EventRequest.class) int suspendPolicy,
                   int eventVotes,
                   EventSet set) {
  myDebugProcess = debugProcess;
  mySuspendPolicy = suspendPolicy;
  myVotesToVote = eventVotes;
  myEventSet = set;
}
项目:infobip-open-jdk-8    文件:EventQueueImpl.java   
/**
 * Filter out events not for user's eyes.
 * Then filter out empty sets.
 */
public EventSet remove(long timeout) throws InterruptedException {
    if (timeout < 0) {
        throw new IllegalArgumentException("Timeout cannot be negative");
    }

    EventSet eventSet;
    while (true) {
        EventSetImpl fullEventSet = removeUnfiltered(timeout);
        if (fullEventSet == null) {
            eventSet = null;  // timeout
            break;
        }
        /*
         * Remove events from the event set for which
         * there is no corresponding enabled request (
         * this includes our internally requested events.)
         * This never returns null
         */
        eventSet = fullEventSet.userFilter();
        if (!eventSet.isEmpty()) {
            break;
        }
    }

    if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
        vm.notifySuspend();
    }

    return eventSet;
}
项目:infobip-open-jdk-8    文件:TargetVM.java   
protected void handleEventCmdSet(Packet p) {
    EventSet eventSet = new EventSetImpl(vm, p);

    if (eventSet != null) {
        queueEventSet(eventSet);
    }
}
项目:infobip-open-jdk-8    文件:TargetVM.java   
private void queueEventSet(EventSet eventSet) {
    int maxQueueSize = 0;

    synchronized(eventQueues) {
        Iterator<EventQueue> iter = eventQueues.iterator();
        while (iter.hasNext()) {
            EventQueueImpl queue = (EventQueueImpl)iter.next();
            queue.enqueue(eventSet);
            maxQueueSize = Math.max(maxQueueSize, queue.size());
        }
    }

    controlEventFlow(maxQueueSize);
}