Interface GrpcTransportOptions.ExecutorFactory<T> (2.27.0)

public static interface GrpcTransportOptions.ExecutorFactory<T>

An interface for ExecutorService factories. Implementations of this interface can be used to provide an user-defined executor to execute requests. Any implementation of this interface must override the get() method to return the desired executor. The release(executor) method should be overriden to free resources used by the executor (if needed) according to application's logic.

Implementation must provide a public no-arg constructor. Loading of a factory implementation is done via java.util.ServiceLoader.

Type Parameter

NameDescription
T

Methods

get()

public abstract T get()

Gets an executor service instance.

Returns
TypeDescription
T

release(T executor)

public abstract void release(T executor)

Releases resources used by the executor and possibly shuts it down.

Parameter
NameDescription
executorT