类 PersistentConsistencyServiceDelegateImpl
- java.lang.Object
-
- com.alibaba.nacos.naming.consistency.persistent.PersistentConsistencyServiceDelegateImpl
-
- 所有已实现的接口:
ConsistencyService,PersistentConsistencyService
@DependsOn("ProtocolManager") @Component("persistentConsistencyServiceDelegate") public class PersistentConsistencyServiceDelegateImpl extends java.lang.Object implements PersistentConsistencyServicePersistent consistency service delegate.- 作者:
- xiweng.yy
-
-
字段概要
字段 修饰符和类型 字段 说明 private BasePersistentServiceProcessorpersistentServiceProcessor
-
构造器概要
构造器 构造器 说明 PersistentConsistencyServiceDelegateImpl(com.alibaba.nacos.core.distributed.ProtocolManager protocolManager)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 private BasePersistentServiceProcessorcreatePersistentServiceProcessor(com.alibaba.nacos.core.distributed.ProtocolManager protocolManager)Datumget(java.lang.String key)Get a data from Nacos cluster.java.util.Optional<java.lang.String>getErrorMsg()Get the error message of the consistency protocol.booleanisAvailable()Tell the status of this consistency service.voidlisten(java.lang.String key, RecordListener listener)Listen for changes of a data.voidput(java.lang.String key, Record value)Put a data related to a key to Nacos cluster.voidremove(java.lang.String key)Remove a data from Nacos cluster.voidunListen(java.lang.String key, RecordListener listener)Cancel listening of a data.
-
-
-
字段详细资料
-
persistentServiceProcessor
private final BasePersistentServiceProcessor persistentServiceProcessor
-
-
方法详细资料
-
put
public void put(java.lang.String key, Record value) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:ConsistencyServicePut a data related to a key to Nacos cluster.- 指定者:
put在接口中ConsistencyService- 参数:
key- key of data, this key should be globally uniquevalue- value of data- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception
-
remove
public void remove(java.lang.String key) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:ConsistencyServiceRemove a data from Nacos cluster.- 指定者:
remove在接口中ConsistencyService- 参数:
key- key of data- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception
-
get
public Datum get(java.lang.String key) throws com.alibaba.nacos.api.exception.NacosException
从接口复制的说明:ConsistencyServiceGet a data from Nacos cluster.- 指定者:
get在接口中ConsistencyService- 参数:
key- key of data- 返回:
- data related to the key
- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception
-
listen
public void listen(java.lang.String key, RecordListener listener) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:ConsistencyServiceListen for changes of a data.- 指定者:
listen在接口中ConsistencyService- 参数:
key- key of datalistener- callback of data change- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception
-
unListen
public void unListen(java.lang.String key, RecordListener listener) throws com.alibaba.nacos.api.exception.NacosException从接口复制的说明:ConsistencyServiceCancel listening of a data.- 指定者:
unListen在接口中ConsistencyService- 参数:
key- key of datalistener- callback of data change- 抛出:
com.alibaba.nacos.api.exception.NacosException- nacos exception
-
isAvailable
public boolean isAvailable()
从接口复制的说明:ConsistencyServiceTell the status of this consistency service.- 指定者:
isAvailable在接口中ConsistencyService- 返回:
- true if available
-
getErrorMsg
public java.util.Optional<java.lang.String> getErrorMsg()
从接口复制的说明:ConsistencyServiceGet the error message of the consistency protocol.- 指定者:
getErrorMsg在接口中ConsistencyService- 返回:
- the consistency protocol error message.
-
createPersistentServiceProcessor
private BasePersistentServiceProcessor createPersistentServiceProcessor(com.alibaba.nacos.core.distributed.ProtocolManager protocolManager) throws java.lang.Exception
- 抛出:
java.lang.Exception
-
-