mirror of https://github.com/apache/activemq.git
Added some property accessors
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@633903 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e7316df001
commit
c1e560e7ef
|
@ -51,6 +51,7 @@ public class BenchmarkSupport {
|
|||
private NumberFormat formatter = NumberFormat.getInstance();
|
||||
private AtomicInteger connectionCounter = new AtomicInteger(0);
|
||||
private IdGenerator idGenerator = new IdGenerator();
|
||||
private boolean timerLoop;
|
||||
|
||||
public BenchmarkSupport() {
|
||||
}
|
||||
|
@ -194,7 +195,7 @@ public class BenchmarkSupport {
|
|||
}
|
||||
|
||||
protected boolean useTimerLoop() {
|
||||
return true;
|
||||
return timerLoop;
|
||||
}
|
||||
|
||||
protected Destination createDestination(Session session, String subject) throws JMSException {
|
||||
|
@ -209,6 +210,14 @@ public class BenchmarkSupport {
|
|||
resources.add(resource);
|
||||
}
|
||||
|
||||
public int getCounter() {
|
||||
return counter;
|
||||
}
|
||||
|
||||
public void setTimerLoop(boolean timerLoop) {
|
||||
this.timerLoop = timerLoop;
|
||||
}
|
||||
|
||||
protected static boolean parseBoolean(String text) {
|
||||
return text.equalsIgnoreCase("true");
|
||||
}
|
||||
|
|
|
@ -177,4 +177,12 @@ public class Producer extends BenchmarkSupport {
|
|||
in.close();
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
public int getLoops() {
|
||||
return loops;
|
||||
}
|
||||
|
||||
public void setLoops(int loops) {
|
||||
this.loops = loops;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,4 +77,8 @@ public class ProducerConsumer extends Producer {
|
|||
protected boolean useTimerLoop() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Consumer getConsumer() {
|
||||
return consumer;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue