类 AbstractProtocol<T,S extends DeltaResource<T>>
- java.lang.Object
-
- org.apache.dubbo.registry.xds.util.protocol.AbstractProtocol<T,S>
-
- 所有已实现的接口:
XdsProtocol<T>
- 直接已知子类:
EdsProtocol,LdsProtocol,RdsProtocol
public abstract class AbstractProtocol<T,S extends DeltaResource<T>> extends Object implements XdsProtocol<T>
-
-
构造器概要
构造器 构造器 说明 AbstractProtocol(XdsChannel xdsChannel, io.envoyproxy.envoy.config.core.v3.Node node, int pollingPoolSize, int pollingTimeout)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 TgetResource(Set<String> resourceNames)Gets allresourceby the specified resource name.abstract StringgetTypeUrl()Abstract method to obtain Type-URL from sub-classlongobserveResource(Set<String> resourceNames, Consumer<T> consumer)Add a observer resource withConsumervoidupdateObserve(long request, Set<String> resourceNames)Update observed resource list inXdsProtocol.observeResource(Set, Consumer)
-
-
-
构造器详细资料
-
AbstractProtocol
public AbstractProtocol(XdsChannel xdsChannel, io.envoyproxy.envoy.config.core.v3.Node node, int pollingPoolSize, int pollingTimeout)
-
-
方法详细资料
-
getTypeUrl
public abstract String getTypeUrl()
Abstract method to obtain Type-URL from sub-class- 返回:
- Type-URL of xDS
-
getResource
public T getResource(Set<String> resourceNames)
从接口复制的说明:XdsProtocolGets allresourceby the specified resource name. For LDS, the {@param resourceNames} is ignored- 指定者:
getResource在接口中XdsProtocol<T>- 参数:
resourceNames- specified resource name- 返回:
- resources, null if request failed
-
observeResource
public long observeResource(Set<String> resourceNames, Consumer<T> consumer)
从接口复制的说明:XdsProtocolAdd a observer resource withConsumer- 指定者:
observeResource在接口中XdsProtocol<T>- 参数:
resourceNames- specified resource nameconsumer- resource notifier, will be called when resource updated- 返回:
- requestId, used when resourceNames update with
XdsProtocol.updateObserve(long, Set)
-
updateObserve
public void updateObserve(long request, Set<String> resourceNames)从接口复制的说明:XdsProtocolUpdate observed resource list inXdsProtocol.observeResource(Set, Consumer)- 指定者:
updateObserve在接口中XdsProtocol<T>- 参数:
request- requestId returned byXdsProtocol.observeResource(Set, Consumer)resourceNames- new resource name list to observe
-
-