Lines 21-26
Link Here
|
21 |
import org.apache.jmeter.samplers.SampleResult; |
21 |
import org.apache.jmeter.samplers.SampleResult; |
22 |
import org.apache.jmeter.samplers.Sampler; |
22 |
import org.apache.jmeter.samplers.Sampler; |
23 |
import org.apache.jmeter.engine.StandardJMeterEngine; |
23 |
import org.apache.jmeter.engine.StandardJMeterEngine; |
|
|
24 |
import org.apache.jorphan.logging.LoggingManager; |
25 |
import org.apache.log.Logger; |
24 |
|
26 |
|
25 |
/** |
27 |
/** |
26 |
* Holds context for a thread. |
28 |
* Holds context for a thread. |
Lines 29-34
Link Here
|
29 |
* The class is not thread-safe - it is only intended for use within a single thread. |
31 |
* The class is not thread-safe - it is only intended for use within a single thread. |
30 |
*/ |
32 |
*/ |
31 |
public class JMeterContext { |
33 |
public class JMeterContext { |
|
|
34 |
private static final Logger log = LoggingManager.getLoggerForClass(); |
35 |
|
32 |
private JMeterVariables variables; |
36 |
private JMeterVariables variables; |
33 |
|
37 |
|
34 |
private SampleResult previousResult; |
38 |
private SampleResult previousResult; |
Lines 49-54
Link Here
|
49 |
|
53 |
|
50 |
private byte[] readBuffer = null; |
54 |
private byte[] readBuffer = null; |
51 |
|
55 |
|
|
|
56 |
private boolean isReinitializingSubControllers = false; |
57 |
|
52 |
JMeterContext() { |
58 |
JMeterContext() { |
53 |
clear0(); |
59 |
clear0(); |
54 |
} |
60 |
} |
Lines 66-71
Link Here
|
66 |
threadNum = 0; |
72 |
threadNum = 0; |
67 |
readBuffer = null; |
73 |
readBuffer = null; |
68 |
thread = null; |
74 |
thread = null; |
|
|
75 |
isReinitializingSubControllers = false; |
69 |
} |
76 |
} |
70 |
|
77 |
|
71 |
/** |
78 |
/** |
Lines 169-172
Link Here
|
169 |
public void setSamplingStarted(boolean b) { |
176 |
public void setSamplingStarted(boolean b) { |
170 |
samplingStarted = b; |
177 |
samplingStarted = b; |
171 |
} |
178 |
} |
|
|
179 |
|
180 |
/** |
181 |
* Reset flag indicating listeners should not be notified since reinit of sub |
182 |
* controllers is being done |
183 |
* @see ISSUE 50032 |
184 |
*/ |
185 |
public void unsetIsReinitializingSubControllers() { |
186 |
if(isReinitializingSubControllers) |
187 |
{ |
188 |
isReinitializingSubControllers = false; |
189 |
} |
190 |
else |
191 |
{ |
192 |
log.warn("Unsetting while flag is not true"); |
193 |
} |
194 |
} |
195 |
|
196 |
/** |
197 |
* Set flag indicating listeners should not be notified since reinit of sub |
198 |
* controllers is being done |
199 |
* @return true if it is the first one to set |
200 |
* @see ISSUE 50032 |
201 |
*/ |
202 |
public boolean setIsReinitializingSubControllers() { |
203 |
if(!isReinitializingSubControllers) |
204 |
{ |
205 |
isReinitializingSubControllers = true; |
206 |
return true; |
207 |
} |
208 |
return false; |
209 |
} |
210 |
|
211 |
/** |
212 |
* @return true if within reinit of Sub Controllers |
213 |
* @see ISSUE 50032 |
214 |
*/ |
215 |
public boolean isReinitializingSubControllers() { |
216 |
return isReinitializingSubControllers; |
217 |
} |
172 |
} |
218 |
} |