Class DisruptorComponent

java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultComponent
org.apache.camel.component.disruptor.DisruptorComponent
All Implemented Interfaces:
AutoCloseable, org.apache.camel.CamelContextAware, org.apache.camel.Component, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasCamelContext, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
DisruptorVmComponent

@Component("disruptor") public class DisruptorComponent extends org.apache.camel.support.DefaultComponent
An implementation of the Disruptor component for asynchronous SEDA exchanges on an LMAX Disruptor within a CamelContext
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     

    Fields inherited from class org.apache.camel.support.service.BaseService

    BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.camel.Endpoint
    createEndpoint(String uri, String remaining, Map<String,Object> parameters)
     
    protected void
     
    int
     
    int
     
     
     
    static String
     
     
    boolean
     
    boolean
     
    void
     
    void
    setBufferSize(int size)
    To configure the ring buffer size
    void
    setDefaultBlockWhenFull(boolean defaultBlockWhenFull)
    To configure the default value for block when full
    void
    setDefaultConcurrentConsumers(int defaultConcurrentConsumers)
    To configure the default number of concurrent consumers
    void
    setDefaultMultipleConsumers(boolean defaultMultipleConsumers)
    To configure the default value for multiple consumers
    void
    To configure the default value for DisruptorProducerType
    void
    To configure the default value for DisruptorWaitStrategy

    Methods inherited from class org.apache.camel.support.DefaultComponent

    afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURI

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doFail, doLifecycleChange, doResume, doShutdown, doStart, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Field Details

  • Constructor Details

    • DisruptorComponent

      public DisruptorComponent()
  • Method Details

    • createEndpoint

      protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String,Object> parameters) throws Exception
      Specified by:
      createEndpoint in class org.apache.camel.support.DefaultComponent
      Throws:
      Exception
    • getDisruptorKey

      public static String getDisruptorKey(String uri)
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • getDisruptors

      public Map<String,DisruptorReference> getDisruptors()
    • getDefaultConcurrentConsumers

      public int getDefaultConcurrentConsumers()
    • setDefaultConcurrentConsumers

      public void setDefaultConcurrentConsumers(int defaultConcurrentConsumers)
      To configure the default number of concurrent consumers
    • isDefaultMultipleConsumers

      public boolean isDefaultMultipleConsumers()
    • setDefaultMultipleConsumers

      public void setDefaultMultipleConsumers(boolean defaultMultipleConsumers)
      To configure the default value for multiple consumers
    • getDefaultProducerType

      public DisruptorProducerType getDefaultProducerType()
    • setDefaultProducerType

      public void setDefaultProducerType(DisruptorProducerType defaultProducerType)
      To configure the default value for DisruptorProducerType

      The default value is Multi.

    • getDefaultWaitStrategy

      public DisruptorWaitStrategy getDefaultWaitStrategy()
    • setDefaultWaitStrategy

      public void setDefaultWaitStrategy(DisruptorWaitStrategy defaultWaitStrategy)
      To configure the default value for DisruptorWaitStrategy

      The default value is Blocking.

    • isDefaultBlockWhenFull

      public boolean isDefaultBlockWhenFull()
    • setDefaultBlockWhenFull

      public void setDefaultBlockWhenFull(boolean defaultBlockWhenFull)
      To configure the default value for block when full

      The default value is true.

    • setBufferSize

      public void setBufferSize(int size)
      To configure the ring buffer size
    • getBufferSize

      public int getBufferSize()
    • onShutdownEndpoint

      public void onShutdownEndpoint(DisruptorEndpoint disruptorEndpoint)