Class MarkupWorkerFactory

java.lang.Object
com.hpe.caf.worker.AbstractWorkerFactory<MarkupWorkerConfiguration,MarkupWorkerTask>
com.hpe.caf.worker.markup.MarkupWorkerFactory
All Implemented Interfaces:
com.hpe.caf.api.HealthReporter, com.hpe.caf.api.worker.WorkerFactory

public class MarkupWorkerFactory extends com.hpe.caf.worker.AbstractWorkerFactory<MarkupWorkerConfiguration,MarkupWorkerTask>
Factory class for creating a MarkupWorker.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MarkupWorkerFactory(com.hpe.caf.api.ConfigurationSource configSource, com.hpe.caf.api.worker.DataStore store, com.hpe.caf.api.Codec codec)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.hpe.caf.api.worker.Worker
    createWorker(MarkupWorkerTask task, com.hpe.caf.api.worker.WorkerTaskData workerTaskData)
    Create a worker given a task, using DataStore, ConfiguratonSource and Codec passed in the constructor.
     
    protected int
     
    protected String
     
    int
     
    com.hpe.caf.api.HealthResult
    MarkupWorkerFactory is responsible for calling the health-check to view the status of the worker and this is displayed on Marathon.

    Methods inherited from class com.hpe.caf.worker.AbstractWorkerFactory

    getCodec, getConfiguration, getDataStore, getWorker, getWorkerConfiguration, verifyWorkerTask, verifyWorkerTaskAndSetResponse

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.hpe.caf.api.worker.WorkerFactory

    getWorker, shutdown
  • Constructor Details

    • MarkupWorkerFactory

      public MarkupWorkerFactory(com.hpe.caf.api.ConfigurationSource configSource, com.hpe.caf.api.worker.DataStore store, com.hpe.caf.api.Codec codec) throws com.hpe.caf.api.worker.WorkerException
      Throws:
      com.hpe.caf.api.worker.WorkerException
  • Method Details

    • getWorkerName

      protected String getWorkerName()
      Specified by:
      getWorkerName in class com.hpe.caf.worker.AbstractWorkerFactory<MarkupWorkerConfiguration,MarkupWorkerTask>
    • getWorkerApiVersion

      protected int getWorkerApiVersion()
      Specified by:
      getWorkerApiVersion in class com.hpe.caf.worker.AbstractWorkerFactory<MarkupWorkerConfiguration,MarkupWorkerTask>
    • createWorker

      public com.hpe.caf.api.worker.Worker createWorker(MarkupWorkerTask task, com.hpe.caf.api.worker.WorkerTaskData workerTaskData) throws com.hpe.caf.api.worker.InvalidTaskException
      Create a worker given a task, using DataStore, ConfiguratonSource and Codec passed in the constructor.
      Specified by:
      createWorker in class com.hpe.caf.worker.AbstractWorkerFactory<MarkupWorkerConfiguration,MarkupWorkerTask>
      Parameters:
      task -
      workerTaskData -
      Returns:
      MarkupWorker
      Throws:
      com.hpe.caf.api.worker.InvalidTaskException
    • getInvalidTaskQueue

      public String getInvalidTaskQueue()
    • getWorkerThreads

      public int getWorkerThreads()
    • healthCheck

      public com.hpe.caf.api.HealthResult healthCheck()
      MarkupWorkerFactory is responsible for calling the health-check to view the status of the worker and this is displayed on Marathon.
      Returns:
      HealthResult