public class DefaultInflightRepository extends ServiceSupport implements InflightRepository
InflightRepository.InflightRepository.InflightExchangeshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
DefaultInflightRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Exchange exchange)
Adds the exchange to the inflight registry to the total counter
|
void |
add(Exchange exchange,
String routeId)
Adds the exchange to the inflight registry associated to the given route
|
Collection<InflightRepository.InflightExchange> |
browse()
A read-only browser of the
InflightRepository.InflightExchanges that are currently inflight. |
Collection<InflightRepository.InflightExchange> |
browse(int limit,
boolean sortByLongestDuration)
A read-only browser of the
InflightRepository.InflightExchanges that are currently inflight. |
protected void |
doStart()
Implementations override this method to support customized start/stop.
|
protected void |
doStop()
Implementations override this method to support customized start/stop.
|
void |
remove(Exchange exchange)
Removes the exchange from the inflight registry to the total counter
|
void |
remove(Exchange exchange,
String routeId)
Removes the exchange from the inflight registry removing association to the given route
|
void |
removeRoute(String routeId)
Removes the route from the in flight registry.
|
int |
size()
Current size of inflight exchanges.
|
int |
size(Endpoint endpoint)
Deprecated.
|
int |
size(String routeId)
Current size of inflight exchanges which are from the given route.
|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic void add(Exchange exchange)
InflightRepositoryadd in interface InflightRepositoryexchange - the exchangepublic void remove(Exchange exchange)
InflightRepositoryremove in interface InflightRepositoryexchange - the exchangepublic void add(Exchange exchange, String routeId)
InflightRepositoryadd in interface InflightRepositoryexchange - the exchangerouteId - the id of the routepublic void remove(Exchange exchange, String routeId)
InflightRepositoryremove in interface InflightRepositoryexchange - the exchangerouteId - the id of the routepublic int size()
InflightRepositorysize in interface InflightRepository@Deprecated public int size(Endpoint endpoint)
InflightRepositorysize in interface InflightRepositorypublic void removeRoute(String routeId)
InflightRepositoryremoveRoute in interface InflightRepositoryrouteId - the id of the routepublic int size(String routeId)
InflightRepositorysize in interface InflightRepositoryrouteId - the id of the routepublic Collection<InflightRepository.InflightExchange> browse()
InflightRepositoryInflightRepository.InflightExchanges that are currently inflight.browse in interface InflightRepositorypublic Collection<InflightRepository.InflightExchange> browse(int limit, boolean sortByLongestDuration)
InflightRepositoryInflightRepository.InflightExchanges that are currently inflight.browse in interface InflightRepositorylimit - maximum number of entries to returnsortByLongestDuration - to sort by the longest duration. Set to true to include the exchanges that has been inflight the longest time,
set to false to sort by exchange idprotected void doStart()
throws Exception
ServiceSupportServiceSupport.doStop() for more details.doStart in class ServiceSupportExceptionServiceSupport.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 ServiceSupportExceptionServiceSupport.doStart()Apache Camel