@Deprecated public class CircuitBreakerLoadBalancer extends LoadBalancerSupport implements Traceable, CamelContextAware
logshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
CircuitBreakerLoadBalancer()
Deprecated.
|
CircuitBreakerLoadBalancer(List<Class<?>> exceptions)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStart()
Deprecated.
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Deprecated.
Implementations override this method to support customized start/stop.
|
String |
dumpState()
Deprecated.
|
CamelContext |
getCamelContext()
Deprecated.
Get the
CamelContext |
ExceptionFailureStatistics |
getExceptionFailureStatistics()
Deprecated.
|
List<Class<?>> |
getExceptions()
Deprecated.
|
long |
getHalfOpenAfter()
Deprecated.
|
int |
getState()
Deprecated.
|
int |
getThreshold()
Deprecated.
|
String |
getTraceLabel()
Deprecated.
Gets the trace label used for logging when tracing is enabled.
|
protected boolean |
hasFailed(Exchange exchange)
Deprecated.
Has the given Exchange failed
|
boolean |
isRunAllowed()
Deprecated.
Helper methods so the service knows if it should keep running.
|
boolean |
process(Exchange exchange,
AsyncCallback callback)
Deprecated.
Processes the message exchange.
|
void |
reset()
Deprecated.
|
void |
setCamelContext(CamelContext camelContext)
Deprecated.
Injects the
CamelContext |
void |
setHalfOpenAfter(long halfOpenAfter)
Deprecated.
|
void |
setThreshold(int threshold)
Deprecated.
|
String |
toString()
Deprecated.
|
addProcessor, doShutdown, getId, getProcessors, hasNext, next, process, removeProcessor, setIddoResume, doSuspend, getStatus, getVersion, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic CircuitBreakerLoadBalancer()
public CircuitBreakerLoadBalancer(List<Class<?>> exceptions)
public void setHalfOpenAfter(long halfOpenAfter)
public long getHalfOpenAfter()
public void setThreshold(int threshold)
public int getThreshold()
public int getState()
public CamelContext getCamelContext()
CamelContextAwareCamelContextgetCamelContext in interface CamelContextAwarepublic void setCamelContext(CamelContext camelContext)
CamelContextAwareCamelContextsetCamelContext in interface CamelContextAwarecamelContext - the Camel contextpublic List<Class<?>> getExceptions()
public boolean isRunAllowed()
StatefulServiceisRunAllowed in interface StatefulServiceisRunAllowed in class ServiceSupportpublic boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessorProcessor.process(org.apache.camel.Exchange), but the caller supports having the exchange asynchronously processed.
If there was a failure processing then the caused Exception would be set on the Exchange.process in interface AsyncProcessorexchange - the message exchangecallback - the AsyncCallback will be invoked when the processing of the exchange is completed.
If the exchange is completed synchronously, then the callback is also invoked synchronously.
The callback should therefore be careful of starting recursive loop.public String getTraceLabel()
TraceablegetTraceLabel in interface Traceablepublic ExceptionFailureStatistics getExceptionFailureStatistics()
public void reset()
protected void doStart() throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class LoadBalancerSupportExceptionServiceSupport.doStop()protected void doStop() throws Exception
ServiceSupportServiceSupport.doStop() method when
the service is being stopped. This method will also be invoked
if the service is still in uninitialized state (eg has not
been started). The method is always called to allow the service
to do custom logic when the service is being stopped, such as when
CamelContext is shutting down.doStop in class LoadBalancerSupportExceptionServiceSupport.doStart()Apache Camel