org.apache.camel.spi
Interface InflightRepository

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultInflightRepository

public interface InflightRepository
extends Service

A repository which tracks in flight Exchanges.

Version:

Method Summary
 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
 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. will be removed in a future Camel release.
 int size(String routeId)
          Current size of inflight exchanges which are from the given route.
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Method Detail

add

void add(Exchange exchange)
Adds the exchange to the inflight registry to the total counter

Parameters:
exchange - the exchange

remove

void remove(Exchange exchange)
Removes the exchange from the inflight registry to the total counter

Parameters:
exchange - the exchange

add

void add(Exchange exchange,
         String routeId)
Adds the exchange to the inflight registry associated to the given route

Parameters:
exchange - the exchange
routeId - the id of the route

remove

void remove(Exchange exchange,
            String routeId)
Removes the exchange from the inflight registry removing association to the given route

Parameters:
exchange - the exchange
routeId - the id of the route

size

int size()
Current size of inflight exchanges.

Will return 0 if there are no inflight exchanges.

Returns:
number of exchanges currently in flight.

size

@Deprecated
int size(Endpoint endpoint)
Deprecated. will be removed in a future Camel release.

Will always return 0 due method is deprecated.


removeRoute

void removeRoute(String routeId)
Removes the route from the in flight registry.

Is used for cleaning up resources to avoid leaking.

Parameters:
routeId - the id of the route

size

int size(String routeId)
Current size of inflight exchanges which are from the given route.

Will return 0 if there are no inflight exchanges.

Parameters:
routeId - the id of the route
Returns:
number of exchanges currently in flight.


Apache CAMEL