Interface PerformanceCounter

All Known Implementing Classes:
CompositePerformanceCounter, DelegatePerformanceCounter, ManagedAggregateProcessor, ManagedBeanProcessor, ManagedCamelContext, ManagedChoice, ManagedClaimCheck, ManagedConvertBody, ManagedCustomLoadBalancer, ManagedDelayer, ManagedDisabled, ManagedDynamicRouter, ManagedEnricher, ManagedFailoverLoadBalancer, ManagedFilter, ManagedIdempotentConsumer, ManagedLog, ManagedLoop, ManagedMarshal, ManagedMulticast, ManagedPerformanceCounter, ManagedPollEnricher, ManagedProcess, ManagedProcessor, ManagedRandomLoadBalancer, ManagedRecipientList, ManagedRemoveHeader, ManagedRemoveHeaders, ManagedRemoveProperties, ManagedRemoveProperty, ManagedResequencer, ManagedRollback, ManagedRoundRobinLoadBalancer, ManagedRoute, ManagedRoutingSlip, ManagedSamplingThrottler, ManagedScript, ManagedSendDynamicProcessor, ManagedSendProcessor, ManagedSetBody, ManagedSetExchangePattern, ManagedSetHeader, ManagedSetProperty, ManagedSplitter, ManagedStep, ManagedStickyLoadBalancer, ManagedStop, ManagedSuspendableRoute, ManagedThreads, ManagedThrottler, ManagedThroughputLogger, ManagedThrowException, ManagedTopicLoadBalancer, ManagedTransformer, ManagedUnmarshal, ManagedValidate, ManagedWeightedLoadBalancer, ManagedWireTapProcessor

public interface PerformanceCounter
A counter that gathers performance metrics when an Exchange is routed in Camel.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    completedExchange(org.apache.camel.Exchange exchange, long time)
    Executed when an Exchange is complete.
    void
    failedExchange(org.apache.camel.Exchange exchange)
    Executed when an Exchange failed.
    boolean
    Are statistics enabled?
    void
    processExchange(org.apache.camel.Exchange exchange, String type)
    Executed when an Exchange is about to be processed.
    void
    setStatisticsEnabled(boolean statisticsEnabled)
    Sets whether statistics are enabled.
  • Method Details

    • processExchange

      void processExchange(org.apache.camel.Exchange exchange, String type)
      Executed when an Exchange is about to be processed.
      Parameters:
      exchange - the exchange
      type - the node type
    • completedExchange

      void completedExchange(org.apache.camel.Exchange exchange, long time)
      Executed when an Exchange is complete.
      Parameters:
      exchange - the exchange
      time - the time it took in millis to complete
    • failedExchange

      void failedExchange(org.apache.camel.Exchange exchange)
      Executed when an Exchange failed.
      Parameters:
      exchange - the exchange
    • isStatisticsEnabled

      Are statistics enabled?

      They can be enabled and disabled at runtime

      Returns:
      whether statistics are enabled or not
    • setStatisticsEnabled

      void setStatisticsEnabled(boolean statisticsEnabled)
      Sets whether statistics are enabled.

      They can be enabled and disabled at runtime

      Parameters:
      statisticsEnabled - whether statistics are enabled or not