com.espertech.esper.core.thread
Class ThreadingServiceImpl

java.lang.Object
  extended by com.espertech.esper.core.thread.ThreadingServiceImpl
All Implemented Interfaces:
ThreadingService

public class ThreadingServiceImpl
extends java.lang.Object
implements ThreadingService

Implementation for engine-level threading.


Constructor Summary
ThreadingServiceImpl(ConfigurationEngineDefaults.Threading threadingConfig)
          Ctor.
 
Method Summary
 void destroy()
          Destroy thread pools.
 java.util.concurrent.BlockingQueue<java.lang.Runnable> getInboundQueue()
          Returns the inbound queue.
 java.util.concurrent.ThreadPoolExecutor getInboundThreadPool()
          Returns the inbound thread pool
 java.util.concurrent.BlockingQueue<java.lang.Runnable> getOutboundQueue()
          Returns the outbound queue.
 java.util.concurrent.ThreadPoolExecutor getOutboundThreadPool()
          Returns the outbound thread pool
 java.util.concurrent.BlockingQueue<java.lang.Runnable> getRouteQueue()
          Returns the route queue.
 java.util.concurrent.ThreadPoolExecutor getRouteThreadPool()
          Returns the route thread pool
 java.util.concurrent.BlockingQueue<java.lang.Runnable> getTimerQueue()
          Returns the timer queue.
 java.util.concurrent.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.
 java.lang.Thread makeEventSourceThread(java.lang.String engineURI, java.lang.String sourceName, java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadingServiceImpl

public ThreadingServiceImpl(ConfigurationEngineDefaults.Threading threadingConfig)
Ctor.

Parameters:
threadingConfig - configuration
Method Detail

isRouteThreading

public boolean isRouteThreading()
Description copied from interface: ThreadingService
Returns true for route execution threading enabled.

Specified by:
isRouteThreading in interface ThreadingService
Returns:
indicator

isInboundThreading

public boolean isInboundThreading()
Description copied from interface: ThreadingService
Returns true for inbound threading enabled.

Specified by:
isInboundThreading in interface ThreadingService
Returns:
indicator

isTimerThreading

public boolean isTimerThreading()
Description copied from interface: ThreadingService
Returns true for timer execution threading enabled.

Specified by:
isTimerThreading in interface ThreadingService
Returns:
indicator

isOutboundThreading

public boolean isOutboundThreading()
Description copied from interface: ThreadingService
Returns true for outbound threading enabled.

Specified by:
isOutboundThreading in interface ThreadingService
Returns:
indicator

initThreading

public void initThreading(EPServicesContext services,
                          EPRuntimeImpl runtime)
Description copied from interface: ThreadingService
Initialize thread pools.

Specified by:
initThreading in interface ThreadingService
Parameters:
services - engine-level service context
runtime - runtime

submitRoute

public void submitRoute(RouteUnitRunnable unit)
Description copied from interface: ThreadingService
Submit route work unit.

Specified by:
submitRoute in interface ThreadingService
Parameters:
unit - unit of work

submitInbound

public void submitInbound(InboundUnitRunnable unit)
Description copied from interface: ThreadingService
Submit inbound work unit.

Specified by:
submitInbound in interface ThreadingService
Parameters:
unit - unit of work

submitOutbound

public void submitOutbound(OutboundUnitRunnable unit)
Description copied from interface: ThreadingService
Submit outbound work unit.

Specified by:
submitOutbound in interface ThreadingService
Parameters:
unit - unit of work

submitTimerWork

public void submitTimerWork(TimerUnit unit)
Description copied from interface: ThreadingService
Submit timer execution work unit.

Specified by:
submitTimerWork in interface ThreadingService
Parameters:
unit - unit of work

getOutboundQueue

public java.util.concurrent.BlockingQueue<java.lang.Runnable> getOutboundQueue()
Description copied from interface: ThreadingService
Returns the outbound queue.

Specified by:
getOutboundQueue in interface ThreadingService
Returns:
queue

getOutboundThreadPool

public java.util.concurrent.ThreadPoolExecutor getOutboundThreadPool()
Description copied from interface: ThreadingService
Returns the outbound thread pool

Specified by:
getOutboundThreadPool in interface ThreadingService
Returns:
thread pool

getRouteQueue

public java.util.concurrent.BlockingQueue<java.lang.Runnable> getRouteQueue()
Description copied from interface: ThreadingService
Returns the route queue.

Specified by:
getRouteQueue in interface ThreadingService
Returns:
queue

getRouteThreadPool

public java.util.concurrent.ThreadPoolExecutor getRouteThreadPool()
Description copied from interface: ThreadingService
Returns the route thread pool

Specified by:
getRouteThreadPool in interface ThreadingService
Returns:
thread pool

getTimerQueue

public java.util.concurrent.BlockingQueue<java.lang.Runnable> getTimerQueue()
Description copied from interface: ThreadingService
Returns the timer queue.

Specified by:
getTimerQueue in interface ThreadingService
Returns:
queue

getTimerThreadPool

public java.util.concurrent.ThreadPoolExecutor getTimerThreadPool()
Description copied from interface: ThreadingService
Returns the timer thread pool

Specified by:
getTimerThreadPool in interface ThreadingService
Returns:
thread pool

getInboundQueue

public java.util.concurrent.BlockingQueue<java.lang.Runnable> getInboundQueue()
Description copied from interface: ThreadingService
Returns the inbound queue.

Specified by:
getInboundQueue in interface ThreadingService
Returns:
queue

getInboundThreadPool

public java.util.concurrent.ThreadPoolExecutor getInboundThreadPool()
Description copied from interface: ThreadingService
Returns the inbound thread pool

Specified by:
getInboundThreadPool in interface ThreadingService
Returns:
thread pool

destroy

public void destroy()
Description copied from interface: ThreadingService
Destroy thread pools.

Specified by:
destroy in interface ThreadingService

makeEventSourceThread

public java.lang.Thread makeEventSourceThread(java.lang.String engineURI,
                                              java.lang.String sourceName,
                                              java.lang.Runnable runnable)
Specified by:
makeEventSourceThread in interface ThreadingService

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com