Package org.apache.camel.spi
Interface ReactiveExecutor
-
public interface ReactiveExecutorSPI to plugin different reactive engines in the Camel routing engine.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexecuteFromQueue()Executes the next task (if supported by the reactive executor implementation)booleanisStatisticsEnabled()Whether statistics is enabledvoidschedule(Runnable runnable)Schedules the task to be run (fairly)voidscheduleMain(Runnable runnable)Schedules the task to be prioritized and run asapvoidscheduleQueue(Runnable runnable)Schedules the task to be run later from the queue (current thread) This is used for routingExchangeusing transactions.voidscheduleSync(Runnable runnable)Schedules the task to run synchronously (current thread)voidsetStatisticsEnabled(boolean statisticsEnabled)To enable statistics
-
-
-
Field Detail
-
FACTORY
static final String FACTORY
Service factory key.- See Also:
- Constant Field Values
-
-
Method Detail
-
schedule
void schedule(Runnable runnable)
Schedules the task to be run (fairly)- Parameters:
runnable- the task
-
scheduleMain
void scheduleMain(Runnable runnable)
Schedules the task to be prioritized and run asap- Parameters:
runnable- the task
-
scheduleSync
void scheduleSync(Runnable runnable)
Schedules the task to run synchronously (current thread)- Parameters:
runnable- the task
-
scheduleQueue
void scheduleQueue(Runnable runnable)
Schedules the task to be run later from the queue (current thread) This is used for routingExchangeusing transactions.- Parameters:
runnable- the task
-
executeFromQueue
boolean executeFromQueue()
Executes the next task (if supported by the reactive executor implementation)- Returns:
- true if a task was executed or false if no more pending tasks
-
setStatisticsEnabled
void setStatisticsEnabled(boolean statisticsEnabled)
To enable statistics
-
isStatisticsEnabled
boolean isStatisticsEnabled()
Whether statistics is enabled
-
-