public class ThreadingServiceImpl extends Object implements ThreadingService
Constructor and Description |
---|
ThreadingServiceImpl(ConfigurationEngineDefaults.Threading threadingConfig)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy thread pools.
|
BlockingQueue<Runnable> |
getInboundQueue()
Returns the inbound queue.
|
ThreadPoolExecutor |
getInboundThreadPool()
Returns the inbound thread pool
|
BlockingQueue<Runnable> |
getOutboundQueue()
Returns the outbound queue.
|
ThreadPoolExecutor |
getOutboundThreadPool()
Returns the outbound thread pool
|
BlockingQueue<Runnable> |
getRouteQueue()
Returns the route queue.
|
ThreadPoolExecutor |
getRouteThreadPool()
Returns the route thread pool
|
BlockingQueue<Runnable> |
getTimerQueue()
Returns the timer queue.
|
ThreadPoolExecutor |
getTimerThreadPool()
Returns the timer thread pool
|
void |
initThreading(EPServicesContext services,
EPRuntimeImpl runtime)
Initialize thread pools.
|
boolean |
isInboundThreading()
Returns true for inbound threading enabled.
|
boolean |
isOutboundThreading()
Returns true for outbound threading enabled.
|
boolean |
isRouteThreading()
Returns true for route execution threading enabled.
|
boolean |
isTimerThreading()
Returns true for timer execution threading enabled.
|
Thread |
makeEventSourceThread(String engineURI,
String sourceName,
Runnable runnable) |
void |
submitInbound(InboundUnitRunnable unit)
Submit inbound work unit.
|
void |
submitOutbound(OutboundUnitRunnable unit)
Submit outbound work unit.
|
void |
submitRoute(RouteUnitRunnable unit)
Submit route work unit.
|
void |
submitTimerWork(TimerUnit unit)
Submit timer execution work unit.
|
public ThreadingServiceImpl(ConfigurationEngineDefaults.Threading threadingConfig)
threadingConfig
- configurationpublic boolean isRouteThreading()
ThreadingService
isRouteThreading
in interface ThreadingService
public boolean isInboundThreading()
ThreadingService
isInboundThreading
in interface ThreadingService
public boolean isTimerThreading()
ThreadingService
isTimerThreading
in interface ThreadingService
public boolean isOutboundThreading()
ThreadingService
isOutboundThreading
in interface ThreadingService
public void initThreading(EPServicesContext services, EPRuntimeImpl runtime)
ThreadingService
initThreading
in interface ThreadingService
services
- engine-level service contextruntime
- runtimepublic void submitRoute(RouteUnitRunnable unit)
ThreadingService
submitRoute
in interface ThreadingService
unit
- unit of workpublic void submitInbound(InboundUnitRunnable unit)
ThreadingService
submitInbound
in interface ThreadingService
unit
- unit of workpublic void submitOutbound(OutboundUnitRunnable unit)
ThreadingService
submitOutbound
in interface ThreadingService
unit
- unit of workpublic void submitTimerWork(TimerUnit unit)
ThreadingService
submitTimerWork
in interface ThreadingService
unit
- unit of workpublic BlockingQueue<Runnable> getOutboundQueue()
ThreadingService
getOutboundQueue
in interface ThreadingService
public ThreadPoolExecutor getOutboundThreadPool()
ThreadingService
getOutboundThreadPool
in interface ThreadingService
public BlockingQueue<Runnable> getRouteQueue()
ThreadingService
getRouteQueue
in interface ThreadingService
public ThreadPoolExecutor getRouteThreadPool()
ThreadingService
getRouteThreadPool
in interface ThreadingService
public BlockingQueue<Runnable> getTimerQueue()
ThreadingService
getTimerQueue
in interface ThreadingService
public ThreadPoolExecutor getTimerThreadPool()
ThreadingService
getTimerThreadPool
in interface ThreadingService
public BlockingQueue<Runnable> getInboundQueue()
ThreadingService
getInboundQueue
in interface ThreadingService
public ThreadPoolExecutor getInboundThreadPool()
ThreadingService
getInboundThreadPool
in interface ThreadingService
public void destroy()
ThreadingService
destroy
in interface ThreadingService
public Thread makeEventSourceThread(String engineURI, String sourceName, Runnable runnable)
makeEventSourceThread
in interface ThreadingService