Author: sebb Date: Fri Nov 14 05:05:24 2008 New Revision: 713989 URL: http://svn.apache.org/viewvc?rev=713989&view=rev Log: Improved thread safety
Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SplineModel.java Modified: jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SplineModel.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SplineModel.java?rev=713989&r1=713988&r2=713989&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SplineModel.java (original) +++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/visualizers/SplineModel.java Fri Nov 14 05:05:24 2008 @@ -31,28 +31,32 @@ protected final boolean SHOW_INCOMING_SAMPLES = true; + // These are not currently updated protected int numberOfNodes = DEFAULT_NUMBER_OF_NODES; protected int refreshPeriod = DEFAULT_REFRESH_PERIOD; /** Current Spline curve. */ - protected Spline3 dataCurve = null; + //@GuardedBy("this") + private Spline3 dataCurve = null; - SamplingStatCalculator samples; + final SamplingStatCalculator samples; + //@GuardedBy("this") private GraphListener listener; + //@GuardedBy("this") private String name; public SplineModel() { samples = new SamplingStatCalculator("Spline"); } - public void setListener(GraphListener vis) { + public synchronized void setListener(GraphListener vis) { listener = vis; } - public void setName(String newName) { + public synchronized void setName(String newName) { name = newName; } @@ -60,7 +64,7 @@ return true; } - public Spline3 getDataCurve() { + public synchronized Spline3 getDataCurve() { return dataCurve; } @@ -100,7 +104,7 @@ return samples.getCount(); } - public String getName() { + public synchronized String getName() { return name; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]