name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
dubbo_ApplicationModel_getProviderModel_rdh
/** * * @deprecated use {@link FrameworkServiceRepository#lookupExportedService(String)} */ @Deprecated public static ProviderModel getProviderModel(String serviceKey) { return defaultModel().getDefaultModule().getServiceRepository().lookupExportedService(serviceKey); }
3.26
dubbo_ApplicationModel_getApplication_rdh
/** * * @deprecated Replace to {@link ApplicationModel#getApplicationName()} */ @Deprecated public static String getApplication() { return getName(); }
3.26
dubbo_ApplicationModel_getServiceRepository_rdh
/** * * @deprecated Replace to {@link ApplicationModel#getApplicationServiceRepository()} */ @Deprecated public static ServiceRepository getServiceRepository() { return defaultModel().getApplicationServiceRepository(); }
3.26
dubbo_AbstractHttpServer_canHandleIdle_rdh
/** * Following methods are extended from RemotingServer, useless for http servers */ @Override public boolean canHandleIdle() { return false; }
3.26
dubbo_ConfigurationUtils_getCachedDynamicProperty_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getCachedDynamicProperty(ScopeModel, String, String)} */@Deprecated public static String getCachedDynamicProperty(String key, String defaultValue) { return getCachedDynamicProperty(ApplicationModel.defaultModel(), key, defaultVa...
3.26
dubbo_ConfigurationUtils_getDynamicConfigurationFactory_rdh
/** * Get an instance of {@link DynamicConfigurationFactory} by the specified name. If not found, take the default * extension of {@link DynamicConfigurationFactory} * * @param name * the name of extension of {@link DynamicConfigurationFactory} * @return non-null * @see 2.7.4 */ public static DynamicConfigura...
3.26
dubbo_ConfigurationUtils_getDynamicGlobalConfiguration_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getDynamicGlobalConfiguration(ScopeModel)} */ @Deprecated public static Configuration getDynamicGlobalConfiguration() { return ApplicationModel.defaultModel().getDefaultModule().modelEnvironment().getDynamicGlobalConfiguration(...
3.26
dubbo_ConfigurationUtils_getSystemConfiguration_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getSystemConfiguration(ScopeModel)} */ @Deprecated public static Configuration getSystemConfiguration() { return ApplicationModel.defaultModel().modelEnvironment().getSystemConfiguration(); }
3.26
dubbo_ConfigurationUtils_get_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#get(ScopeModel, String, int)} */ @Deprecated public static int get(String property, int defaultValue) { return get(ApplicationModel.defaultModel(), property, defaultValue);}
3.26
dubbo_ConfigurationUtils_getSubProperties_rdh
/** * Search props and extract sub properties. * <pre> * # properties * dubbo.protocol.name=dubbo * dubbo.protocol.port=1234 * * # extract protocol props * Map props = getSubProperties("dubbo.protocol."); * * # result * props: {"name": "dubbo", "port" : "1234"} * * </pre> * * @param configMaps * @param ...
3.26
dubbo_ConfigurationUtils_getServerShutdownTimeout_rdh
// FIXME /** * Server shutdown wait timeout mills * * @return */ @SuppressWarnings("deprecation") public static int getServerShutdownTimeout(ScopeModel scopeModel) { if (expectedShutdownTime < System.currentTimeMillis()) { return 1; ...
3.26
dubbo_ConfigurationUtils_getDynamicProperty_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getDynamicProperty(ScopeModel, String, String)} */ @Deprecated public static String getDynamicProperty(String property, String defaultValue) { return getDynamicProperty(ApplicationModel.defaultModel(), property, defaultValue); }
3.26
dubbo_ConfigurationUtils_getEnvConfiguration_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getEnvConfiguration(ScopeModel)} */ @Deprecated public static Configuration getEnvConfiguration() { return ApplicationModel.defaultModel().modelEnvironment().getEnvironmentConfiguration(); }
3.26
dubbo_ConfigurationUtils_getProperty_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getProperty(ScopeModel, String, String)} */ @Deprecated public static String getProperty(String property, String defaultValue) { return getProperty(ApplicationModel.defaultModel(), property, defaultValue); }
3.26
dubbo_ConfigurationUtils_getGlobalConfiguration_rdh
/** * For compact single instance * * @deprecated Replaced to {@link ConfigurationUtils#getGlobalConfiguration(ScopeModel)} */ @Deprecated public static Configuration getGlobalConfiguration() { return ApplicationModel.defaultModel().modelEnvironment().getConfiguration(); }
3.26
dubbo_ConfigurationUtils_getSubIds_rdh
/** * Search props and extract config ids * <pre> * # properties * dubbo.registries.registry1.address=xxx * dubbo.registries.registry2.port=xxx * * # extract ids * Set configIds = getSubIds("dubbo.registries.") * * # result * configIds: ["registry1", "registry2"] * </pre> * * @param configMaps * @param p...
3.26
dubbo_KubernetesServiceDiscovery_setCurrentHostname_rdh
/** * UT used only */ @Deprecated public void setCurrentHostname(String currentHostname) { this.currentHostname = currentHostname; }
3.26
dubbo_KubernetesServiceDiscovery_doUpdate_rdh
/** * Comparing to {@link AbstractServiceDiscovery#doUpdate(ServiceInstance, ServiceInstance)}, unregister() is unnecessary here. */ @Override public void doUpdate(ServiceInstance oldServiceInstance, ServiceInstance newServiceInstance) throws RuntimeException { reportMetadata(newServiceInstance.getServiceMetadata...
3.26
dubbo_NamedThreadFactory_getThreadNum_rdh
// for test public AtomicInteger getThreadNum() { return mThreadNum; }
3.26
dubbo_Page_hasData_rdh
/** * Returns whether the page has data at all. * * @return */ default boolean hasData() { return getDataSize() > 0; }
3.26
dubbo_FileCacheStore_getCacheFilePath_rdh
/** * for unit test only */ @Deprecated protected String getCacheFilePath() { return cacheFilePath; }
3.26
dubbo_NettyHttpRestServer_getChildChannelOptionMap_rdh
/** * create child channel options map * * @param url * @return */ protected Map<ChannelOption, Object> getChildChannelOptionMap(URL url) { Map<ChannelOption, Object> channelOption = new HashMap<>(); channelOption.put(ChannelOption.SO_KEEPALIVE, url.getParameter(Constants.KEEP_ALIVE_KEY, Constants.DEFAULT...
3.26
dubbo_NettyHttpRestServer_getNettyServer_rdh
/** * for triple override * * @return */ protected NettyServer getNettyServer() { return new NettyServer(); }
3.26
dubbo_NettyHttpRestServer_getChannelOptionMap_rdh
/** * create channel options map * * @param url * @return */ protected Map<ChannelOption, Object> getChannelOptionMap(URL url) { Map<ChannelOption, Object> options = new HashMap<>(); options.put(ChannelOption.SO_REUSEADDR, Boolean.TRUE); options.put(ChannelOption.TCP_NODELAY, Boolean.TRUE); opti...
3.26
dubbo_NettyHttpRestServer_getChannelHandlers_rdh
/** * create channel handler * * @param url * @return */ protected List<ChannelHandler> getChannelHandlers(URL url) { List<ChannelHandler> channelHandlers = new ArrayList<>(); return channelHandlers; }
3.26
dubbo_AbstractRegistry_notify_rdh
/** * Notify changes from the provider side. * * @param url * consumer side url * @param listener * listener * @param urls * provider latest urls */ protected void notify(URL url, NotifyListener listener, List<URL> urls) { if (url == null) { throw new IllegalArgumentException("notify url == n...
3.26
dubbo_SharedClientsProvider_closeReferenceCountExchangeClient_rdh
/** * close ReferenceCountExchangeClient * * @param client */ private void closeReferenceCountExchangeClient(ReferenceCountExchangeClient client) { if (client == null) { return; } try { if (logger.isInfoEnabled()) { logger.info((("Close dubbo connect: " + clie...
3.26
dubbo_SharedClientsProvider_checkClientCanUse_rdh
/** * Check if the client list is all available * * @param referenceCountExchangeClients * @return true-available,false-unavailable */ private boolean checkClientCanUse(List<ReferenceCountExchangeClient> referenceCountExchangeClients) { if (CollectionUtils.isEmpty(referenceCountExchangeClients)) { retu...
3.26
dubbo_SharedClientsProvider_batchClientRefIncr_rdh
/** * Increase the reference Count if we create new invoker shares same connection, the connection will be closed without any reference. * * @param referenceCountExchangeClients */ private void batchClientRefIncr(List<ReferenceCountExchangeClient> referenceCountExchangeClients) { if (CollectionUtils.isEmpty(ref...
3.26
dubbo_MeshAppRuleListener_getMeshRuleDispatcher_rdh
/** * For ut only */ @Deprecated public MeshRuleDispatcher getMeshRuleDispatcher() { return meshRuleDispatcher;}
3.26
dubbo_ReferenceBeanBuilder_setInjvm_rdh
/** * * @param injvm * @deprecated instead, use the parameter <b>scope</b> to judge if it's in jvm, scope=local */ @Deprecated public ReferenceBeanBuilder setInjvm(Boolean injvm) { attributes.put(ReferenceAttributes.INJVM, injvm); return this;}
3.26
dubbo_ReferenceBeanBuilder_setRegistry_rdh
// @Deprecated // public ReferenceBeanBuilder setApplication(ApplicationConfig application) { // attributes.put(ReferenceAttributes.APPLICATION, application); // return this; // } // @Deprecated // public ReferenceBeanBuilder setModule(ModuleConfig module) { // attributes.put(ReferenceAttributes.MODULE, module); // ret...
3.26
dubbo_ReferenceBeanBuilder_setStub_rdh
// public ReferenceBeanBuilder setRouter(String router) { // attributes.put(ReferenceAttributes.ROUTER, router); // return this; // } public ReferenceBeanBuilder setStub(String stub) { attributes.put(ReferenceAttributes.STUB, stub); return this; }
3.26
dubbo_MockInvoker_normalizeMock_rdh
/** * Normalize mock string: * * <ol> * <li>return => return null</li> * <li>fail => default</li> * <li>force => default</li> * <li>fail:throw/return foo => throw/return foo</li> * <li>force:throw/return foo => throw/return foo</li> * </ol> * * @param mock * mock string * @return normalized mock string ...
3.26
dubbo_ProtocolBuilder_path_rdh
/** * * @param path * @return ProtocolBuilder * @see ProtocolBuilder#contextpath(String) */ @Deprecated public ProtocolBuilder path(String path) { this.contextpath = path; return getThis(); }
3.26
dubbo_ProtocolBuilder_dispather_rdh
/** * * @param dispather * @return ProtocolBuilder * @see ProtocolBuilder#dispatcher(String) */ @Deprecated public ProtocolBuilder dispather(String dispather) { this.dispatcher = dispather; return getThis(); }
3.26
dubbo_RestRPCInvocationUtil_parseMethodArgs_rdh
/** * service method real args parse * * @param rpcInvocation * @param request * @param servletRequest * @param servletResponse * @param restMethodMetadata */ public static void parseMethodArgs(RpcInvocation rpcInvocation, RequestFacade request, Object servletRequest, Object servletResponse, RestMethodMetadata ...
3.26
dubbo_RestRPCInvocationUtil_getInvoker_rdh
/** * get invoker by path matcher * * @param pathMatcher * @return */ public static Invoker getInvoker(PathMatcher pathMatcher, ServiceDeployer serviceDeployer) { InvokerAndRestMethodMetadataPair pair = getRestMethodMetadataAndInvokerPair(pathMatcher, serviceDeployer); if (pair == null) { return nu...
3.26
dubbo_RestRPCInvocationUtil_getInvokerByRequest_rdh
/** * get invoker by request * * @param request * @return */ public static Invoker getInvokerByRequest(RequestFacade request) { PathMatcher pathMatcher = createPathMatcher(request); return getInvoker(pathMatcher, request.getServiceDeployer()); }
3.26
dubbo_RestRPCInvocationUtil_getInvokerByServiceInvokeMethod_rdh
/** * get invoker by service method * <p> * compare method`s name,param types * * @param serviceMethod * @return */ public static Invoker getInvokerByServiceInvokeMethod(Method serviceMethod, ServiceDeployer serviceDeployer) {if (serviceMethod == null) { return null; } PathMatcher pathMatcher = ...
3.26
dubbo_RestRPCInvocationUtil_getRestMethodMetadataAndInvokerPair_rdh
/** * get InvokerAndRestMethodMetadataPair from rpc context * * @param request * @return */ public static InvokerAndRestMethodMetadataPair getRestMethodMetadataAndInvokerPair(RequestFacade request) { PathMatcher pathMather = createPathMatcher(request); return getRestMethodMetadataAndInvokerPair(pathMather...
3.26
dubbo_RestRPCInvocationUtil_createParseContext_rdh
/** * create parseMethodArgs context * * @param request * @param originRequest * @param originResponse * @param restMethodMetadata * @return */ private static ProviderParseContext createParseContext(RequestFacade request, Object originRequest, Object originResponse, RestMethodMetadata restMethodMetadata) { ...
3.26
dubbo_RestRPCInvocationUtil_createPathMatcher_rdh
/** * create path matcher by request * * @param request * @return */ public static PathMatcher createPathMatcher(RequestFacade request) { String path = request.getPath(); String version = request.getHeader(RestHeaderEnum.VERSION.getHeader()); String group = request.getHeader(RestHeaderEnum.GROUP.getHea...
3.26
dubbo_RestRPCInvocationUtil_createBaseRpcInvocation_rdh
/** * build RpcInvocation * * @param request * @param restMethodMetadata * @return */public static RpcInvocation createBaseRpcInvocation(RequestFacade request, RestMethodMetadata restMethodMetadata) { RpcInvocation rpcInvocation = new RpcInvocation(); rpcInvocation.setParameterTypes(restMethodMetadata.get...
3.26
dubbo_MessageFormatter_deeplyAppendParameter_rdh
// special treatment of array values was suggested by 'lizongbo' private static void deeplyAppendParameter(StringBuffer sbuf, Object o, Map<Object[], Void> seenMap) { if (o == null) { sbuf.append("null"); return; } if (!o.getClass().isArray()) { safeObjectAppend(sbuf, o); } else // check for primitive array types be...
3.26
dubbo_MessageFormatter_arrayFormat_rdh
/** * Same principle as the {@link #format(String, Object)} and * {@link #format(String, Object, Object)} methods except that any number of * arguments can be passed in an array. * * @param messagePattern * The message pattern which will be parsed and formatted * @param argArray * An array of arguments to b...
3.26
dubbo_MessageFormatter_format_rdh
/** * Performs a two argument substitution for the 'messagePattern' passed as * parameter. * <p/> * For example, * <p/> * <pre> * MessageFormatter.format(&quot;Hi {}. My name is {}.&quot;, &quot;Alice&quot;, &quot;Bob&quot;); * </pre> * <p/> * will return the string "Hi Alice. My name is Bob.". * * @param m...
3.26
dubbo_MetricsApplicationListener_onPostEventBuild_rdh
/** * Perform auto-increment on the monitored key, * Can use a custom listener instead of this generic operation * * @param metricsKey * Monitor key * @param collector * Corresponding collector */ public static AbstractMetricsKeyListener onPostEventBuild(MetricsKey metricsKey, CombMetricsCollector<?> coll...
3.26
dubbo_MetricsApplicationListener_onFinishEventBuild_rdh
/** * To end the monitoring normally, in addition to increasing the number of corresponding indicators, * use the introspection method to calculate the relevant rt indicators * * @param metricsKey * Monitor key * @param collector * Corresponding collector */ public static AbstractMetricsKeyListener onFinish...
3.26
dubbo_MetricsApplicationListener_onErrorEventBuild_rdh
/** * Similar to onFinishEventBuild */ public static AbstractMetricsKeyListener onErrorEventBuild(MetricsKey metricsKey, MetricsPlaceValue placeType, CombMetricsCollector<?> collector) { return AbstractMetricsKeyListener.onError(metricsKey, event -> { collector.increment(metricsKey); ...
3.26
dubbo_AbstractServerCall_buildInvocation_rdh
/** * Build the RpcInvocation with metadata and execute headerFilter * * @return RpcInvocation */ protected RpcInvocation buildInvocation(MethodDescriptor methodDescriptor) { final URL url = invoker.getUrl(); RpcInvocation inv = new RpcInvocation(url.getServiceModel(), methodDescriptor.getMethodName(), se...
3.26
dubbo_AbstractServerCall_responseErr_rdh
/** * Error in create stream, unsupported config or triple protocol error. * * @param status * response status */ protected void responseErr(TriRpcStatus status) { if (closed) { return; } closed = true; stream.complete(status, null, false, CommonConstants.TRI_EXCEPTION_CODE_NOT_EXISTS); ...
3.26
dubbo_JValidator_createMemberValue_rdh
// Copy from javassist.bytecode.annotation.Annotation.createMemberValue(ConstPool, CtClass); private static MemberValue createMemberValue(ConstPool cp, CtClass type, Object value) throws NotFoundException {MemberValue memberValue = annotation.Annotation.createMemberValue(cp, type); if (memberValue instanceof BooleanMem...
3.26
dubbo_JValidator_generateMethodParameterClass_rdh
/** * try to generate methodParameterClass. * * @param clazz * interface class * @param method * invoke method * @param parameterClassName * generated parameterClassName * @return Class<?> generated methodParameterClass */ private static Class<?> generateMethodParameterClass(Class<?> clazz, Method metho...
3.26
dubbo_ServiceDiscoveryRegistry_createServiceDiscovery_rdh
/** * Create the {@link ServiceDiscovery} from the registry {@link URL} * * @param registryURL * the {@link URL} to connect the registry * @return non-null */ protected ServiceDiscovery createServiceDiscovery(URL registryURL) { return getServiceDiscovery(registryURL.addParameter(INTERFACE_KEY, ServiceDiscovery....
3.26
dubbo_ServiceDiscoveryRegistry_supports_rdh
/** * Supports or not ? * * @param registryURL * the {@link URL url} of registry * @return if supported, return <code>true</code>, or <code>false</code> */ public static boolean supports(URL registryURL) { return SERVICE_REGISTRY_TYPE.equalsIgnoreCase(registryURL.getParameter(REGISTRY_TYPE_KEY)); }
3.26
dubbo_StringToDurationConverter_detectAndParse_rdh
/** * Detect the style then parse the value to return a duration. * * @param value * the value to parse * @return the parsed duration * @throws IllegalArgumentException * if the value is not a known style or cannot be * parsed */ public static Duration detectAndParse(String value) { return detectAn...
3.26
dubbo_StringToDurationConverter_parse_rdh
/** * Parse the given value to a duration. * * @param value * the value to parse * @return a duration */public Duration parse(String value) { return parse(value, null); }
3.26
dubbo_StringToDurationConverter_detect_rdh
/** * Detect the style from the given source value. * * @param value * the source value * @return the duration style * @throws IllegalArgumentException * if the value is not a known style */ public static DurationStyle detect(String value) { Assert.notNull(value, "Value must not be null"); for (Dura...
3.26
dubbo_AbstractAnnotationBeanPostProcessor_prepareInjection_rdh
/** * Prepare injection data after found injection elements * * @param metadata * @throws Exception */ protected void prepareInjection(AnnotatedInjectionMetadata metadata) throws Exception { }
3.26
dubbo_AbstractAnnotationBeanPostProcessor_getInjectedObject_rdh
/** * Get injected-object from specified {@link AnnotationAttributes annotation attributes} and Bean Class * * @param attributes * {@link AnnotationAttributes the annotation attributes} * @param bean * Current bean that will be injected * @param beanName * Current bean name that will be injected * @param...
3.26
dubbo_AbstractAnnotationBeanPostProcessor_findFieldAnnotationMetadata_rdh
/** * Finds {@link InjectionMetadata.InjectedElement} Metadata from annotated fields * * @param beanClass * The {@link Class} of Bean * @return non-null {@link List} */ private List<AbstractAnnotationBeanPostProcessor.AnnotatedFieldElement> findFieldAnnotationMetadata(final Class<?> beanClass) { final List<...
3.26
dubbo_AbstractAnnotationBeanPostProcessor_findAnnotatedMethodMetadata_rdh
/** * Finds {@link InjectionMetadata.InjectedElement} Metadata from annotated methods * * @param beanClass * The {@link Class} of Bean * @return non-null {@link List} */ private List<AbstractAnnotationBeanPostProcessor.AnnotatedMethodElement> findAnnotatedMethodMetadata(final Class<?> beanClass) { final Lis...
3.26
dubbo_AbstractAnnotationBeanPostProcessor_needsRefreshInjectionMetadata_rdh
// Use custom check method to compatible with Spring 4.x private boolean needsRefreshInjectionMetadata(AnnotatedInjectionMetadata metadata, Class<?> clazz) { return (metadata == null) || metadata.needsRefresh(clazz); }
3.26
dubbo_AbstractProxyProtocol_isBound_rdh
/** * * @return */ @Overridepublic boolean isBound() { return false; }
3.26
dubbo_AbstractProxyProtocol_destroyInternal_rdh
// used to destroy unused clients and other resource protected void destroyInternal(URL url) { // subclass override }
3.26
dubbo_FixedParamValue_getN_rdh
/** * DEFAULT value will be returned if n = 0 * * @param n */ @Override public String getN(int n) { return values[n]; }
3.26
dubbo_MetricsSupport_fillZero_rdh
/** * Generate a complete indicator item for an interface/method */ public static <T> void fillZero(Map<?, Map<T, AtomicLong>> data) { if (CollectionUtils.isEmptyMap(data)) { return; } Set<T> allKeyMetrics = data.values().stream().flatMap(map -> map.keySet().stream()).collect(Collectors.toSet()); data.forEach((keyWr...
3.26
dubbo_MetricsSupport_incrAndAddRt_rdh
/** * Incr method num&&rt */ public static void incrAndAddRt(MetricsKey metricsKey, MetricsPlaceValue placeType, MethodMetricsCollector<TimeCounterEvent> collector, TimeCounterEvent event) { collector.increment(event.getAttachmentValue(METHOD_METRICS), new MetricsKeyWrapper(metricsKey, placeType), SELF_INCREMENT_SIZE...
3.26
dubbo_MetricsSupport_increment_rdh
/** * Incr method num */ public static void increment(MetricsKey metricsKey, MetricsPlaceValue placeType, MethodMetricsCollector<TimeCounterEvent> collector, MetricsEvent event) { collector.increment(event.getAttachmentValue(METHOD_METRICS), new MetricsKeyWrapper(metricsKey, placeType), SELF_INCREMENT_SIZE); }
3.26
dubbo_AccessLogFilter_invoke_rdh
/** * This method logs the access log for service method invocation call. * * @param invoker * service * @param inv * Invocation service method. * @return Result from service method. * @throws RpcException */ @Override public Result invoke(Invoker<?> invoker,...
3.26
dubbo_AccessLogFilter_destroy_rdh
// test purpose only public void destroy() { future.cancel(true); }
3.26
dubbo_SpringCompatUtils_getGenericTypeOfReturnType_rdh
/** * Get the generic type of return type of the method. * * <pre> * Source method: * ReferenceBean&lt;DemoService> demoService() * * Result: DemoService.class * </pre> * * @param factoryMethodMetadata * @return */ public static Class getGenericTypeOfReturnType(MethodMetadata factoryMethodMetadata) { ...
3.26
dubbo_TypeDefinition_formatType_rdh
/** * Format the {@link String} presenting Java type * * @param type * the String presenting type * @return new String presenting Java type after be formatted * @since 2.7.9 */ public static String formatType(String type) { if (isGenericType(type)) { return formatGenericType(type); } return...
3.26
dubbo_TypeDefinition_formatTypes_rdh
/** * Format the {@link String} array presenting Java types * * @param types * the strings presenting Java types * @return new String array of Java types after be formatted * @since 2.7.9 */ public static String[] formatTypes(String[] types) { String[] newTypes = new String[types.length]; for (int i = ...
3.26
dubbo_TypeDefinition_formatGenericType_rdh
/** * Replacing <code>", "</code> to <code>","</code> will not change the semantic of * {@link ParameterizedType#toString()} * * @param type * @return formatted type * @see sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl */ private static String formatGenericType(String type) { return replace(t...
3.26
dubbo_Parameters_getExtension_rdh
/** * * @deprecated will be removed in 3.3.0 */ @Deprecated public <T> T getExtension(Class<T> type, String key, String defaultValue) { String name = getParameter(key, defaultValue); return ExtensionLoader.getExtensionLoader(type).getExtension(name); }
3.26
dubbo_Parameters_getMethodExtension_rdh
/** * * @deprecated will be removed in 3.3.0 */ @Deprecated public <T> T getMethodExtension(Class<T> type, String method, String key, String defaultValue) { String name = getMethodParameter(method, key, defaultValue); return ExtensionLoader.getExtensionLoader(type).getExtension(name); }
3.26
dubbo_PathUtils_normalize_rdh
/** * Normalize path: * <ol> * <li>To remove query string if presents</li> * <li>To remove duplicated slash("/") if exists</li> * </ol> * * @param path * path to be normalized * @return a normalized path if required */ static String normalize(String path) { if (isEmpty(path)) { return SLASH; ...
3.26
dubbo_ServiceAddressURL_equals_rdh
/** * ignore consumer url compare. * It's only meaningful for comparing two address urls related to the same consumerURL. * * @param obj * @return */ @Overridepublic boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) {return false; } if (!(obj instanceof S...
3.26
dubbo_DynamicDirectory_m1_rdh
/** * The original consumer url * * @return URL */ public URL m1() { return this.consumerUrl; }
3.26
dubbo_AccessLogData_setInvocationTime_rdh
/** * Set the invocation date. As an argument it accept date string. * * @param invocationTime */ public void setInvocationTime(Date invocationTime) { set(INVOCATION_TIME, invocationTime); }
3.26
dubbo_AccessLogData_getServiceName_rdh
/** * Return gthe service of access log entry * * @return */ public String getServiceName() { return get(SERVICE).toString(); }
3.26
dubbo_AccessLogData_setRemotePort_rdh
/** * Set caller remote port. * * @param remotePort */ private void setRemotePort(Integer remotePort) { set(REMOTE_PORT, remotePort); }
3.26
dubbo_AccessLogData_set_rdh
/** * Add log key along with his value. * * @param key * Any not null or non empty string * @param value * Any object including null. */ private void set(String key, Object value) { data.put(key, value); }
3.26
dubbo_AccessLogData_setArguments_rdh
/** * Sets invocation arguments * * @param arguments */ public void setArguments(Object[] arguments) { set(ARGUMENTS, arguments != null ? Arrays.copyOf(arguments, arguments.length) : null);}
3.26
dubbo_AccessLogData_get_rdh
/** * Return value of key * * @param key * @return */ private Object get(String key) { return data.get(key); }
3.26
dubbo_AccessLogData_setServiceName_rdh
/** * Add service name. * * @param serviceName */ public void setServiceName(String serviceName) { set(SERVICE, serviceName); }
3.26
dubbo_AccessLogData_setOutTime_rdh
/** * Set the out date. As an argument it accept date string. * * @param outTime */ public void setOutTime(Date outTime) { set(OUT_TIME, outTime); }
3.26
dubbo_AccessLogData_setTypes_rdh
/** * Set invocation's method's input parameter's types * * @param types */ public void setTypes(Class[] types) { set(TYPES, types != null ? Arrays.copyOf(types, types.length) : null); }
3.26
dubbo_ProtobufTypeBuilder_isMapPropertySettingMethod_rdh
/** * judge map property</br> * proto3 grammar : map<string,string> card = 1; </br> * generated setting method: putAllCards(java.util.Map<String, string> values) </br> * * @param methodTemp * @return */ private boolean isMapPropertySettingMethod(Method methodTemp) { String methodName = methodTemp.getName(); Cla...
3.26
dubbo_ProtobufTypeBuilder_generateListFieldName_rdh
/** * get list property name from setting method.<br/> * ex: getXXXList()<br/> * * @param methodName * @return */ private String generateListFieldName(String methodName) {return toCamelCase(methodName.substring(3, methodName.length() - 4)); }
3.26
dubbo_ProtobufTypeBuilder_validateMapType_rdh
/** * 1. Unsupported Map with key type is not String <br/> * Bytes is a primitive type in Proto, transform to ByteString.class in java<br/> * * @param fieldName * @param typeName * @return */ private void validateMapType(String fieldName, String typeName) { Matcher matcher = f0.matcher(typeName); if (!matcher....
3.26
dubbo_ProtobufTypeBuilder_isSimplePropertySettingMethod_rdh
/** * judge custom type or primitive type property<br/> * 1. proto3 grammar ex: string name = 1 <br/> * 2. proto3 grammar ex: optional string name =1 <br/> * generated setting method ex: setNameValue(String name); * * @param method * @return */ private boolean isSimplePropertySettingMethod(Method method) { Stri...
3.26
dubbo_ProtobufTypeBuilder_isListPropertyGettingMethod_rdh
/** * judge List property</br> * proto3 grammar ex: repeated string names; </br> * generated getting method:List<String> getNamesList() * * @param method * @return */ boolean isListPropertyGettingMethod(Method method) { String methodName = method.getName(); Class<?> type = method.getReturnType(); if ((!methodNam...
3.26
dubbo_ProtobufTypeBuilder_generateSimpleFiledName_rdh
/** * get unCollection unMap property name from setting method.<br/> * ex:setXXX();<br/> * * @param methodName * @return */ private String generateSimpleFiledName(String methodName) { return toCamelCase(methodName.substring(3)); }
3.26
dubbo_ProtobufTypeBuilder_generateMapFieldName_rdh
/** * get map property name from setting method.<br/> * ex: putAllXXX();<br/> * * @param methodName * @return */ private String generateMapFieldName(String methodName) { return toCamelCase(methodName.substring(6)); }
3.26
dubbo_RpcContext_asyncCall_rdh
/** * one way async call, send request only, and result is not required * * @param runnable */ public void asyncCall(Runnable runnable) { try { setAttachment(Constants.RETURN_KEY, Boolean.FALSE.toString()); runnable.run(); } catch (Throwable e) { // FIXME should put exception in future? throw new RpcException("one...
3.26
dubbo_RpcContext_get_rdh
/** * get values. * * @return values */ public Map<String, Object> get() {return newRpcContext.get(); }
3.26
dubbo_RpcContext_m1_rdh
/** * Get the response object of the underlying RPC protocol, e.g. HttpServletResponse * * @return null if the underlying protocol doesn't provide support for getting response */public Object m1() { return newRpcContext.getResponse(); }
3.26