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 forExecutorServicefactories. Implementations of this interface can be used to provide an user-defined executor to execute requests. Any implementation of this interface must override theget()method to return the desired executor. Therelease(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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget()Gets an executor service instance.voidrelease(T executor)Releases resources used by the executor and possibly shuts it down.
-