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) |
processAsyncbuild, 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, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic 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.HasIdpublic void setId(String id)
setId in interface org.apache.camel.spi.IdAwarepublic String getRouteId()
getRouteId in interface org.apache.camel.spi.RouteIdAwarepublic void setRouteId(String routeId)
setRouteId in interface org.apache.camel.spi.RouteIdAwarepublic void process(org.apache.camel.Exchange exchange)
throws Exception
process in interface org.apache.camel.Processorprocess in class AsyncProcessorSupportExceptionpublic boolean process(org.apache.camel.Exchange exchange,
org.apache.camel.AsyncCallback callback)
process in interface org.apache.camel.AsyncProcessorpublic 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 AsyncProcessorSupportExceptionpublic void doStop()
throws Exception
doStop in class AsyncProcessorSupportExceptionprotected String createLogMessage(org.apache.camel.Exchange exchange, int receivedCount)
protected void createGroupIntervalLogMessage()
protected double messagesPerSecond(long messageCount,
long startTime,
long endTime)
Apache Camel