Class FilibusterExecutor
- java.lang.Object
-
- cloud.filibuster.instrumentation.datatypes.FilibusterExecutor
-
public class FilibusterExecutor extends java.lang.Object
Helper class for building executor services, thread pools, event loop groups, and web clients.
-
-
Constructor Summary
Constructors Constructor Description FilibusterExecutor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.netty.channel.EventLoopGroup
getClientEventLoopGroup(int numThreads)
Return a new event loop group of a custom size.static com.linecorp.armeria.client.WebClient
getDecoratedWebClient(java.lang.String baseUri, java.lang.String serviceName)
Return a decorated web client from the common pool.static java.util.concurrent.ExecutorService
getExecutorService()
Get access to the executor service that's a reserved pool of threads for instrumentation calls to the Filibuster server.static com.linecorp.armeria.client.ClientFactory
getNewClientFactory(int numThreads)
Return a new client factory for web clients with a specified number of threads in the worker group.static io.netty.channel.EventLoopGroup
getNewEventLoopGroup()
Return a new event loop group of the default size.static com.linecorp.armeria.client.WebClient
getWebClient(java.lang.String baseUri)
Return a web client from the common pool.
-
-
-
Method Detail
-
getExecutorService
public static java.util.concurrent.ExecutorService getExecutorService()
Get access to the executor service that's a reserved pool of threads for instrumentation calls to the Filibuster server.- Returns:
- reference to executor service for instrumentation calls to the Filibuster server.
-
getNewEventLoopGroup
public static io.netty.channel.EventLoopGroup getNewEventLoopGroup()
Return a new event loop group of the default size.- Returns:
- new event loop group, per call.
-
getClientEventLoopGroup
public static io.netty.channel.EventLoopGroup getClientEventLoopGroup(int numThreads)
Return a new event loop group of a custom size.- Parameters:
numThreads
- the number of threads for the event loop group.- Returns:
- new event loop group, per call.
-
getNewClientFactory
public static com.linecorp.armeria.client.ClientFactory getNewClientFactory(int numThreads)
Return a new client factory for web clients with a specified number of threads in the worker group.- Parameters:
numThreads
- the number of threads for the worker group.- Returns:
- a new client factory.
-
getWebClient
public static com.linecorp.armeria.client.WebClient getWebClient(java.lang.String baseUri)
Return a web client from the common pool.- Parameters:
baseUri
- the base URI for the web client.- Returns:
- a new web client.
-
getDecoratedWebClient
public static com.linecorp.armeria.client.WebClient getDecoratedWebClient(java.lang.String baseUri, java.lang.String serviceName)
Return a decorated web client from the common pool.- Parameters:
baseUri
- the base URI for the web client.serviceName
- the name of the service issuing the call.- Returns:
- a new web client.
-
-