Class VeniceSparkServerFactory

  • All Implemented Interfaces:
    spark.embeddedserver.EmbeddedServerFactory

    public class VeniceSparkServerFactory
    extends java.lang.Object
    implements spark.embeddedserver.EmbeddedServerFactory
    Creates instances of embedded jetty containers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      spark.embeddedserver.EmbeddedServer create​(spark.route.Routes routeMatcher, spark.staticfiles.StaticFilesConfiguration staticFilesConfiguration, spark.ExceptionMapper exceptionMapper, boolean hasMultipleHandler)  
      VeniceSparkServerFactory withThreadPool​(org.eclipse.jetty.util.thread.ThreadPool threadPool)
      Sets optional thread pool for jetty server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface spark.embeddedserver.EmbeddedServerFactory

        create
    • Constructor Detail

      • VeniceSparkServerFactory

        public VeniceSparkServerFactory​(VeniceProperties jettyConfig)
    • Method Detail

      • 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