| 程序包 | 说明 |
|---|---|
| com.alipay.sofa.rpc.registry | |
| com.alipay.sofa.rpc.registry.local | |
| com.alipay.sofa.rpc.registry.zk |
| 限定符和类型 | 方法和说明 |
|---|---|
static Registry |
RegistryFactory.getRegistry(RegistryConfig registryConfig)
得到注册中心对象
|
| 限定符和类型 | 方法和说明 |
|---|---|
static List<Registry> |
RegistryFactory.getRegistries()
得到全部注册中心
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
LocalRegistry
Local registry
|
| 限定符和类型 | 类和说明 |
|---|---|
class |
ZookeeperRegistry
简单的Zookeeper注册中心,具有如下特性:
1.可以设置优先读取远程,还是优先读取本地备份文件 2.如果zk不可用,自动读取本地备份文件 3.可以设置使用临时节点还是永久节点 4.断线了会自动重连,并且自动recover数据 在zookeeper上存放的数据结构为: -$rootPath (根路径) └--sofa-rpc |--com.alipay.sofa.rpc.example.HelloService (服务) | |-providers (服务提供者列表) | | |--bolt://192.168.1.100:22000? |
Copyright © 2008–2018 The Ant Financial. All rights reserved.