Search in sources :

Example 1 with RequestProcessor

use of com.linkedin.databus2.core.container.request.RequestProcessor in project databus by linkedin.

the class UnknownCommandProcessor method run.

public Future<DatabusRequest> run(DatabusRequest request) {
    RequestProcessor processor = _processors.get(request.getName());
    if (null == processor) {
        processor = UNKOWN_COMMAND_PROCESSOR;
    }
    request.setProcessor(processor);
    ExecutorService procExecutor = processor.getExecutorService();
    if (null != procExecutor) {
        return procExecutor.submit(request);
    } else {
        request.call();
        return request;
    }
}
Also used : ExecutorService(java.util.concurrent.ExecutorService) RequestProcessor(com.linkedin.databus2.core.container.request.RequestProcessor)

Aggregations

RequestProcessor (com.linkedin.databus2.core.container.request.RequestProcessor)1 ExecutorService (java.util.concurrent.ExecutorService)1