mirror of
https://github.com/apache/activemq.git
synced 2025-02-22 18:04:46 +00:00
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 NumberFormat formatter = NumberFormat.getInstance();
|
||||||
private AtomicInteger connectionCounter = new AtomicInteger(0);
|
private AtomicInteger connectionCounter = new AtomicInteger(0);
|
||||||
private IdGenerator idGenerator = new IdGenerator();
|
private IdGenerator idGenerator = new IdGenerator();
|
||||||
|
private boolean timerLoop;
|
||||||
|
|
||||||
public BenchmarkSupport() {
|
public BenchmarkSupport() {
|
||||||
}
|
}
|
||||||
@ -194,7 +195,7 @@ public class BenchmarkSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean useTimerLoop() {
|
protected boolean useTimerLoop() {
|
||||||
return true;
|
return timerLoop;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Destination createDestination(Session session, String subject) throws JMSException {
|
protected Destination createDestination(Session session, String subject) throws JMSException {
|
||||||
@ -209,6 +210,14 @@ public class BenchmarkSupport {
|
|||||||
resources.add(resource);
|
resources.add(resource);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getCounter() {
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimerLoop(boolean timerLoop) {
|
||||||
|
this.timerLoop = timerLoop;
|
||||||
|
}
|
||||||
|
|
||||||
protected static boolean parseBoolean(String text) {
|
protected static boolean parseBoolean(String text) {
|
||||||
return text.equalsIgnoreCase("true");
|
return text.equalsIgnoreCase("true");
|
||||||
}
|
}
|
||||||
|
@ -177,4 +177,12 @@ public class Producer extends BenchmarkSupport {
|
|||||||
in.close();
|
in.close();
|
||||||
return buffer.toString();
|
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() {
|
protected boolean useTimerLoop() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Consumer getConsumer() {
|
||||||
|
return consumer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user