Class VeniceSparkEmbeddedJettyServer
- java.lang.Object
-
- com.linkedin.venice.controller.spark.VeniceSparkEmbeddedJettyServer
-
- All Implemented Interfaces:
spark.embeddedserver.EmbeddedServer
public class VeniceSparkEmbeddedJettyServer extends java.lang.Object implements spark.embeddedserver.EmbeddedServer
Spark server implementation
-
-
Constructor Summary
Constructors Constructor Description VeniceSparkEmbeddedJettyServer(VeniceProperties jettyConfigOverrides, org.eclipse.jetty.server.Handler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
activeThreadCount()
void
configureWebSockets(java.util.Map<java.lang.String,spark.embeddedserver.jetty.websocket.WebSocketHandlerWrapper> webSocketHandlers, java.util.Optional<java.lang.Long> webSocketIdleTimeoutMillis)
void
extinguish()
int
ignite(java.lang.String host, int port, spark.ssl.SslStores sslStores, int maxThreads, int minThreads, int threadIdleTimeoutMillis)
void
join()
void
trustForwardHeaders(boolean trust)
VeniceSparkEmbeddedJettyServer
withThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)
Sets optional thread pool for jetty server.
-
-
-
Constructor Detail
-
VeniceSparkEmbeddedJettyServer
public VeniceSparkEmbeddedJettyServer(VeniceProperties jettyConfigOverrides, org.eclipse.jetty.server.Handler handler)
-
-
Method Detail
-
configureWebSockets
public void configureWebSockets(java.util.Map<java.lang.String,spark.embeddedserver.jetty.websocket.WebSocketHandlerWrapper> webSocketHandlers, java.util.Optional<java.lang.Long> webSocketIdleTimeoutMillis)
- Specified by:
configureWebSockets
in interfacespark.embeddedserver.EmbeddedServer
-
trustForwardHeaders
public void trustForwardHeaders(boolean trust)
- Specified by:
trustForwardHeaders
in interfacespark.embeddedserver.EmbeddedServer
-
ignite
public int ignite(java.lang.String host, int port, spark.ssl.SslStores sslStores, int maxThreads, int minThreads, int threadIdleTimeoutMillis) throws java.lang.Exception
- Specified by:
ignite
in interfacespark.embeddedserver.EmbeddedServer
- Throws:
java.lang.Exception
-
join
public void join() throws java.lang.InterruptedException
- Specified by:
join
in interfacespark.embeddedserver.EmbeddedServer
- Throws:
java.lang.InterruptedException
-
extinguish
public void extinguish()
- Specified by:
extinguish
in interfacespark.embeddedserver.EmbeddedServer
-
activeThreadCount
public int activeThreadCount()
- Specified by:
activeThreadCount
in interfacespark.embeddedserver.EmbeddedServer
-
withThreadPool
public VeniceSparkEmbeddedJettyServer 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
-
-