T
- the ExecutorService
subclass created by this factorypublic static interface GrpcTransportOptions.ExecutorFactory<T extends ExecutorService>
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
.
Modifier and Type | Method and Description |
---|---|
T |
get()
Gets an executor service instance.
|
void |
release(T executor)
Releases resources used by the executor and possibly shuts it down.
|
Copyright © 2019 Google LLC. All rights reserved.