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