Class AbstractStage<M,C extends com.lucidworks.apollo.pipeline.StageConfig>

java.lang.Object
com.lucidworks.apollo.pipeline.AbstractStage<M,C>
All Implemented Interfaces:
Configurable<C>, Processor<M>, Stage<M,C>
Direct Known Subclasses:
AbstractGenerator, AbstractProcessor

public abstract class AbstractStage<M,C extends com.lucidworks.apollo.pipeline.StageConfig> extends Object implements Stage<M,C>
  • Field Details

  • Constructor Details

    • AbstractStage

      protected AbstractStage()
  • Method Details

    • preInit

      public void preInit(StageAssistFactoryParams params)
      Specified by:
      preInit in interface Stage<M,C extends com.lucidworks.apollo.pipeline.StageConfig>
    • getConfiguration

      public C getConfiguration()
      Specified by:
      getConfiguration in interface Configurable<M>
    • init

      public void init()
      Specified by:
      init in interface Configurable<M>
    • getId

      public String getId()
      Specified by:
      getId in interface Stage<M,C extends com.lucidworks.apollo.pipeline.StageConfig>
    • getContextFactory

      public com.lucidworks.apollo.pipeline.ContextFactory getContextFactory()
      Specified by:
      getContextFactory in interface Stage<M,C extends com.lucidworks.apollo.pipeline.StageConfig>
    • getMetricRegistry

      public com.codahale.metrics.MetricRegistry getMetricRegistry()
      Specified by:
      getMetricRegistry in interface Stage<M,C extends com.lucidworks.apollo.pipeline.StageConfig>
    • process

      public void process(M message, com.lucidworks.apollo.pipeline.Context context, StageOutput<M> output) throws Exception
      Implements the default behavior for a stage when it receives a message (which is to simply pass it to the next stage)
      Specified by:
      process in interface Processor<M>
      Parameters:
      message -
      context -
      Throws:
      Exception
    • handleSignal

      public void handleSignal(String signal, String value, com.lucidworks.apollo.pipeline.Context context)
      Description copied from interface: Processor
      Handle a signal
      Specified by:
      handleSignal in interface Processor<M>
    • escapeKey

      protected String escapeKey(String key)
    • getConditionScriptFuncWrapper

      protected abstract String getConditionScriptFuncWrapper()
    • getConditionScriptFuncArguments

      protected abstract Object[] getConditionScriptFuncArguments(M message, com.lucidworks.apollo.pipeline.Context context)
    • getConfigurationComponent

      public ConfigurationComponent getConfigurationComponent()
    • managedModeEnabled

      public boolean managedModeEnabled()
      Specified by:
      managedModeEnabled in interface Stage<M,C extends com.lucidworks.apollo.pipeline.StageConfig>
    • getProperty

      public String getProperty(String key, String defaultValue)
      Specified by:
      getProperty in interface Configurable<M>