Home
last modified time | relevance | path

Searched refs:subchannel (Results 1 – 25 of 76) sorted by relevance

1234

/external/grpc-grpc-java/grpclb/src/main/java/io/grpc/grpclb/
DCachedSubchannelPool.java56 Subchannel subchannel; in takeOrCreateSubchannel() local
58 subchannel = helper.createSubchannel(eag, defaultAttributes); in takeOrCreateSubchannel()
60 subchannel = entry.subchannel; in takeOrCreateSubchannel()
63 return subchannel; in takeOrCreateSubchannel()
67 public void returnSubchannel(Subchannel subchannel) { in returnSubchannel() argument
68 CacheEntry prev = cache.get(subchannel.getAddresses()); in returnSubchannel()
73 if (prev.subchannel != subchannel) { in returnSubchannel()
74 subchannel.shutdown(); in returnSubchannel()
78 final ShutdownSubchannelTask shutdownTask = new ShutdownSubchannelTask(subchannel); in returnSubchannel()
84 CacheEntry entry = new CacheEntry(subchannel, shutdownTimer); in returnSubchannel()
[all …]
DGrpclbState.java165 void handleSubchannelState(Subchannel subchannel, ConnectivityStateInfo newState) { in handleSubchannelState() argument
166 if (newState.getState() == SHUTDOWN || !(subchannels.values().contains(subchannel))) { in handleSubchannelState()
170 subchannel.requestConnection(); in handleSubchannelState()
172 subchannel.getAttributes().get(STATE_INFO).set(newState); in handleSubchannelState()
219 for (Subchannel subchannel : subchannels.values()) { in maybeUseFallbackBackends()
220 if (subchannel.getAttributes().get(STATE_INFO).get().getState() == READY) { in maybeUseFallbackBackends()
311 for (Subchannel subchannel : subchannels.values()) { in shutdown()
312 subchannelPool.returnSubchannel(subchannel); in shutdown()
352 Subchannel subchannel = newSubchannelMap.get(eag); in useRoundRobinLists() local
353 if (subchannel == null) { in useRoundRobinLists()
[all …]
/external/grpc-grpc-java/core/src/main/java/io/grpc/
DPickFirstBalancerFactory.java59 private Subchannel subchannel; field in PickFirstBalancerFactory.PickFirstBalancer
68 if (subchannel == null) { in handleResolvedAddressGroups()
69 subchannel = helper.createSubchannel(servers, Attributes.EMPTY); in handleResolvedAddressGroups()
73 helper.updateBalancingState(CONNECTING, new Picker(PickResult.withSubchannel(subchannel))); in handleResolvedAddressGroups()
74 subchannel.requestConnection(); in handleResolvedAddressGroups()
76 helper.updateSubchannelAddresses(subchannel, servers); in handleResolvedAddressGroups()
82 if (subchannel != null) { in handleNameResolutionError()
83 subchannel.shutdown(); in handleNameResolutionError()
84 subchannel = null; in handleNameResolutionError()
92 public void handleSubchannelState(Subchannel subchannel, ConnectivityStateInfo stateInfo) { in handleSubchannelState() argument
[all …]
DLoadBalancer.java147 Subchannel subchannel, ConnectivityStateInfo stateInfo); in handleSubchannelState() argument
243 @Nullable private final Subchannel subchannel; field in LoadBalancer.PickResult
253 @Nullable Subchannel subchannel, @Nullable ClientStreamTracer.Factory streamTracerFactory, in PickResult()
255 this.subchannel = subchannel; in PickResult()
329 Subchannel subchannel, @Nullable ClientStreamTracer.Factory streamTracerFactory) { in withSubchannel() argument
331 Preconditions.checkNotNull(subchannel, "subchannel"), streamTracerFactory, Status.OK, in withSubchannel()
340 public static PickResult withSubchannel(Subchannel subchannel) { in withSubchannel() argument
341 return withSubchannel(subchannel, null); in withSubchannel()
386 return subchannel; in getSubchannel()
421 .add("subchannel", subchannel) in toString()
[all …]
/external/grpc-grpc-java/core/src/main/java/io/grpc/util/
DRoundRobinLoadBalancerFactory.java171 Subchannel subchannel = checkNotNull( in handleResolvedAddressGroups() local
174 stickyRef.value = subchannel; in handleResolvedAddressGroups()
176 subchannels.put(addressGroup, subchannel); in handleResolvedAddressGroups()
177 subchannel.requestConnection(); in handleResolvedAddressGroups()
182 Subchannel subchannel = subchannels.remove(addressGroup); in handleResolvedAddressGroups() local
183 shutdownSubchannel(subchannel); in handleResolvedAddressGroups()
197 public void handleSubchannelState(Subchannel subchannel, ConnectivityStateInfo stateInfo) { in handleSubchannelState() argument
198 if (subchannels.get(subchannel.getAddresses()) != subchannel) { in handleSubchannelState()
202 stickinessState.remove(subchannel); in handleSubchannelState()
205 subchannel.requestConnection(); in handleSubchannelState()
[all …]
DForwardingLoadBalancerHelper.java50 Subchannel subchannel, EquivalentAddressGroup addrs) { in updateSubchannelAddresses() argument
51 delegate().updateSubchannelAddresses(subchannel, addrs); in updateSubchannelAddresses()
56 Subchannel subchannel, List<EquivalentAddressGroup> addrs) { in updateSubchannelAddresses() argument
57 delegate().updateSubchannelAddresses(subchannel, addrs); in updateSubchannelAddresses()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DOobChannel.java69 private InternalSubchannel subchannel; field in OobChannel
142 void setSubchannel(final InternalSubchannel subchannel) { in setSubchannel() argument
143 log.log(Level.FINE, "[{0}] Created with [{1}]", new Object[] {this, subchannel}); in setSubchannel()
144 this.subchannel = subchannel; in setSubchannel()
148 subchannel.shutdown(Status.UNAVAILABLE.withDescription("OobChannel is shutdown")); in setSubchannel()
153 return subchannel.obtainActiveTransport(); in setSubchannel()
158 return subchannel; in setSubchannel()
163 subchannel.obtainActiveTransport(); in setSubchannel()
168 return subchannel.getAddressGroups(); in setSubchannel()
189 subchannel.updateAddresses(Collections.singletonList(eag)); in updateAddresses()
[all …]
DManagedChannelImpl.java238 for (InternalSubchannel subchannel : subchannels) { in maybeShutdownNowSubchannels()
239 subchannel.shutdownNow(SHUTDOWN_NOW_STATUS); in maybeShutdownNowSubchannels()
887 for (InternalSubchannel subchannel : subchannels) { in resetConnectBackoff()
888 subchannel.resetConnectBackoff(); in resetConnectBackoff()
1020 final SubchannelImpl subchannel = new SubchannelImpl(attrs); in createSubchannel() local
1041 lb.handleSubchannelState(subchannel, newState); in createSubchannel()
1079 subchannel.subchannel = internalSubchannel; in createSubchannel()
1103 return subchannel; in createSubchannel()
1139 LoadBalancer.Subchannel subchannel, List<EquivalentAddressGroup> addrs) { in updateSubchannelAddresses() argument
1140 checkArgument(subchannel instanceof SubchannelImpl, in updateSubchannelAddresses()
[all …]
/external/rust/crates/grpcio-sys/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/
Dpick_first.cc70 RefCountedPtr<SubchannelInterface> subchannel) in PickFirstSubchannelData() argument
71 : SubchannelData(subchannel_list, address, std::move(subchannel)) {} in PickFirstSubchannelData()
113 explicit Picker(RefCountedPtr<SubchannelInterface> subchannel) in Picker() argument
114 : subchannel_(std::move(subchannel)) {} in Picker()
119 result.subchannel = subchannel_; in Pick()
214 PickFirstSubchannelData* sd = subchannel_list->subchannel(i); in AttemptToConnectUsingLatestUpdateArgsLocked()
236 subchannel_list_->subchannel(0)->StartConnectivityWatchLocked(); in AttemptToConnectUsingLatestUpdateArgsLocked()
237 subchannel_list_->subchannel(0)->subchannel()->AttemptToConnect(); in AttemptToConnectUsingLatestUpdateArgsLocked()
256 latest_pending_subchannel_list_->subchannel(0) in AttemptToConnectUsingLatestUpdateArgsLocked()
258 latest_pending_subchannel_list_->subchannel(0) in AttemptToConnectUsingLatestUpdateArgsLocked()
[all …]
/external/rust/crates/grpcio-sys/grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/
Dround_robin.cc85 RefCountedPtr<SubchannelInterface> subchannel) in RoundRobinSubchannelData() argument
86 : SubchannelData(subchannel_list, address, std::move(subchannel)) {} in RoundRobinSubchannelData()
189 RoundRobinSubchannelData* sd = subchannel_list->subchannel(i); in Picker()
191 subchannels_.push_back(sd->subchannel()->Ref()); in Picker()
218 result.subchannel = subchannels_[last_picked_index_]; in Pick()
263 subchannel(i)->CheckConnectivityStateLocked(); in StartWatchingLocked()
265 subchannel(i)->UpdateConnectivityStateLocked(state); in StartWatchingLocked()
270 if (subchannel(i)->subchannel() != nullptr) { in StartWatchingLocked()
271 subchannel(i)->StartConnectivityWatchLocked(); in StartWatchingLocked()
272 subchannel(i)->subchannel()->AttemptToConnect(); in StartWatchingLocked()
[all …]
/external/grpc-grpc-java/core/src/test/java/io/grpc/
DLoadBalancerTest.java36 private final Subchannel subchannel = mock(Subchannel.class); field in LoadBalancerTest
49 PickResult result = PickResult.withSubchannel(subchannel); in pickResult_withSubchannel()
50 assertThat(result.getSubchannel()).isSameAs(subchannel); in pickResult_withSubchannel()
58 PickResult result = PickResult.withSubchannel(subchannel, tracerFactory); in pickResult_withSubchannelAndTracer()
59 assertThat(result.getSubchannel()).isSameAs(subchannel); in pickResult_withSubchannelAndTracer()
94 PickResult sc1 = PickResult.withSubchannel(subchannel); in pickResult_equals()
95 PickResult sc2 = PickResult.withSubchannel(subchannel); in pickResult_equals()
96 PickResult sc3 = PickResult.withSubchannel(subchannel, tracerFactory); in pickResult_equals()
134 return subchannel; in helper_createSubchannel_delegates()
139 assertThat(helper.createSubchannel(eag, attrs)).isSameAs(subchannel); in helper_createSubchannel_delegates()
[all …]
/external/grpc-grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/
Dround_robin.cc96 const grpc_lb_address& address, grpc_subchannel* subchannel, in RoundRobinSubchannelData() argument
98 : SubchannelData(subchannel_list, user_data_vtable, address, subchannel, in RoundRobinSubchannelData()
353 subchannel_list_->subchannel(next_ready_index); in DoPickLocked()
363 this, sd->subchannel(), pick->connected_subchannel.get(), in DoPickLocked()
445 subchannel(i)->CheckConnectivityStateLocked(&error); in StartWatchingLocked()
447 subchannel(i)->UpdateConnectivityStateLocked(state, error); in StartWatchingLocked()
454 if (subchannel(i)->subchannel() != nullptr) { in StartWatchingLocked()
455 subchannel(i)->StartConnectivityWatchLocked(); in StartWatchingLocked()
564 p, subchannel(), subchannel_list(), Index(), in UpdateConnectivityStateLocked()
577 GPR_ASSERT(subchannel() != nullptr); in ProcessConnectivityChangeLocked()
[all …]
/external/grpc-grpc-java/core/src/test/java/io/grpc/util/
DRoundRobinLoadBalancerTest.java128 Subchannel subchannel = subchannels.get(args[0]); in setUp()
129 when(subchannel.getAttributes()).thenReturn((Attributes) args[1]); in setUp()
130 return subchannel; in setUp()
153 for (Subchannel subchannel : subchannels.values()) { in pickAfterResolved()
154 verify(subchannel).requestConnection(); in pickAfterResolved()
155 verify(subchannel, never()).shutdown(); in pickAfterResolved()
174 for (Subchannel subchannel : Lists.newArrayList(removedSubchannel, oldSubchannel, in pickAfterResolvedUpdatedHosts()
176 when(subchannel.getAttributes()).thenReturn(Attributes.newBuilder().set(STATE_INFO, in pickAfterResolvedUpdatedHosts()
257 Subchannel subchannel = loadBalancer.getSubchannels().iterator().next(); in pickAfterStateChange() local
258 Ref<ConnectivityStateInfo> subchannelStateInfo = subchannel.getAttributes().get( in pickAfterStateChange()
[all …]
/external/grpc-grpc/src/core/ext/filters/client_channel/
Dsubchannel.cc65 grpc_subchannel* subchannel; member
71 grpc_subchannel* subchannel; member
157 static void on_subchannel_connected(void* subchannel, grpc_error* error);
410 grpc_subchannel* subchannel) { in grpc_subchannel_get_channelz_node() argument
411 return subchannel->channelz_subchannel.get(); in grpc_subchannel_get_channelz_node()
441 grpc_pollset_set_del_pollset_set(w->subchannel->pollset_set, in on_external_state_watcher_done()
444 gpr_mu_lock(&w->subchannel->mu); in on_external_state_watcher_done()
447 gpr_mu_unlock(&w->subchannel->mu); in on_external_state_watcher_done()
448 GRPC_SUBCHANNEL_WEAK_UNREF(w->subchannel, "external_state_watcher"); in on_external_state_watcher_done()
532 w->subchannel = c; in grpc_subchannel_notify_on_state_change()
[all …]
/external/grpc-grpc/src/core/ext/filters/client_channel/lb_policy/
Dsubchannel_list.h86 subchannel_list_->subchannel(0)); in Index()
90 grpc_subchannel* subchannel() const { return subchannel_; } in subchannel() function
106 grpc_subchannel_check_connectivity(subchannel(), error); in CheckConnectivityStateLocked()
145 const grpc_lb_address& address, grpc_subchannel* subchannel,
198 SubchannelDataType* subchannel(size_t index) { return &subchannels_[index]; } in subchannel() function
206 if (subchannels_[i].subchannel() != nullptr) { in PopulateChildRefsList()
208 grpc_subchannel_get_channelz_node(subchannels_[i].subchannel()); in PopulateChildRefsList()
280 const grpc_lb_address& address, grpc_subchannel* subchannel, in SubchannelData() argument
283 subchannel_(subchannel), in SubchannelData()
516 grpc_subchannel* subchannel = grpc_client_channel_factory_create_subchannel( in SubchannelList() local
[all …]
/external/rust/crates/grpcio-sys/grpc/src/core/ext/filters/client_channel/lb_policy/
Dsubchannel_list.h88 subchannel_list_->subchannel(0)); in Index()
92 SubchannelInterface* subchannel() const { return subchannel_.get(); } in subchannel() function
124 RefCountedPtr<SubchannelInterface> subchannel);
184 SubchannelDataType* subchannel(size_t index) { return &subchannels_[index]; } in subchannel() function
270 RefCountedPtr<SubchannelInterface> subchannel) in SubchannelData() argument
272 subchannel_(std::move(subchannel)), in SubchannelData()
370 RefCountedPtr<SubchannelInterface> subchannel = in SubchannelList() local
372 if (subchannel == nullptr) { in SubchannelList()
387 subchannel.get(), address.ToString().c_str()); in SubchannelList()
389 subchannels_.emplace_back(this, std::move(address), std::move(subchannel)); in SubchannelList()
/external/grpc-grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/
Dpick_first.cc78 const grpc_lb_address& address, grpc_subchannel* subchannel, in PickFirstSubchannelData() argument
80 : SubchannelData(subchannel_list, user_data_vtable, address, subchannel, in PickFirstSubchannelData()
254 subchannel_list_->subchannel(0) in StartPickingLocked()
382 subchannel_list_->subchannel(0) in UpdateLocked()
389 PickFirstSubchannelData* sd = subchannel_list->subchannel(i); in UpdateLocked()
390 if (sd->subchannel() == selected_->subchannel()) { in UpdateLocked()
396 this, selected_->subchannel(), i, in UpdateLocked()
435 latest_pending_subchannel_list_->subchannel(0) in UpdateLocked()
524 sd = subchannel_list()->subchannel(next_index); in ProcessConnectivityChangeLocked()
583 gpr_log(GPR_INFO, "Pick First %p selected subchannel %p", p, subchannel()); in ProcessUnselectedReadyLocked()
[all …]
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/
DManagedChannelImplTest.java344 AbstractSubchannel subchannel = in channelzMembership_subchannel() local
347 assertNull(channelz.getRootChannel(subchannel.getInternalSubchannel().getLogId().getId())); in channelzMembership_subchannel()
348 assertTrue(channelz.containsSubchannel(subchannel.getInternalSubchannel().getLogId())); in channelzMembership_subchannel()
350 .containsExactly(subchannel.getInternalSubchannel()); in channelzMembership_subchannel()
352 subchannel.requestConnection(); in channelzMembership_subchannel()
362 assertTrue(channelz.containsSubchannel(subchannel.getInternalSubchannel().getLogId())); in channelzMembership_subchannel()
363 subchannel.shutdown(); in channelzMembership_subchannel()
366 assertFalse(channelz.containsSubchannel(subchannel.getInternalSubchannel().getLogId())); in channelzMembership_subchannel()
383 AbstractSubchannel subchannel = (AbstractSubchannel) oob.getSubchannel(); in channelzMembership_oob() local
384 assertTrue(channelz.containsSubchannel(subchannel.getInternalSubchannel().getLogId())); in channelzMembership_oob()
[all …]
DManagedChannelImplIdlenessTest.java265 Subchannel subchannel = helper.createSubchannel(addressGroup, Attributes.EMPTY); in realTransportsHoldsOffIdleness() local
266 subchannel.requestConnection(); in realTransportsHoldsOffIdleness()
272 .thenReturn(PickResult.withSubchannel(subchannel)); in realTransportsHoldsOffIdleness()
304 Subchannel subchannel = helper.createSubchannel(servers.get(0), Attributes.EMPTY); in updateSubchannelAddresses_newAddressConnects() local
306 subchannel.requestConnection(); in updateSubchannelAddresses_newAddressConnects()
310 helper.updateSubchannelAddresses(subchannel, servers.get(1)); in updateSubchannelAddresses_newAddressConnects()
312 subchannel.requestConnection(); in updateSubchannelAddresses_newAddressConnects()
324 Subchannel subchannel = helper.createSubchannel(servers.get(0), Attributes.EMPTY); in updateSubchannelAddresses_existingAddressDoesNotConnect() local
326 subchannel.requestConnection(); in updateSubchannelAddresses_existingAddressDoesNotConnect()
332 helper.updateSubchannelAddresses(subchannel, new EquivalentAddressGroup(changedList)); in updateSubchannelAddresses_existingAddressDoesNotConnect()
[all …]
/external/grpc-grpc-java/services/src/test/java/io/grpc/services/
DChannelzProtoUtilTest.java117 private final TestChannel subchannel = new TestChannel(); field in ChannelzProtoUtilTest
120 .setName(subchannel.toString())
121 .setSubchannelId(subchannel.getLogId().getId())
331 assertEquals(subchannelRef, ChannelzProtoUtil.toSubchannelRef(subchannel)); in toSubchannelRef()
576 .setSubchannels(ImmutableList.<InternalWithLogId>of(subchannel)) in toChannel()
588 .setSubchannels(ImmutableList.<InternalWithLogId>of(subchannel, otherSubchannel)) in toChannel()
608 ChannelzProtoUtil.toSubchannel(subchannel)); in toSubchannel_noChildren()
613 subchannel.stats = toBuilder(subchannel.stats) in toSubchannel_socketChildren()
621 ChannelzProtoUtil.toSubchannel(subchannel)); in toSubchannel_socketChildren()
624 subchannel.stats = toBuilder(subchannel.stats) in toSubchannel_socketChildren()
[all …]
DChannelzServiceTest.java94 TestChannel subchannel = new TestChannel(); in getSubchannel() local
95 assertSubchannelNotFound(subchannel.getLogId().getId()); in getSubchannel()
97 channelz.addSubchannel(subchannel); in getSubchannel()
101 .setSubchannel(ChannelzProtoUtil.toSubchannel(subchannel)) in getSubchannel()
103 getSubchannelHelper(subchannel.getLogId().getId())); in getSubchannel()
105 channelz.removeSubchannel(subchannel); in getSubchannel()
106 assertSubchannelNotFound(subchannel.getLogId().getId()); in getSubchannel()
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/xds_k8s_test_driver/framework/test_app/
Dclient_app.py112 subchannel, *subchannels = list(
118 self.channelz.list_subchannels_sockets(subchannel))
158 subchannel = self.find_subchannel_with_state(
161 subchannel)
175 for subchannel in self.channelz.list_channel_subchannels(channel):
176 if subchannel.data.state.state is state:
177 return subchannel
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/xds_k8s_test_driver/framework/rpc/
Dgrpc_channelz.py170 for subchannel in self.list_channel_subchannels(channel):
171 yield from self.list_subchannels_sockets(subchannel)
180 subchannel: Subchannel) -> Iterator[Socket]:
182 for socket_ref in subchannel.socket_ref:
190 return response.subchannel
/external/grpc-grpc-java/grpclb/src/test/java/io/grpc/grpclb/
DCachedSubchannelPoolTest.java80 Subchannel subchannel = mock(Subchannel.class); in setUp()
83 when(subchannel.getAddresses()).thenReturn(eag); in setUp()
84 when(subchannel.getAttributes()).thenReturn(attrs); in setUp()
85 mockSubchannels.add(subchannel); in setUp()
86 return subchannel; in setUp()
103 for (Subchannel subchannel : mockSubchannels) { in wrapUp()
104 verify(subchannel, atMost(1)).shutdown(); in wrapUp()
/external/rust/crates/grpcio-sys/grpc/tools/run_tests/xds_k8s_test_driver/bin/
Drun_channelz.py101 subchannel, *subchannels = list(
110 logger.debug('Found subchannel, %s', subchannel)
114 subchannel_state: _ChannelState = subchannel.data.state.state
121 sockets = list(test_client.channelz.list_subchannels_sockets(subchannel))

1234