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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.camel.Endpointprotected voiddoStop()intintstatic StringgetDisruptorKey(String uri) booleanbooleanvoidonShutdownEndpoint(DisruptorEndpoint disruptorEndpoint) voidsetBufferSize(int size) To configure the ring buffer sizevoidsetDefaultBlockWhenFull(boolean defaultBlockWhenFull) To configure the default value for block when fullvoidsetDefaultConcurrentConsumers(int defaultConcurrentConsumers) To configure the default number of concurrent consumersvoidsetDefaultMultipleConsumers(boolean defaultMultipleConsumers) To configure the default value for multiple consumersvoidsetDefaultProducerType(DisruptorProducerType defaultProducerType) To configure the default value for DisruptorProducerTypevoidsetDefaultWaitStrategy(DisruptorWaitStrategy defaultWaitStrategy) To configure the default value for DisruptorWaitStrategyMethods 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, validateURIMethods 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, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE- See Also:
-
MAX_CONCURRENT_CONSUMERS
public static final int MAX_CONCURRENT_CONSUMERS- See Also:
-
-
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:
createEndpointin classorg.apache.camel.support.DefaultComponent- Throws:
Exception
-
getDisruptorKey
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
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
-
setDefaultProducerType
To configure the default value for DisruptorProducerType The default value is Multi. -
getDefaultWaitStrategy
-
setDefaultWaitStrategy
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
-