Class VeniceSparkServerFactory

java.lang.Object
com.linkedin.venice.controller.spark.VeniceSparkServerFactory
All Implemented Interfaces:
spark.embeddedserver.EmbeddedServerFactory

public class VeniceSparkServerFactory extends Object implements spark.embeddedserver.EmbeddedServerFactory
Creates instances of embedded jetty containers.
  • Constructor Details

    • VeniceSparkServerFactory

      public VeniceSparkServerFactory(VeniceProperties jettyConfig)
  • Method Details

    • create

      public spark.embeddedserver.EmbeddedServer create(spark.route.Routes routeMatcher, spark.staticfiles.StaticFilesConfiguration staticFilesConfiguration, spark.ExceptionMapper exceptionMapper, boolean hasMultipleHandler)
      Specified by:
      create in interface spark.embeddedserver.EmbeddedServerFactory
    • withThreadPool

      public VeniceSparkServerFactory withThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)
      Sets optional thread pool for jetty server. This is useful for overriding the default thread pool behaviour for example io.dropwizard.metrics.jetty9.InstrumentedQueuedThreadPool.
      Parameters:
      threadPool - thread pool
      Returns:
      Builder pattern - returns this instance