public abstract class AbstractEndpointsCache<ENDPOINT> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<ENDPOINT> |
endpoints |
protected InstanceCache |
instanceCache |
protected static InstanceCacheManager |
instanceCacheManager |
protected static TransportManager |
transportManager |
protected String |
transportName |
| Constructor and Description |
|---|
AbstractEndpointsCache(String appId,
String microserviceName,
String microserviceVersionRule,
String transportName)
transportName 可能为"",表示走任意健康的地址即可
|
| Modifier and Type | Method and Description |
|---|---|
protected List<ENDPOINT> |
createEndpints(InstanceCache newCache) |
protected abstract ENDPOINT |
createEndpoint(Transport transport,
CacheEndpoint cacheEndpoint) |
protected List<ENDPOINT> |
createEndpoints(Map<String,List<CacheEndpoint>> transportMap) |
List<ENDPOINT> |
getLatestEndpoints() |
static void |
init(InstanceCacheManager instanceCacheManager,
TransportManager transportManager) |
protected static InstanceCacheManager instanceCacheManager
protected static TransportManager transportManager
protected String transportName
protected InstanceCache instanceCache
public static void init(InstanceCacheManager instanceCacheManager, TransportManager transportManager)
protected List<ENDPOINT> createEndpints(InstanceCache newCache)
protected List<ENDPOINT> createEndpoints(Map<String,List<CacheEndpoint>> transportMap)
protected abstract ENDPOINT createEndpoint(Transport transport, CacheEndpoint cacheEndpoint)
Copyright © 2017. All rights reserved.