public interface StateRouter extends Comparable<StateRouter>
Cluster.join(Directory),
Directory.list(Invocation)| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DEFAULT_PRIORITY |
| 限定符和类型 | 方法和说明 |
|---|---|
default int |
compareTo(StateRouter o) |
String |
getName() |
int |
getPriority() |
org.apache.dubbo.common.URL |
getUrl()
Get the router url.
|
boolean |
isEnable() |
boolean |
isForce() |
boolean |
isRuntime()
To decide whether this router need to execute every time an RPC comes or should only execute when addresses or
rule change.
|
default <T> void |
notify(List<Invoker<T>> invokers) |
void |
pool() |
<T> RouterCache<T> |
pool(List<Invoker<T>> invokers) |
<T> BitList<Invoker<T>> |
route(BitList<Invoker<T>> invokers,
RouterCache<T> cache,
org.apache.dubbo.common.URL url,
Invocation invocation)
Filter invokers with current routing rule and only return the invokers that comply with the rule.
|
boolean |
shouldRePool() |
default void |
stop() |
static final int DEFAULT_PRIORITY
org.apache.dubbo.common.URL getUrl()
<T> BitList<Invoker<T>> route(BitList<Invoker<T>> invokers, RouterCache<T> cache, org.apache.dubbo.common.URL url, Invocation invocation) throws RpcException
T - invokers - invoker bit listcache - router address cacheurl - refer urlinvocation - invocationRpcExceptionboolean isRuntime()
boolean isEnable()
boolean isForce()
int getPriority()
default int compareTo(StateRouter o)
compareTo 在接口中 Comparable<StateRouter>String getName()
boolean shouldRePool()
<T> RouterCache<T> pool(List<Invoker<T>> invokers)
void pool()
default void stop()
Copyright © 2011–2021 The Apache Software Foundation. All rights reserved.