grpc-java/grpclb
Kun Zhang 7a29f3993c Pass transports instead of futures of transports for new calls.
This PR finishes the refactoring started by #1395. Resolves #1342.

Major changes:

- All interfaces that return `ListenableFuture<T>` now return `T`
- Stop passing `null` for transports after shut down. Pass
  `FailingClientTransport` instead. This simplifies the interface
  semantics of interfaces that return a transport, as well as their
  callers because they no longer need to check for `null`.
- Add two methods to `TransportManager`:
 - `createInterimTransport()` takes the place of `BlankFutureProvider`
  in `LoadBalancer` implementations.
 - `createFailingTransport()` takes the place of errors in the `Future`
  when `LoadBalancer` implementations propagate errors to the caller.
- `createInterimTransport()` creates a `DelayedClientTransport` tracked
  by `ManagedChannelImpl`, which will not terminate until all
  `DelayedClientTransport`s, in addition to the `TransportSet`s, are
  terminated.
- Removed the transport argument from the ready and shutdown callbacks,
  because if `LoadBalancer` was given a delayed transport earlier, it
  will get the real transport's shutdown event, thus won't be able to
  match the two through identity comparison, which beats the purpose of
  passing the transport.
2016-02-23 09:42:03 -08:00
..
src Pass transports instead of futures of transports for new calls. 2016-02-23 09:42:03 -08:00
build.gradle Fix Intellij syncing for some generated dirs 2016-02-18 20:44:46 -08:00