http://jmeter.apache.org/api/org/apache/jmeter/threads/JMeterContext.html

org.apache.jmeter.threads

Class JMeterContext

  • java.lang.Object
  • org.apache.jmeter.threads.JMeterContext

  • public class JMeterContext
    extends java.lang.Object
    Holds context for a thread. Generated by JMeterContextService. The class is not thread-safe - it is only intended for use within a single thread.

Method Summary

All MethodsInstance MethodsConcrete MethodsDeprecated Methods
Modifier and Type Method and Description
void cleanAfterSample()

Clean cached data after sample Internally called by JMeter, never call it directly
void clear()

Internally called by JMeter, never call it directly
Sampler getCurrentSampler()
StandardJMeterEngine getEngine()
SampleResult getPreviousResult()
Sampler getPreviousSampler()

Returns the previousSampler.
java.util.Properties getProperties()
java.util.Map<java.lang.String,java.lang.Object> getSamplerContext()

Sampler context is cleaned up as soon as Post-Processor have ended
JMeterThread getThread()
AbstractThreadGroup getThreadGroup()
int getThreadNum()

Returns the threadNum.
JMeterVariables getVariables()

Gives access to the JMeter variables for the current thread.
boolean isRecording()
boolean isRestartNextLoop()

Deprecated.

boolean isSamplingStarted()
boolean isStartNextThreadLoop()
void setCurrentSampler(Sampler sampler)

Internally called by JMeter, never call it directly
void setEngine(StandardJMeterEngine engine)

Internally called by JMeter, never call it directly
void setPreviousResult(SampleResult result)

Internally called by JMeter, never call it directly
void setRecording(boolean recording)

Internally called by JMeter, never call it directly
void setRestartNextLoop(boolean restartNextLoop)

void setSamplingStarted(boolean b)

Internally called by JMeter, never call it directly
void setStartNextThreadLoop(boolean restartNextLoop)
void setThread(JMeterThread thread)

Internally called by JMeter, never call it directly
void setThreadGroup(AbstractThreadGroup threadgrp)

Internally called by JMeter, never call it directly
void setThreadNum(int threadNum)

Internally called by JMeter, never call it directly
void setVariables(JMeterVariables vars)

Internally called by JMeter, never call it directly
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Method Detail

      • clear

        public void clear()
        Internally called by JMeter, never call it directly
      • getVariables

        public JMeterVariables getVariables()
        Gives access to the JMeter variables for the current thread.
        Returns:
        a pointer to the JMeter variables.
      • getProperties

        public java.util.Properties getProperties()
        Returns:
        a pointer to the JMeter Properties.
      • setVariables

        public void setVariables(JMeterVariables vars)
        Internally called by JMeter, never call it directly
        Parameters:
        vars - JMeterVariables
      • setPreviousResult

        public void setPreviousResult(SampleResult result)
        Internally called by JMeter, never call it directly
        Parameters:
        result - SampleResult
      • getCurrentSampler

        public Sampler getCurrentSampler()
      • setCurrentSampler

        public void setCurrentSampler(Sampler sampler)
        Internally called by JMeter, never call it directly
        Parameters:
        sampler - Sampler
      • getPreviousSampler

        public Sampler getPreviousSampler()
        Returns the previousSampler.
        Returns:
        Sampler
      • getThreadNum

        public int getThreadNum()
        Returns the threadNum.
        Returns:
        int
      • setThreadNum

        public void setThreadNum(int threadNum)
        Internally called by JMeter, never call it directly
        Parameters:
        threadNum - number of threads
      • setThread

        public void setThread(JMeterThread thread)
        Internally called by JMeter, never call it directly
        Parameters:
        thread - to use
      • setThreadGroup

        public void setThreadGroup(AbstractThreadGroup threadgrp)
        Internally called by JMeter, never call it directly
        Parameters:
        threadgrp - ThreadGroup to use
      • setEngine

        public void setEngine(StandardJMeterEngine engine)
        Internally called by JMeter, never call it directly
        Parameters:
        engine - to use
      • isSamplingStarted

        public boolean isSamplingStarted()
      • setSamplingStarted

        public void setSamplingStarted(boolean b)
        Internally called by JMeter, never call it directly
        Parameters:
        b - flag whether sampling has started
      • setStartNextThreadLoop

        public void setStartNextThreadLoop(boolean restartNextLoop)
        Parameters:
        restartNextLoop - if set to true a restart of the loop will occur
      • isStartNextThreadLoop

        public boolean isStartNextThreadLoop()
        Returns:
        true when current loop iteration will be interrupted and JMeter will go to next iteration
      • setRestartNextLoop

        @Deprecated
        public void setRestartNextLoop(boolean restartNextLoop)
        if set to true current loop iteration will be interrupted and JMeter will go to next iteration
        Parameters:
        restartNextLoop - flag whether to restart
      • isRestartNextLoop

        @Deprecated
        public boolean isRestartNextLoop()
        Deprecated. use isStartNextThreadLoop()
        Returns:
        flag whether restart is set
      • cleanAfterSample

        public void cleanAfterSample()
        Clean cached data after sample Internally called by JMeter, never call it directly
      • getSamplerContext

        public java.util.Map<java.lang.String,java.lang.Object> getSamplerContext()
        Sampler context is cleaned up as soon as Post-Processor have ended
        Returns:
        Context to use within PostProcessors to cache data
      • setRecording

        public void setRecording(boolean recording)
        Internally called by JMeter, never call it directly
        Parameters:
        recording - flag whether recording should be done

        isRecording

public boolean isRecording()

