org.apache.camel.component.disruptor
Class DisruptorEndpoint
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.component.disruptor.DisruptorEndpoint
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.MultipleConsumersSupport, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
@ManagedResource(description="Managed Disruptor Endpoint")
public class DisruptorEndpoint
- extends org.apache.camel.impl.DefaultEndpoint
- implements org.apache.camel.MultipleConsumersSupport
An implementation of the Disruptor component
for asynchronous SEDA exchanges on an
LMAX Disruptor within a CamelContext
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Constructor Summary |
DisruptorEndpoint(String endpointUri,
org.apache.camel.Component component,
DisruptorReference disruptorReference,
int concurrentConsumers,
boolean multipleConsumers,
boolean blockWhenFull)
|
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getExchangePattern, getId, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setProperties, setSynchronous, toString |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from interface org.apache.camel.Service |
start, stop |
DISRUPTOR_IGNORE_EXCHANGE
public static final String DISRUPTOR_IGNORE_EXCHANGE
- See Also:
- Constant Field Values
DisruptorEndpoint
public DisruptorEndpoint(String endpointUri,
org.apache.camel.Component component,
DisruptorReference disruptorReference,
int concurrentConsumers,
boolean multipleConsumers,
boolean blockWhenFull)
throws Exception
- Throws:
Exception
getCamelId
@ManagedAttribute(description="Camel ID")
public String getCamelId()
getCamelManagementName
@ManagedAttribute(description="Camel ManagementName")
public String getCamelManagementName()
getEndpointUri
@ManagedAttribute(description="Endpoint Uri",
mask=true)
public String getEndpointUri()
- Specified by:
getEndpointUri
in interface org.apache.camel.Endpoint
- Overrides:
getEndpointUri
in class org.apache.camel.impl.DefaultEndpoint
getState
@ManagedAttribute(description="Service State")
public String getState()
getBufferSize
@ManagedAttribute(description="Buffer max capacity")
public int getBufferSize()
getRemainingCapacity
@ManagedAttribute(description="Remaining capacity in ring buffer")
public long getRemainingCapacity()
throws DisruptorNotStartedException
- Throws:
DisruptorNotStartedException
getPendingExchangeCount
@ManagedAttribute(description="Amount of pending exchanges waiting for consumption in ring buffer")
public long getPendingExchangeCount()
throws DisruptorNotStartedException
- Throws:
DisruptorNotStartedException
getConcurrentConsumers
@ManagedAttribute(description="Number of concurrent consumers")
public int getConcurrentConsumers()
getWaitForTaskToComplete
public org.apache.camel.WaitForTaskToComplete getWaitForTaskToComplete()
setWaitForTaskToComplete
public void setWaitForTaskToComplete(org.apache.camel.WaitForTaskToComplete waitForTaskToComplete)
getTimeout
@ManagedAttribute
public long getTimeout()
setTimeout
public void setTimeout(long timeout)
isMultipleConsumers
@ManagedAttribute
public boolean isMultipleConsumers()
getConsumers
public Set<DisruptorConsumer> getConsumers()
- Returns the current active consumers on this endpoint
getProducers
public Set<DisruptorProducer> getProducers()
- Returns the current active producers on this endpoint
isMultipleConsumersSupported
@ManagedAttribute
public boolean isMultipleConsumersSupported()
- Specified by:
isMultipleConsumersSupported
in interface org.apache.camel.MultipleConsumersSupport
isBlockWhenFull
@ManagedAttribute
public boolean isBlockWhenFull()
setBlockWhenFull
public void setBlockWhenFull(boolean blockWhenFull)
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface org.apache.camel.IsSingleton
createProducer
public org.apache.camel.Producer createProducer()
throws Exception
- Specified by:
createProducer
in interface org.apache.camel.Endpoint
- Throws:
Exception
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
throws Exception
- Specified by:
createConsumer
in interface org.apache.camel.Endpoint
- Throws:
Exception
doStart
protected void doStart()
throws Exception
- Overrides:
doStart
in class org.apache.camel.impl.DefaultEndpoint
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop
in class org.apache.camel.impl.DefaultEndpoint
- Throws:
Exception
doShutdown
protected void doShutdown()
throws Exception
- Overrides:
doShutdown
in class org.apache.camel.support.ServiceSupport
- Throws:
Exception
getComponent
public DisruptorComponent getComponent()
- Overrides:
getComponent
in class org.apache.camel.impl.DefaultEndpoint
equals
public boolean equals(Object object)
- Overrides:
equals
in class org.apache.camel.impl.DefaultEndpoint
hashCode
public int hashCode()
- Overrides:
hashCode
in class org.apache.camel.impl.DefaultEndpoint
Apache Camel