public class ThroughputLogger extends AsyncProcessorSupport implements org.apache.camel.AsyncProcessor, org.apache.camel.spi.IdAware, org.apache.camel.spi.RouteIdAware
Constructor and Description |
---|
ThroughputLogger(org.apache.camel.spi.CamelLogger logger) |
ThroughputLogger(org.apache.camel.spi.CamelLogger logger,
org.apache.camel.CamelContext camelContext,
Long groupInterval,
Long groupDelay,
Boolean groupActiveOnly) |
ThroughputLogger(org.apache.camel.spi.CamelLogger logger,
Integer groupSize) |
Modifier and Type | Method and Description |
---|---|
protected void |
createGroupIntervalLogMessage() |
protected String |
createLogMessage(org.apache.camel.Exchange exchange,
int receivedCount) |
void |
doStart() |
void |
doStop() |
String |
getAction() |
double |
getAverage() |
boolean |
getGroupActiveOnly() |
long |
getGroupDelay() |
Long |
getGroupInterval() |
Integer |
getGroupSize() |
String |
getId() |
String |
getLastLogMessage() |
NumberFormat |
getNumberFormat() |
double |
getRate() |
int |
getReceivedCounter() |
String |
getRouteId() |
protected double |
messagesPerSecond(long messageCount,
long startTime,
long endTime) |
void |
process(org.apache.camel.Exchange exchange) |
boolean |
process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback) |
void |
reset() |
void |
setAction(String action) |
void |
setGroupDelay(long groupDelay) |
void |
setGroupInterval(Long groupInterval) |
void |
setGroupSize(Integer groupSize) |
void |
setId(String id) |
void |
setNumberFormat(NumberFormat numberFormat) |
void |
setRouteId(String routeId) |
processAsync
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ThroughputLogger(org.apache.camel.spi.CamelLogger logger)
public ThroughputLogger(org.apache.camel.spi.CamelLogger logger, Integer groupSize)
public String getId()
getId
in interface org.apache.camel.spi.HasId
public void setId(String id)
setId
in interface org.apache.camel.spi.IdAware
public String getRouteId()
getRouteId
in interface org.apache.camel.spi.RouteIdAware
public void setRouteId(String routeId)
setRouteId
in interface org.apache.camel.spi.RouteIdAware
public void process(org.apache.camel.Exchange exchange) throws Exception
process
in interface org.apache.camel.Processor
process
in class AsyncProcessorSupport
Exception
public boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
process
in interface org.apache.camel.AsyncProcessor
public Integer getGroupSize()
public void setGroupSize(Integer groupSize)
public Long getGroupInterval()
public void setGroupInterval(Long groupInterval)
public long getGroupDelay()
public void setGroupDelay(long groupDelay)
public boolean getGroupActiveOnly()
public NumberFormat getNumberFormat()
public void setNumberFormat(NumberFormat numberFormat)
public String getAction()
public void setAction(String action)
public void reset()
public double getRate()
public double getAverage()
public int getReceivedCounter()
public String getLastLogMessage()
public void doStart() throws Exception
doStart
in class AsyncProcessorSupport
Exception
public void doStop() throws Exception
doStop
in class AsyncProcessorSupport
Exception
protected String createLogMessage(org.apache.camel.Exchange exchange, int receivedCount)
protected void createGroupIntervalLogMessage()
protected double messagesPerSecond(long messageCount, long startTime, long endTime)
Apache Camel