Package org.apache.jmeter.threads

Examples of org.apache.jmeter.threads.JMeterThread.stop()


        }
        // ConcurrentHashMap does not need synch. here
        for(Entry<JMeterThread, Thread> entry : engine.allThreads.entrySet()){
            JMeterThread thrd = entry.getKey();
            if (thrd.getThreadName().equals(threadName)){
                thrd.stop();
                thrd.interrupt();
                if (now) {
                    Thread t = entry.getValue();
                    if (t != null) {
                        t.interrupt();
View Full Code Here


     */
    private void tellThreadsToStop() {
        // ConcurrentHashMap does not need protecting
        for (Entry<JMeterThread, Thread> entry : allThreads.entrySet()) {
            JMeterThread item = entry.getKey();
            item.stop(); // set stop flag
            item.interrupt(); // interrupt sampler if possible
            Thread t = entry.getValue();
            if (t != null ) { // Bug 49734
                t.interrupt(); // also interrupt JVM thread
            }
View Full Code Here

        log.warn("stopThread: "+e);
        return false;
      }
      if (thrd!= null)
      {
        thrd.stop();
        if (now)
        {
            Thread t = (Thread) allThreadsSave.get(thrd);
            if (t != null)
            {
View Full Code Here

    {
        Iterator iter = new HashSet(allThreads.keySet()).iterator();
        while (iter.hasNext())
        {
            JMeterThread item = (JMeterThread) iter.next();
            item.stop();
            Thread t = (Thread) allThreads.get(item);
            if (t != null)
            {
                t.interrupt();
            }
View Full Code Here

  {
    Iterator iter = new HashSet(allThreads.keySet()).iterator();
    while (iter.hasNext())
    {
      JMeterThread item = (JMeterThread) iter.next();
      item.stop();
    }
  }

    // Remote exit
    public void exit()
View Full Code Here

  {
    Iterator iter = allThreads.iterator();
    while(iter.hasNext())
    {
      JMeterThread item = (JMeterThread)iter.next();
      item.stop();
    }
    allThreads.clear();
  }

}
View Full Code Here

    {
        Iterator iter = new HashSet(allThreads.keySet()).iterator();
        while (iter.hasNext())
        {
            JMeterThread item = (JMeterThread) iter.next();
            item.stop();
            Thread t = (Thread) allThreads.get(item);
            if (t != null)
            {
                t.interrupt();
            }
View Full Code Here

  {
    Iterator iter = new HashSet(allThreads.keySet()).iterator();
    while (iter.hasNext())
    {
      JMeterThread item = (JMeterThread) iter.next();
      item.stop();
    }
    verifyThreadsStopped();
  }

    // Remote exit
View Full Code Here

  {
    Iterator iter = new HashSet(allThreads.keySet()).iterator();
    while(iter.hasNext())
    {
      JMeterThread item = (JMeterThread)iter.next();
      item.stop();
      Thread t = (Thread)allThreads.get(item);
      if(t != null)
      {
        t.interrupt();
      }
View Full Code Here

    } catch (Exception e) {
      log.warn("stopThread: " + e);
      return false;
    }
    if (thrd != null) {
      thrd.stop();
      if (now) {
        Thread t = (Thread) allThreadsSave.get(thrd);
        if (t != null) {
          t.interrupt();
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.