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:
Hiram R. Chirino 2008-03-05 16:14:39 +00:00
parent e7316df001
commit c1e560e7ef
3 changed files with 22 additions and 1 deletions

View File

@ -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");
}

View File

@ -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;
}
}

View File

@ -77,4 +77,8 @@ public class ProducerConsumer extends Producer {
protected boolean useTimerLoop() {
return false;
}
public Consumer getConsumer() {
return consumer;
}
}