JMeterContext----上下文的更多相关文章

  1. 谈谈一些有趣的CSS题目(三)-- 层叠顺序与堆栈上下文知多少

    开本系列,讨论一些有趣的 CSS 题目,抛开实用性而言,一些题目为了拓宽一下解决问题的思路,此外,涉及一些容易忽视的 CSS 细节. 解题不考虑兼容性,题目天马行空,想到什么说什么,如果解题中有你感觉 ...

  2. 如何一步一步用DDD设计一个电商网站(七)—— 实现售价上下文

    阅读目录 前言 明确业务细节 建模 实现 结语 一.前言 上一篇我们已经确立的购买上下文和销售上下文的交互方式,传送门在此:http://www.cnblogs.com/Zachary-Fan/p/D ...

  3. 如何一步一步用DDD设计一个电商网站(六)—— 给购物车加点料,集成售价上下文

    阅读目录 前言 如何在一个项目中实现多个上下文的业务 售价上下文与购买上下文的集成 结语 一.前言 前几篇已经实现了一个最简单的购买过程,这次开始往这个过程中增加一些东西.比如促销.会员价等,在我们的 ...

  4. CSS——关于z-index及层叠上下文(stacking context)

    以下内容根据CSS规范翻译. z-index 'z-index'Value: auto | <integer> | inheritInitial: autoApplies to: posi ...

  5. EF上下文对象线程内唯一性与优化

    在一次请求中,即一个线程内,若是用到EF数据上下文对象,就创建一个,这也加是很多人的代码中习惯在使用上下文对象时,习惯将对象建立在using中,也是为了尽早释放上下文对象, 但是如果有一个业务逻辑调用 ...

  6. 【.NET深呼吸】基于异步上下文的本地变量(AsyncLocal)

    在开始吹牛之前,老周说两个故事. 第一个故事是关于最近某些别有用心的人攻击.net的事,其实我们不用管它们,只要咱们知道自己是.net爱好者就行了,咱们就是因为热爱.net才会选择它.这些人在这段时间 ...

  7. 【.NET深呼吸】应用上下文(AppContext)

    在.net 4.6中新增了一个类,叫AppContext,这个家伙嘛,技术含量不算高,只不过是在编程的时候可以方便用用而已.应用上下文允许定义一个标识(用字符串表示),并且在应用程序运行期间可以切换状 ...

  8. Javascript的“上下文”(context)

    一:JavaScript中的“上下文“指的是什么 百科中这样定义: 上下文是从英文context翻译过来,指的是一种环境. 在软件工程中,上下文是一种属性的有序序列,它们为驻留在环境内的对象定义环境. ...

  9. IDDD 实现领域驱动设计-理解限界上下文

    上一篇:<IDDD 实现领域驱动设计-理解领域和子域> <实现领域驱动设计>前两章内容,基本上读完了,和<领域驱动设计>不同的是,它把很多的概念都放在前面进行讲述了 ...

  10. IDDD 实现领域驱动设计-上下文映射图及其相关概念

    上一篇:<IDDD 实现领域驱动设计-理解限界上下文> 距离上一篇有几天时间了,<实现领域驱动设计>第三章的内容都是围绕一个词-上下文映射图,我大概断断续续看了几天,总共看了两 ...

随机推荐

  1. js验证小数或者整数

    利用正则表达式校验是否为小数或者整数,废话不多说直接上demo(此正则表达式无法校验负数和数字为00开头的数字). PS:(如果有不对之处,请批评指教) <!DOCTYPE html> & ...

  2. Markov Chain Monte Carlo Simulation using C# and MathNet

    Math.Net Numerics has capability to conduct Markov Chair Monte Carlo simulations, yet the document i ...

  3. mysql分组函数及其用例

    功能:用作统计使用,又称为聚合函数或统计函数或组函数 分类:sum 求和.avg 平均值.max 最大值 .min 最小值 .count 计算个数 特点: 1.sum.avg一般用于处理数值型,max ...

  4. goaccess实现nginx实现日志可视化

    一:goaccess模块 goaccess模块是将nginx的日志定向到goaccess模块里实现,原理很简单,只要将文件定向到那里就可以,goaccess是已经集成好显示数据的一个页面,非常的美观和 ...

  5. IntelliJIdea初次接触

    1.下载 在官网下载专业版https://www.jetbrains.com/idea/ 2.修改配置 bin目录下文件如下: 修改idea64.exe.vmoptions(64位执行文件idea64 ...

  6. Schematic - "DesignEntry 30 ERROR Instance referencing symbol is out of date"

    Schematic - "DesignEntry 30 ERROR Instance referencing symbol is out of date"     Descript ...

  7. Django视图中使用本地缓存

    Django服务器视图使用缓存可以大大减小服务器的压力,对数据实时性要求不高的场景使用缓存非常适合. 使用Django本地缓存 1. 在settings.py配置CACHES CACHES = { ' ...

  8. linux系统特殊权限位 suid、sgid、sticky

    linux系统特殊权限位 suid.sgid.stickysuid 使任意用户获得用文件属主相同的权限,sgid使用户获得与文件属组相同的权限(通过sgid获得的权限等同于同一用户组的权限) 表示方法 ...

  9. 03python面向对象编程之多态和枚举6

    7.多态性 对于弱类型的语言来说,变量并没有声明类型,因此同一个变量完全可以在不同的时间引用不同的对象.当同一个变量在调用同一个方法时,完全可能呈现出多种行为(具体呈现出哪种行为由该变量所引用的对象来 ...

  10. redis安装篇

    Redis简介 Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API.从2010年3月15日起,Redis的开发工作 ...