Class HostReactor
- java.lang.Object
-
- com.alibaba.nacos.client.naming.core.HostReactor
-
public class HostReactor extends Object
- Author:
- xuanyin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHostReactor.UpdateTask
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_DELAYlongupdateHoldInterval
-
Constructor Summary
Constructors Constructor Description HostReactor(EventDispatcher eventDispatcher, NamingProxy serverProxy, String cacheDir)HostReactor(EventDispatcher eventDispatcher, NamingProxy serverProxy, String cacheDir, boolean loadCacheAtStart, int pollingThreadCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduledFuture<?>addTask(HostReactor.UpdateTask task)com.alibaba.nacos.api.naming.pojo.ServiceInfogetServiceInfo(String serviceName, String clusters)com.alibaba.nacos.api.naming.pojo.ServiceInfogetServiceInfoDirectlyFromServer(String serviceName, String clusters)Map<String,com.alibaba.nacos.api.naming.pojo.ServiceInfo>getServiceInfoMap()com.alibaba.nacos.api.naming.pojo.ServiceInfoprocessServiceJSON(String json)voidrefreshOnly(String serviceName, String clusters)voidscheduleUpdateIfAbsent(String serviceName, String clusters)voidupdateServiceNow(String serviceName, String clusters)
-
-
-
Field Detail
-
DEFAULT_DELAY
public static final long DEFAULT_DELAY
- See Also:
- Constant Field Values
-
updateHoldInterval
public long updateHoldInterval
-
-
Constructor Detail
-
HostReactor
public HostReactor(EventDispatcher eventDispatcher, NamingProxy serverProxy, String cacheDir)
-
HostReactor
public HostReactor(EventDispatcher eventDispatcher, NamingProxy serverProxy, String cacheDir, boolean loadCacheAtStart, int pollingThreadCount)
-
-
Method Detail
-
getServiceInfoMap
public Map<String,com.alibaba.nacos.api.naming.pojo.ServiceInfo> getServiceInfoMap()
-
addTask
public ScheduledFuture<?> addTask(HostReactor.UpdateTask task)
-
processServiceJSON
public com.alibaba.nacos.api.naming.pojo.ServiceInfo processServiceJSON(String json)
-
getServiceInfoDirectlyFromServer
public com.alibaba.nacos.api.naming.pojo.ServiceInfo getServiceInfoDirectlyFromServer(String serviceName, String clusters) throws com.alibaba.nacos.api.exception.NacosException
- Throws:
com.alibaba.nacos.api.exception.NacosException
-
getServiceInfo
public com.alibaba.nacos.api.naming.pojo.ServiceInfo getServiceInfo(String serviceName, String clusters)
-
-