Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.activemq.benchmark
Class BenchmarkSupport  view BenchmarkSupport download BenchmarkSupport.java

java.lang.Object
  extended byorg.activemq.benchmark.BenchmarkSupport
Direct Known Subclasses:
Consumer, Producer

public class BenchmarkSupport
extends java.lang.Object

Abstract base class for some simple benchmark tools

Version:
$Revision$

Field Summary
protected  int batch
           
protected  int connectionCount
           
private  EDU.oswego.cs.dl.util.concurrent.SynchronizedInt connectionCounter
           
private  int counter
           
protected  javax.jms.Destination destination
           
private  boolean durable
           
protected  boolean embeddedBroker
           
private  org.activemq.ActiveMQConnectionFactory factory
           
private  java.text.NumberFormat formatter
           
private  org.activemq.util.IdGenerator idGenerator
           
private  java.util.List resources
           
protected  java.lang.String[] subjects
           
private  long time
           
private  boolean topic
           
private  java.lang.String url
           
 
Constructor Summary
BenchmarkSupport()
           
 
Method Summary
protected  void addResource(java.lang.Object resource)
           
protected  java.lang.String asMemoryString(long value)
           
protected  void count(int count)
           
protected  javax.jms.Destination createDestination(javax.jms.Session session, java.lang.String subject)
           
protected  org.activemq.ActiveMQConnectionFactory createFactory()
           
protected  javax.jms.Session createSession()
           
 int getConnectionCount()
           
 org.activemq.ActiveMQConnectionFactory getFactory()
           
 java.lang.String getUrl()
           
 boolean isDurable()
           
 boolean isEmbeddedBroker()
           
 boolean isTopic()
           
protected static boolean parseBoolean(java.lang.String text)
           
protected  int resetCount()
           
 void setConnectionCount(int connectionCount)
           
 void setDurable(boolean durable)
           
 void setEmbeddedBroker(boolean embeddedBroker)
           
 void setFactory(org.activemq.ActiveMQConnectionFactory factory)
           
 void setSubject(java.lang.String subject)
           
 void setTopic(boolean topic)
           
 void setUrl(java.lang.String url)
           
 void start()
           
protected  void timerLoop()
           
protected  boolean useTimerLoop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionCount

protected int connectionCount

batch

protected int batch

destination

protected javax.jms.Destination destination

embeddedBroker

protected boolean embeddedBroker

topic

private boolean topic

durable

private boolean durable

factory

private org.activemq.ActiveMQConnectionFactory factory

url

private java.lang.String url

subjects

protected java.lang.String[] subjects

time

private long time

counter

private int counter

resources

private java.util.List resources

formatter

private java.text.NumberFormat formatter

connectionCounter

private EDU.oswego.cs.dl.util.concurrent.SynchronizedInt connectionCounter

idGenerator

private org.activemq.util.IdGenerator idGenerator
Constructor Detail

BenchmarkSupport

public BenchmarkSupport()
Method Detail

start

public void start()

getUrl

public java.lang.String getUrl()

setUrl

public void setUrl(java.lang.String url)

isTopic

public boolean isTopic()

setTopic

public void setTopic(boolean topic)

getFactory

public org.activemq.ActiveMQConnectionFactory getFactory()

setFactory

public void setFactory(org.activemq.ActiveMQConnectionFactory factory)

setSubject

public void setSubject(java.lang.String subject)

isDurable

public boolean isDurable()

setDurable

public void setDurable(boolean durable)

isEmbeddedBroker

public boolean isEmbeddedBroker()

setEmbeddedBroker

public void setEmbeddedBroker(boolean embeddedBroker)

getConnectionCount

public int getConnectionCount()

setConnectionCount

public void setConnectionCount(int connectionCount)

createSession

protected javax.jms.Session createSession()
                                   throws javax.jms.JMSException

createFactory

protected org.activemq.ActiveMQConnectionFactory createFactory()

count

protected void count(int count)

resetCount

protected int resetCount()

timerLoop

protected void timerLoop()

asMemoryString

protected java.lang.String asMemoryString(long value)

useTimerLoop

protected boolean useTimerLoop()

createDestination

protected javax.jms.Destination createDestination(javax.jms.Session session,
                                                  java.lang.String subject)
                                           throws javax.jms.JMSException

addResource

protected void addResource(java.lang.Object resource)

parseBoolean

protected static boolean parseBoolean(java.lang.String text)