类 ConfigQueryRequestHandler
- java.lang.Object
-
- com.alibaba.nacos.core.remote.RequestHandler<com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest,com.alibaba.nacos.api.config.remote.response.ConfigQueryResponse>
-
- com.alibaba.nacos.config.server.remote.ConfigQueryRequestHandler
-
@Component public class ConfigQueryRequestHandler extends com.alibaba.nacos.core.remote.RequestHandler<com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest,com.alibaba.nacos.api.config.remote.response.ConfigQueryResponse>ConfigQueryRequestHandler.- 版本:
- $Id: ConfigQueryRequestHandler.java, v 0.1 2020年07月14日 9:54 AM liuzunfei Exp $
- 作者:
- liuzunfei
-
-
字段概要
字段 修饰符和类型 字段 说明 private PersistServicepersistServiceprivate static intTRY_GET_LOCK_TIMES
-
构造器概要
构造器 构造器 说明 ConfigQueryRequestHandler(PersistService persistService)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 private static booleanfileNotExist(java.io.File file)private com.alibaba.nacos.api.config.remote.response.ConfigQueryResponsegetContext(com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest configQueryRequest, com.alibaba.nacos.api.remote.request.RequestMeta meta, boolean notify)com.alibaba.nacos.api.config.remote.response.ConfigQueryResponsehandle(com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest request, com.alibaba.nacos.api.remote.request.RequestMeta meta)private static booleanisUseTag(CacheItem cacheItem, java.lang.String tag)static java.lang.StringreadFileContent(java.io.File file)read content.private static voidreleaseConfigReadLock(java.lang.String groupKey)private static inttryConfigReadLock(java.lang.String groupKey)
-
-
-
字段详细资料
-
TRY_GET_LOCK_TIMES
private static final int TRY_GET_LOCK_TIMES
- 另请参阅:
- 常量字段值
-
persistService
private final PersistService persistService
-
-
构造器详细资料
-
ConfigQueryRequestHandler
public ConfigQueryRequestHandler(PersistService persistService)
-
-
方法详细资料
-
handle
public com.alibaba.nacos.api.config.remote.response.ConfigQueryResponse handle(com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest request, com.alibaba.nacos.api.remote.request.RequestMeta meta) throws com.alibaba.nacos.api.exception.NacosException- 指定者:
handle在类中com.alibaba.nacos.core.remote.RequestHandler<com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest,com.alibaba.nacos.api.config.remote.response.ConfigQueryResponse>- 抛出:
com.alibaba.nacos.api.exception.NacosException
-
getContext
private com.alibaba.nacos.api.config.remote.response.ConfigQueryResponse getContext(com.alibaba.nacos.api.config.remote.request.ConfigQueryRequest configQueryRequest, com.alibaba.nacos.api.remote.request.RequestMeta meta, boolean notify) throws java.io.UnsupportedEncodingException- 抛出:
java.io.UnsupportedEncodingException
-
readFileContent
public static java.lang.String readFileContent(java.io.File file) throws java.io.IOExceptionread content.- 参数:
file- file to read.- 返回:
- content.
- 抛出:
java.io.IOException
-
releaseConfigReadLock
private static void releaseConfigReadLock(java.lang.String groupKey)
-
fileNotExist
private static boolean fileNotExist(java.io.File file)
-
tryConfigReadLock
private static int tryConfigReadLock(java.lang.String groupKey)
-
isUseTag
private static boolean isUseTag(CacheItem cacheItem, java.lang.String tag)
-
-