Package com.google.cloud.grpc
Interface GrpcTransportOptions.ExecutorFactory<T extends ExecutorService>
- Type Parameters:
T- theExecutorServicesubclass created by this factory
- All Known Implementing Classes:
GrpcTransportOptions.DefaultExecutorFactory
- Enclosing class:
- GrpcTransportOptions
public static interface GrpcTransportOptions.ExecutorFactory<T extends ExecutorService>
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 ServiceLoader.
-
Method Summary
-
Method Details
-
get
T get()Gets an executor service instance. -
release
Releases resources used by the executor and possibly shuts it down.
-