Class AbstractEngineWorkQueueService<C,T,R>

java.lang.Object
com.google.common.util.concurrent.AbstractExecutionThreadService
ch.rswk.meta.engine.AbstractEngineExecutionThreadService<C>
ch.rswk.meta.engine.AbstractEngineWorkQueueService<C,T,R>
All Implemented Interfaces:
EngineServices.ConfigurableService<C>, EngineServices.InfoProvidingService, com.google.common.util.concurrent.Service
Direct Known Subclasses:
LuceneService

public abstract class AbstractEngineWorkQueueService<C,T,R> extends AbstractEngineExecutionThreadService<C>
  • Field Details

  • Constructor Details

    • AbstractEngineWorkQueueService

      public AbstractEngineWorkQueueService(C config, EngineRuntime runtime)
  • Method Details

    • startUp

      protected void startUp() throws Exception
      Overrides:
      startUp in class AbstractEngineExecutionThreadService<C>
      Throws:
      Exception
    • triggerShutdown

      protected void triggerShutdown()
      Overrides:
      triggerShutdown in class com.google.common.util.concurrent.AbstractExecutionThreadService
    • offerWorkUnit

      protected com.google.common.util.concurrent.ListenableFuture<R> offerWorkUnit(T unit)
    • isWorkQueueEmpty

      protected boolean isWorkQueueEmpty()
    • run

      protected void run() throws Exception
      Specified by:
      run in class com.google.common.util.concurrent.AbstractExecutionThreadService
      Throws:
      Exception
    • beforeProcessWorkUnit

      protected void beforeProcessWorkUnit(T unit)
    • processWorkUnit

      protected abstract R processWorkUnit(T unit) throws ErrorReplyException
      Throws:
      ErrorReplyException
    • afterProcessWorkUnit

      protected void afterProcessWorkUnit(T unit)