Commit Graph

317 Commits

Author SHA1 Message Date
ZHANG Dapeng 72553433b3
api: fix LoadBalancer javadoc links 2019-05-06 11:17:35 -07:00
Kun Zhang 63f636b4b6
api: NameResolver.Args deprecates NameResolver.Helper. (#5664)
Having two Helpers (the other being LoadBalancer.Helper) is proven to
be confusing, and the one in NameResolver is fundamentally different
from the one from LoadBalancer, as the latter mutates the states while
the former doesn't. Renaming it to Args make it less awkward to
expose it to LoadBalancer, which is needed for creating NameResolvers
for per-locality routing in the XdsLoadBalancer.
2019-05-03 16:45:38 -07:00
Kun Zhang 973885457f
core: change ClientStreamTracer.StreamInfo to a final class with a builder (#5648)
As we are now endorsing the wrapping of ClientStreamTracers by
providing ForwardingClientStreamTracer, there is a need for altering
StreamInfo, especially CallOptions before it's passed onto the
delegate.  A Builder class and a toBuilder() provides a robust way
to copy the rest of the fields.

This is a breaking change for anybody who creates StreamInfo, which is
unlikely in non-test code, because StreamInfo was added as late as
1.20.0.
2019-04-30 09:10:56 -07:00
Chengyuan Zhang 44840fe813
api: fix bugs of missing to copy customOptions when converting to a new builder, also trash hashCode/equals (#5647)
* api: fix bugs of missing out customOptions in CreateSubchannelArgs toBuider, hashCode, equals

* trash equals/hashCode for CreateSubchannelArgs as they are problematic
2019-04-29 18:40:11 -07:00
Chengyuan Zhang 405d8c3865
api: patch CreateSubchannelArgs toString() with customOptions (#5646) 2019-04-29 14:54:59 -07:00
Chengyuan Zhang dc218b6d4d
api: augment CreateSubchannelArgs with custom options (#5640)
* api: augment CreateSubchannelArgs with custom options

* added unit tests

* added ExperimentalApi anntation with tracking issue
2019-04-26 13:59:37 -07:00
Kun Zhang d530641097
core: annotate experimental API's inner classes. (#5643)
Annotations on outer class don't show on the javadoc of inner classes.
2019-04-26 11:28:48 -07:00
Carl Mastrangelo 53a3f12666
api: expose if waitForReady has been set on CallOptions 2019-04-25 10:56:40 -07:00
Carl Mastrangelo ce6358e57f
core: add getService to MethodDescriptor 2019-04-24 17:45:41 -07:00
Eric Anderson 187fe9e146 Lint fixes 2019-04-23 14:51:34 -07:00
Carl Mastrangelo 04e07034f3
all: update to truth 0.44 2019-04-23 10:50:49 -07:00
Eric Anderson f4d48fec62
core: Add NameResolverRegistry
NameResolverRegistry takes on all the logic previously in
NameResolverProvider. But it also allows manual registration of
NameResolvers, which is useful when the providers have complex
construction or need objects injected into them.

This also avoids a circular dependency during class loading since
previously loading any Provider searched for all Providers via
ClassLoader since ClassLoader handling was static within the parent
class.

Fixes #5562
2019-04-22 10:22:46 -07:00
Jean de Klerk b363f80764 docs: add note about retrying UNAVAILABLE 2019-04-19 14:29:13 -07:00
Eric Anderson 7c0e14318e api: Stabilize MethodDescriptor.Marshaller
Fixes #1777
2019-04-19 10:32:42 -07:00
Kun Zhang 39e66fa22b
core: delete ManagedChannelBuilder.loadBalancerFactory() and all deprecated factories (#5480)
This has been deprecated since 1.18.0
2019-04-17 14:46:19 -07:00
Carl Mastrangelo a395eec4a3
core: update LB and NR API names
Updates #1770
2019-04-17 12:45:29 -07:00
Eric Anderson 80c3c992a6 core: Move io.grpc to grpc-api
io.grpc has fewer dependencies than io.grpc.internal. Moving it to a
separate artifact lets users use the API without bringing in the deps.
If the library has an optional dependency on grpc, that can be quite
convenient.

We now version-pin both grpc-api and grpc-core, since both contain
internal APIs.

I had to change a few tests in grpc-api to avoid FakeClock. Moving
FakeClock to grpc-api was difficult because it uses
io.grpc.internal.TimeProvider, which can't be moved since it is a
production class. Having grpc-api's tests depend on grpc-core's test
classes would be weird and cause a circular dependincy. Having
grpc-api's tests depend on grpc-core is likely possible, but weird and
fairly unnecessary at this point. So instead I rewrote the tests to
avoid FakeClock.

Fixes #1447
2019-04-16 21:45:40 -07:00