public class ServiceRegistryImpl extends Object implements ServiceRegistry
BEAN_NAME
Constructor and Description |
---|
ServiceRegistryImpl() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
清空所有服务
|
ServiceRegistryItem |
getServiceRegistryItem(Service service)
返回指定服务的服务注册信息
|
ServiceRegistryItem |
getServiceRegistryItem(String serviceId)
查找指定服务对应的注册项
|
Collection<ServiceRegistryItem> |
getServiceRegistryItems()
获取所有服务注册项
|
boolean |
isChange()
距离上次调用getServiceRegistryItems后,服务列表是否发生变化
|
void |
registerService(List<ServiceRegistryItem> serviceRegistryItems)
注册一批服务,重复注册时旧的被替换
|
void |
registerService(ServiceRegistryItem serviceRegistryItem)
注册服务,重复注册时旧的被替换
|
void |
registerService(ServiceRegistryItem[] serviceRegistryItems)
注册一批服务,重复注册时旧的被替换
|
void |
registerService(Set<ServiceRegistryItem> serviceRegistryItems)
注册一批服务,重复注册时旧的被替换
|
void |
removeService(String serviceId)
删除服务
|
void |
setChange(boolean change) |
int |
size()
返回注册服务个数
|
public void registerService(ServiceRegistryItem serviceRegistryItem)
ServiceRegistry
registerService
in interface ServiceRegistry
public void registerService(List<ServiceRegistryItem> serviceRegistryItems)
ServiceRegistry
registerService
in interface ServiceRegistry
public void registerService(ServiceRegistryItem[] serviceRegistryItems)
ServiceRegistry
registerService
in interface ServiceRegistry
public void registerService(Set<ServiceRegistryItem> serviceRegistryItems)
ServiceRegistry
registerService
in interface ServiceRegistry
public void removeService(String serviceId)
ServiceRegistry
removeService
in interface ServiceRegistry
public int size()
ServiceRegistry
size
in interface ServiceRegistry
public void clear()
ServiceRegistry
clear
in interface ServiceRegistry
public ServiceRegistryItem getServiceRegistryItem(Service service)
ServiceRegistry
getServiceRegistryItem
in interface ServiceRegistry
public ServiceRegistryItem getServiceRegistryItem(String serviceId)
ServiceRegistry
getServiceRegistryItem
in interface ServiceRegistry
public Collection<ServiceRegistryItem> getServiceRegistryItems()
ServiceRegistry
getServiceRegistryItems
in interface ServiceRegistry
public boolean isChange()
ServiceRegistry
isChange
in interface ServiceRegistry
public void setChange(boolean change)
setChange
in interface ServiceRegistry
Copyright © 2006–2018 TinyGroup. All rights reserved.