name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
dubbo_ConsumerMethodModel_addAttribute_rdh
// public ConcurrentMap<String, Object> getAttributeMap() { // return attributeMap; // } public void addAttribute(String key, Object value) { this.attributeMap.put(key, value); }
3.26
dubbo_MetadataService_getServiceDefinition_rdh
/** * Interface definition. * * @return */ default String getServiceDefinition(String interfaceName, String version, String group) { return getServiceDefinition(buildKey(interfaceName, group, version)); }
3.26
dubbo_MetadataService_getExportedURLs_rdh
/** * Get the {@link SortedSet sorted set} of String that presents the specified Dubbo exported {@link URL urls} by the * <code>serviceInterface</code>, <code>group</code> and <code>version</code> * * @param serviceInterface * The class name of Dubbo service interface * @param group * the Dubbo Service Group...
3.26
dubbo_MetadataService_version_rdh
/** * Gets the version of {@link MetadataService} that always equals {@link #VERSION} * * @return non-null * @see #VERSION */ default String version() { return VERSION; }
3.26
dubbo_MetadataService_getSubscribedURLs_rdh
/** * the list of String that presents all Dubbo subscribed {@link URL urls} * * @return the non-null read-only {@link SortedSet sorted set} of {@link URL#toFullString() strings} presenting the {@link URL URLs} * @see #toSortedStrings(Stream) * @see URL#toFullString() */ default SortedSet<String> getSubscribedURL...
3.26
dubbo_MetadataService_toSortedStrings_rdh
/** * Convert the specified {@link Stream} of {@link URL URLs} to be the {@link URL#toFullString() strings} presenting * the {@link URL URLs} * * @param stream * {@link Stream} of {@link URL} * @return the non-null read-only {@link SortedSet sorted set} of {@link URL#toFullString() strings} presenting * @see U...
3.26
dubbo_MetadataReport_publishAppMetadata_rdh
/** * Application Metadata -- START */ default void publishAppMetadata(SubscriberMetadataIdentifier identifier, MetadataInfo metadataInfo) { }
3.26
dubbo_MetadataReport_getServiceAppMapping_rdh
/** * Service<-->Application Mapping -- START */ default Set<String> getServiceAppMapping(String serviceKey, MappingListener listener, URL url) { return Collections.emptySet(); }
3.26
dubbo_LruCacheFactory_createCache_rdh
/** * Takes url as an method argument and return new instance of cache store implemented by LruCache. * * @param url * url of the method * @return ThreadLocalCache instance of cache */ @Overrideprotected Cache createCache(URL url) { return new LruCache(url); }
3.26
dubbo_DynamicConfiguration_getRuleKey_rdh
/** * The format is '{interfaceName}:[version]:[group]' * * @return */ static String getRuleKey(URL url) { return url.getColonSeparatedKey(); }
3.26
dubbo_DynamicConfiguration_getConfigItem_rdh
/** * get configItem which contains content and stat info. * * @param key * @param group * @return */ default ConfigItem getConfigItem(String key, String group) { String content = getConfig(key, group); return new ConfigItem(content, null); }
3.26
dubbo_DynamicConfiguration_getDefaultGroup_rdh
/** * Get the default group for the operations * * @return The default value is {@link #DEFAULT_GROUP "dubbo"} * @since 2.7.5 */ default String getDefaultGroup() { return DEFAULT_GROUP; }
3.26
dubbo_DynamicConfiguration_publishConfig_rdh
/** * Publish Config mapped to the given key and the given group. * * @param key * the key to represent a configuration * @param group * the group where the key belongs to * @param content * the content of configuration * @return <code>true</code> if success, or <code>false</code> * @throws UnsupportedO...
3.26
dubbo_DynamicConfiguration_removeConfig_rdh
/** * * @param key * the key to represent a configuration * @param group * the group where the key belongs to * @return <code>true</code> if success, or <code>false</code> * @since 2.7.8 */ default boolean removeConfig(String key, String group) { return true; }
3.26
dubbo_DynamicConfiguration_close_rdh
/** * Close the configuration * * @throws Exception * @since 2.7.5 */ @Override default void close() throws Exception { throw new UnsupportedOperationException(); }
3.26
dubbo_DynamicConfiguration_addListener_rdh
/** * {@link #addListener(String, String, ConfigurationListener)} * * @param key * the key to represent a configuration * @param listener * configuration listener */ default void addListener(String key, ConfigurationListener listener) { addListener(key, getDefaultG...
3.26
dubbo_DynamicConfiguration_getConfig_rdh
/** * Get the configuration mapped to the given key and the given group with {@link #getDefaultTimeout() the default * timeout} * * @param key * the key to represent a configuration * @param group * the group where the key belongs to * @return target configuration mapped to the given key and the given group...
3.26
dubbo_DynamicConfiguration_getProperties_rdh
/** * This method are mostly used to get a compound config file, such as a complete dubbo.properties file. * * @revision 2.7.4 */ default String getProperties(String key, String group, long timeout) throws IllegalStateException { return getConfig(key, group, timeout); }
3.26
dubbo_DynamicConfiguration_publishConfigCas_rdh
/** * publish config mapped to this given key and given group with stat. * * @param key * @param group * @param content * @param ticket * @return * @throws UnsupportedOperationException */ default boolean publishConfigCas(String key, String group, String content, Object ticket) throws UnsupportedOperationExcep...
3.26
dubbo_DynamicConfiguration_removeListener_rdh
/** * {@link #removeListener(String, String, ConfigurationListener)} * * @param key * the key to represent a configuration * @param listener * configuration listener */ default void removeListener(String key, ConfigurationListener listener) { removeListener(key, getDefaultGroup(), listener); }
3.26
dubbo_DubboProtocol_buildReferenceCountExchangeClientList_rdh
/** * Bulk build client * * @param url * @param connectNum * @return */ private List<ReferenceCountExchangeClient> buildReferenceCountExchangeClientList(URL url, int connectNum) { List<ReferenceCountExchangeClient> clients = new ArrayList<>(); for (int i = 0; i < connectNum; i++) { clients.add(buildReferenceCoun...
3.26
dubbo_DubboProtocol_initClient_rdh
/** * Create new connection * * @param url */ private ExchangeClient initClient(URL url) { /* Instance of url is InstanceAddressURL, so addParameter actually adds parameters into ServiceInstance, which means params are shared among different services. Since client is shared among services this is currently not a pr...
3.26
dubbo_DubboProtocol_buildReferenceCountExchangeClient_rdh
/** * Build a single client * * @param url * @return */ private ReferenceCountExchangeClient buildReferenceCountExchangeClient(URL url) { ExchangeClient exchangeClient = initClient(url); ReferenceCountExchangeClient client = new ReferenceCountExchangeClient(exchangeClient, DubboCodec.NAME); // read configs int shu...
3.26
dubbo_DubboProtocol_getDubboProtocol_rdh
/** * * @deprecated Use {@link DubboProtocol#getDubboProtocol(ScopeModel)} instead */ @Deprecated public static DubboProtocol getDubboProtocol() { return ((DubboProtocol) (FrameworkModel.defaultModel().getExtensionLoader(Protocol.class).getExtension(DubboProtocol.NAME, false))); }
3.26
dubbo_DubboProtocol_getSharedClient_rdh
/** * Get shared connection * * @param url * @param connectNum * connectNum must be greater than or equal to 1 */ @SuppressWarnings("unchecked") private SharedClientsProvider getSharedClient(URL url, int connectNum) { String key = url.getAddress(); // connectNum must be greater than or equal to 1 int expecte...
3.26
dubbo_DubboProtocol_createInvocation_rdh
/** * FIXME channel.getUrl() always binds to a fixed service, and this service is random. * we can choose to use a common service to carry onConnect event if there's no easy way to get the specific * service this connection is binding to. * * @param channel * @param url * @param methodKey * @return */ private ...
3.26
dubbo_DubboProtocol_getInvocationWithoutData_rdh
/** * only log body in debugger mode for size & security consideration. * * @param invocation * @return */ private Invocation getInvocationWithoutData(Invocation invocation) { if (logger.isDebugEnabled()) { return invocation; } if (invocation instanceof RpcInvocation) { RpcInvocation rpcInvocation = ((RpcInvocat...
3.26
dubbo_DefaultSerializeClassChecker_loadClass_rdh
/** * Try load class * * @param className * class name * @throws IllegalArgumentException * if class is blocked */ public Class<?> loadClass(ClassLoader classLoader, String className) throws ClassNotFoundException { Class<?>...
3.26
dubbo_ArrayUtils_isNotEmpty_rdh
/** * <p>Checks if the array is not null or empty. <p/> * * @param array * th array to check * @return {@code true} if the array is not null or empty. */ public static boolean isNotEmpty(final Object[] array) { return !isEmpty(array); }
3.26
dubbo_ArrayUtils_of_rdh
/** * Convert from variable arguments to array * * @param values * variable arguments * @param <T> * The class * @return array * @since 2.7.9 */ public static <T> T[] of(T... values) { return values; }
3.26
dubbo_ArrayUtils_isEmpty_rdh
/** * <p>Checks if the array is null or empty. <p/> * * @param array * th array to check * @return {@code true} if the array is null or empty. */ public static boolean isEmpty(final Object[] array) { return (array == null) || (array.length == 0); }
3.26
dubbo_GsonUtils_setSupportGson_rdh
/** * * @deprecated for uts only */ @Deprecated protected static void setSupportGson(Boolean supportGson) { GsonUtils.supportGson = supportGson; }
3.26
dubbo_DeadlineFuture_newFuture_rdh
/** * init a DeadlineFuture 1.init a DeadlineFuture 2.timeout check * * @param timeout * timeout in Mills * @return a new DeadlineFuture */ public static DeadlineFuture newFuture(String serviceName, String methodName, String address, int timeout, ExecutorService executor) { final DeadlineFuture future = ne...
3.26
dubbo_AbstractMetadataReport_getMetadataReportRetry_rdh
/** * * @deprecated only for unit test */ @Deprecated protected MetadataReportRetry getMetadataReportRetry() { return metadataReportRetry; }
3.26
dubbo_AbstractMetadataReport_retry_rdh
/** * * @return if need to continue */ public boolean retry() { return doHandleMetadataCollection(failedReports); }
3.26
dubbo_AbstractMetadataReport_calculateStartTime_rdh
/** * between 2:00 am to 6:00 am, the time is random. * * @return */ long calculateStartTime() { Calendar calendar = Calendar.getInstance(); long nowMill = calendar.getTimeInMillis(); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); c...
3.26
dubbo_AbstractMetadataReport_getRetryExecutor_rdh
/** * * @deprecated only for test */ @Deprecated ScheduledExecutorService getRetryExecutor() { return retryExecutor; }
3.26
dubbo_AbstractMetadataReport_publishAll_rdh
/** * not private. just for unittest. */ void publishAll() { logger.info("start to publish all metadata."); this.doHandleMetadataCollection(allMetadataReports); }
3.26
dubbo_AbstractMetadataReport_getReportCacheExecutor_rdh
/** * * @deprecated only for unit test */ @Deprecated protected ExecutorService getReportCacheExecutor() { return reportCacheExecutor; }
3.26
dubbo_AbortPolicyWithReport_dispatchThreadPoolExhaustedEvent_rdh
/** * dispatch ThreadPoolExhaustedEvent * * @param msg */ public void dispatchThreadPoolExhaustedEvent(String msg) { f0.forEach(listener -> listener.onEvent(new ThreadPoolExhaustedEvent(msg))); }
3.26
dubbo_BitList_clear_rdh
/** * Caution: This operation will clear originList for removing references purpose. * This may change the default behaviour when adding new element later. */ @Override public void clear() { rootSet.clear(); // to remove references originList = Collections.emptyList(); if (CollectionUtils.isNotEmpty...
3.26
dubbo_BitList_and_rdh
/** * And operation between two bitList. Return a new cloned list. * TailList in source bitList will be totally saved even if it is not appeared in the target bitList. * * @param target * target bitList * @return this bitList only contains those elements contain in both two list and source bitList's tailList *...
3.26
dubbo_BitList_getOriginList_rdh
// Provided by BitList only public List<E> getOriginList() { return originList;}
3.26
dubbo_AbstractHttpClientFactory_beforeCreated_rdh
// ////////////////////////////////////// implements end /////////////////////////////////////////////// // ////////////////////////////////////// inner methods /////////////////////////////////////////////// protected void beforeCreated(URL url) { }
3.26
dubbo_AbstractHttpClientFactory_createRestClient_rdh
// ////////////////////////////////////// implements start /////////////////////////////////////////////// @Override public RestClient createRestClient(URL url) throws RpcException { beforeCreated(url); // create a raw client RestClient restClient = doCreateRestClient(url); // postprocessor afte...
3.26
dubbo_MethodConfig_checkDefault_rdh
/** * Set default field values of MethodConfig. * * @see org.apache.dubbo.config.annotation.Method */ @Override protected void checkDefault() { super.checkDefault(); // set default field values // org.apache.dubbo.config.annotation.Method.isReturn() default true; if (isReturn() == null) { se...
3.26
dubbo_MethodConfig_getPrefixes_rdh
/** * Get method prefixes * * @return */ @Override @Parameter(excluded = true, attribute = false) public List<String> getPrefixes() { // parent prefix + method name if (parentPrefix != null) { List<String> prefixes = new ArrayList<>(); prefixes.add((parentPrefix + ".") + this.getName()); re...
3.26
dubbo_MethodConfig_constructMethodConfig_rdh
/** * TODO remove constructMethodConfig * * @param methods * @return */ @Deprecated public static List<MethodConfig> constructMethodConfig(Method[] methods) { if ((methods != null) && (methods.length != 0)) { List<MethodConfig> methodConfigs = new ArrayList<>(methods.length); for (int i = 0; i ...
3.26
dubbo_AbstractServiceDiscovery_update_rdh
/** * Update assumes that DefaultServiceInstance and its attributes will never get updated once created. * Checking hasExportedServices() before registration guarantees that at least one service is ready for creating the * instance. */ @Override public synchronized void update() throws RuntimeException {if (isDest...
3.26
dubbo_AbstractServiceDiscovery_doUpdate_rdh
/** * Update Service Instance. Unregister and then register by default. * Can be override if registry support update instance directly. * <br/> * NOTICE: Remind to update {@link AbstractServiceDiscovery#serviceInstance}'s reference if updated * and report metadata by {@link AbstractServiceDiscovery#reportMetadata(...
3.26
dubbo_ClassHelper_forName_rdh
/** * Replacement for <code>Class.forName()</code> that also returns Class * instances for primitives (like "int") and array class names (like * "String[]"). * * @param name * the name of the Class * @param classLoader * the class loader to use (may be <code>null</code>, * which indicates the default cla...
3.26
dubbo_ClassHelper_isTypeMatch_rdh
/** * We only check boolean value at this moment. * * @param type * @param value * @return */ public static boolean isTypeMatch(Class<?> type, String value) { return ClassUtils.isTypeMatch(type, value);}
3.26
dubbo_ClassHelper_isSetter_rdh
/** * * @see org.apache.dubbo.common.utils.MethodUtils#isSetter(Method) * @deprecated Replace to <code>MethodUtils#isSetter(Method)</code> */ public static boolean isSetter(Method method) { return MethodUtils.isSetter(method); }
3.26
dubbo_ClassHelper_m0_rdh
/** * * @see org.apache.dubbo.common.utils.ClassUtils * @deprecated Replace to <code>ClassUtils</code> */
3.26
dubbo_ClassHelper_isGetter_rdh
/** * * @see org.apache.dubbo.common.utils.MethodUtils#isGetter(Method) (Method) * @deprecated Replace to <code>MethodUtils#isGetter(Method)</code> */ public static boolean isGetter(Method method) { return MethodUtils.isGetter(method); }
3.26
dubbo_ClassHelper_getClassLoader_rdh
/** * get class loader * * @param clazz * @return class loader */ public static ClassLoader getClassLoader(Class<?> clazz) { return ClassUtils.getClassLoader(clazz); }
3.26
dubbo_PropertySourcesUtils_getPropertyNames_rdh
/** * Get the property names as the array from the specified {@link PropertySource} instance. * * @param propertySource * {@link PropertySource} instance * @return non-null */ public static String[] getPropertyNames(PropertySource propertySource) { String[] propertyNames = (propertySource instanceof EnumerableP...
3.26
dubbo_PropertySourcesUtils_normalizePrefix_rdh
/** * Normalize the prefix * * @param prefix * the prefix * @return the prefix */ public static String normalizePrefix(String prefix) { return prefix.endsWith(".") ? prefix : prefix + "."; }
3.26
dubbo_PropertySourcesUtils_getSubProperties_rdh
/** * Get prefixed {@link Properties} * * @param propertySources * {@link PropertySources} * @param propertyResolver * {@link PropertyResolver} to resolve the placeholder if present * @param prefix * the prefix of property name * @return Map * @see Properties */ public static Map<String, Object> getSub...
3.26
dubbo_MetricsGlobalRegistry_getCompositeRegistry_rdh
/** * Use CompositeMeterRegistry according to the following priority * 1. If useGlobalRegistry is configured, use the micrometer global CompositeMeterRegistry * 2. If there is a spring actuator, use spring's CompositeMeterRegistry * 3. Dubbo's own CompositeMeterRegistry is used by default */ public static Composit...
3.26
dubbo_URLStrParser_m0_rdh
/** * * @param encodedURLStr * : after {@link URL#encode(String)} string * encodedURLStr after decode format: protocol://username:password@host:port/path?k1=v1&k2=v2 * [protocol://][username:password@][host:port]/[path][?k1=v1&k2=v2] */ public static URL m0(String encodedURLStr) { Map<String, String> pa...
3.26
dubbo_URLStrParser_parseDecodedStr_rdh
/** * * @param decodedURLStr * : after {@link URL#decode} string * decodedURLStr format: protocol://username:password@host:port/path?k1=v1&k2=v2 * [protocol://][username:password@][host:port]/[path][?k1=v1&k2=v2] */ public static URL parseDecodedStr(String decodedURLStr) { Map<String, String> parameter...
3.26
dubbo_NopDynamicConfiguration_publishConfig_rdh
/** * * @since 2.7.5 */ @Override public boolean publishConfig(String key, String group, String content) { return true; }
3.26
dubbo_DubboAbstractTDigest_m0_rdh
/** * Compute the weighted average between <code>x1</code> with a weight of * <code>w1</code> and <code>x2</code> with a weight of <code>w2</code>. * This expects <code>x1</code> to be less than or equal to <code>x2</code> * and is guaranteed to return a number in <code>[x1, x2]</code>. An * explicit check is requ...
3.26
dubbo_DubboAbstractTDigest_add_rdh
/** * Adds a sample to a histogram. * * @param x * The value to add. */ @Override public void add(double x) { add(x, 1); }
3.26
dubbo_DubboAbstractTDigest_weightedAverage_rdh
/** * Same as {@link #weightedAverageSorted(double, double, double, double)} but flips * the order of the variables if <code>x2</code> is greater than * <code>x1</code>. */ static double weightedAverage(double x1, double w1, double x2, double w2) { if (x1 <= x2) { return m0(x1, w1, x2, w2); } els...
3.26
dubbo_ParamParserManager_consumerParamParse_rdh
/** * consumer Design Description: * <p> * Object[] args=new Object[0]; * List<Object> argsList=new ArrayList<>;</> * <p> * setValueByIndex(int index,Object value); * <p> * args=toArray(new Object[0]); */ public static void consumerParamParse(ConsumerParseContext parseContext) { List<ArgInfo> argInfos = p...
3.26
dubbo_ParamParserManager_providerParamParse_rdh
/** * provider Design Description: * <p> * Object[] args=new Object[0]; * List<Object> argsList=new ArrayList<>;</> * <p> * setValueByIndex(int index,Object value); * <p> * args=toArray(new Object[0]); */ public static Object[] providerParamParse(ProviderParseContext parseContext) {List<ArgInfo> args = parse...
3.26
dubbo_DubboCertManager_generatePemKey_rdh
/** * Generate content in pem encoded * * @param type * content type * @param content * content * @return encoded data * @throws IOException * ioException */ private String generatePemKey(String type, byte[] content) throws IOException { PemObject v26 = new PemObject(type, content); StringWrite...
3.26
dubbo_DubboCertManager_generatePrivatePemKey_rdh
/** * Generate private key in pem encoded * * @param keyPair * key pair * @return private key * @throws IOException * ioException */ private String generatePrivatePemKey(KeyPair keyPair) throws IOException {String key = generatePemKey("RSA PRIVATE KEY", keyPair.getPrivateKey().getEncoded()); if (log...
3.26
dubbo_DubboCertManager_signWithRsa_rdh
/** * Generate key pair with RSA * * @return key pair */ protected static KeyPair signWithRsa() { KeyPair keyPair = null;try { KeyPairGenerator kpGenerator = KeyPairGenerator.getInstance("RSA"); kpGenerator.initialize(4096); KeyPair keypair = kpGenerator.generateKeyPair(); Public...
3.26
dubbo_DubboCertManager_signWithEcdsa_rdh
/** * Generate key pair with ECDSA * * @return key pair */ protected static KeyPair signWithEcdsa() { KeyPair keyPair = null; try { ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256r1"); KeyPairGenerator g = KeyPairGenerator.getInstance("EC...
3.26
dubbo_DubboCertManager_connect0_rdh
/** * Try to connect to remote certificate authorization * * @param certConfig * certificate authorization address */ protected void connect0(CertConfig certConfig) { String caCertPath = certConfig.getCaCertPath(); String remoteAddress = certConfig.getRemoteAddress(); logger.info((("Try to connect ...
3.26
dubbo_DubboCertManager_scheduleRefresh_rdh
/** * Create task to refresh cert pair for current Dubbo instance */ protected void scheduleRefresh() { FrameworkExecutorRepository repository = frameworkModel.getBeanFactory().getBean(FrameworkExecutorRepository.class); refreshFuture = repository.getSharedScheduledExecutor().scheduleAtFixedRate(this::generat...
3.26
dubbo_DubboCertManager_generateCsr_rdh
/** * Generate CSR (Certificate Sign Request) * * @param keyPair * key pair to request * @return csr * @throws IOException * ioException */private String generateCsr(KeyPair keyPair) throws IOException { PKCS10CertificationRequest request = new JcaPKCS10CertificationRequestBuilder(new X500Name("O=" + "c...
3.26
dubbo_DubboCertManager_refreshCert_rdh
/** * Request remote certificate authorization to generate cert pair for current Dubbo instance * * @return cert pair * @throws IOException * ioException */ protected CertPair refreshCert() throws IOException { KeyPair keyPair = signWit...
3.26
dubbo_XdsRouter_getXdsRouteRuleMap_rdh
/** * for ut only */ @Deprecated ConcurrentHashMap<String, List<XdsRouteRule>> getXdsRouteRuleMap() { return xdsRouteRuleMap; }
3.26
dubbo_AbstractMetricsKeyListener_isSupport_rdh
/** * The MetricsKey type determines whether events are supported */ @Override public boolean isSupport(MetricsEvent event) {return super.isSupport(event) && event.isAssignableFrom(metricsKey); }
3.26
dubbo_RegistryDirectory_destroyAllInvokers_rdh
/** * Close all invokers */ @Override protected void destroyAllInvokers() { Map<URL, Invoker<T>> localUrlInvokerMap = this.urlInvokerMap;// local reference if (!CollectionUtils.isEmptyMap(localUrlInvokerMap)) { for (Invoker<T> invoker : new ArrayList<>(localUrlInvoker...
3.26
dubbo_RegistryDirectory_m2_rdh
/** * Haomin: added for test purpose */ public Map<URL, Invoker<T>> m2() { return urlInvokerMap; }
3.26
dubbo_RegistryDirectory_toInvokers_rdh
/** * Turn urls into invokers, and if url has been referred, will not re-reference. * the items that will be put into newUrlInvokeMap will be removed from oldUrlInvokerMap. * * @param oldUrlInvokerMap * it might be modified during the process. * @param urls * @return invokers */ private Map<URL, Invoker<T>> t...
3.26
dubbo_RegistryDirectory_mergeUrl_rdh
/** * Merge url parameters. the order is: override > -D >Consumer > Provider * * @param providerUrl * @return */ private URL mergeUrl(URL providerUrl) { if (providerUrl instanceof ServiceAddressURL) { providerUrl = overrideWithConfigurator(providerUrl); } else { providerUrl = moduleModel.getApplicationMod...
3.26
dubbo_ServiceBuilder_build_rdh
// @Override // public ServiceBuilder<U> mock(String mock) { // throw new IllegalArgumentException("mock doesn't support on provider side"); // } // @Override // public ServiceBuilder<U> mock(Boolean mock) { // throw new IllegalArgumentException("mock doesn't support on provider side"); // } public ServiceConfig<U> bui...
3.26
dubbo_DubboNamespaceHandler_parse_rdh
/** * Override {@link NamespaceHandlerSupport#parse(Element, ParserContext)} method * * @param element * {@link Element} * @param parserContext * {@link ParserContext} * @return * @since 2.7.5 */ @Override public BeanDefinition parse(Element element, ParserContext parserContext) { BeanDefinitionRegistr...
3.26
dubbo_DubboNamespaceHandler_init_rdh
/** * DubboNamespaceHandler * * @export */public class DubboNamespaceHandler extends NamespaceHandlerSupport implements ConfigurableSourceBeanMetadataElement { @Override public void init() { registerBeanDefinitionParser("application", new DubboBeanDefinitionParser(ApplicationConfig.class)); ...
3.26
dubbo_DubboNamespaceHandler_registerAnnotationConfigProcessors_rdh
/** * Register the processors for the Spring Annotation-Driven features * * @param registry * {@link BeanDefinitionRegistry} * @see AnnotationConfigUtils * @since 2.7.5 */ private void registerAnnotationConfigProcessors(BeanDefinitionRegistry registry) { AnnotationConfigUtils.registerAnnotationConfigProces...
3.26
dubbo_TypeDefinitionBuilder_build_rdh
/** * Build the instance of {@link TypeDefinition} from the specified {@link TypeMirror type} * * @param processingEnv * {@link ProcessingEnvironment} * @param type * {@link TypeMirror type} * @return non-null */ static TypeDefinition build(ProcessingEnvironment processingEnv, TypeMirror type, Map<String, ...
3.26
dubbo_DefaultFuture_newFuture_rdh
/** * init a DefaultFuture * 1.init a DefaultFuture * 2.timeout check * * @param channel * channel * @param request * the request * @param timeout * timeout * @return a new DefaultFuture */ public static DefaultFuture newFuture(Channel channel, Request request, int timeout, ExecutorService executor)...
3.26
dubbo_DefaultFuture_closeChannel_rdh
/** * close a channel when a channel is inactive * directly return the unfinished requests. * * @param channel * channel to close */ public static void closeChannel(Channel channel, long timeout) { long deadline = (timeout > 0) ? System.currentTimeMillis() + timeout : 0; for (Map.Entry<Long, Channel> ...
3.26
dubbo_TaskQueue_retryOffer_rdh
/** * retry offer task * * @param o * task * @return offer success or not * @throws RejectedExecutionException * if executor is terminated. */ public boolean retryOffer(Runnable o, long timeout, TimeUnit unit) throws InterruptedException { if (executor.isShutdown()) { throw new RejectedExecut...
3.26
dubbo_DubboSpringInitContext_setKeepRunningOnSpringClosed_rdh
/** * Keep Dubbo running when spring is stopped * * @param keepRunningOnSpringClosed */ public void setKeepRunningOnSpringClosed(boolean keepRunningOnSpringClosed) { this.setModuleAttribute(ModelConstants.KEEP_RUNNING_ON_SPRING_CLOSED, keepRunningOnSpringClosed); }
3.26
dubbo_ServiceDiscoveryRegistryDirectory_destroyAllInvokers_rdh
/** * Close all invokers */ @Override protected void destroyAllInvokers() {Map<ProtocolServiceKeyWithAddress, Invoker<T>> localUrlInvokerMap = this.urlInvokerMap;// local reference if (localUrlInvokerMap != null) { for (Invoker<T> invoker : new ArrayList<>(localUrlInvokerMap.values())) {try { ...
3.26
dubbo_ServiceDiscoveryRegistryDirectory_destroyUnusedInvokers_rdh
/** * Check whether the invoker in the cache needs to be destroyed * If set attribute of url: refer.autodestroy=false, the invokers will only increase without decreasing,there may be a refer leak * * @param oldUrlInvokerMap * @param newUrlInvokerMap */ private void destroyUnusedInvokers(Map<ProtocolServiceKeyWith...
3.26
dubbo_ServiceDiscoveryRegistryDirectory_toInvokers_rdh
/** * Turn urls into invokers, and if url has been refer, will not re-reference. * the items that will be put into newUrlInvokeMap will be removed from oldUrlInvokerMap. * * @param oldUrlInvokerMap * it might be modified during the process. * @param urls * @return invokers */ private Map<ProtocolServiceKeyWit...
3.26
dubbo_ReferenceAnnotationBeanPostProcessor_isAnnotatedReferenceBean_rdh
/** * check whether is @DubboReference at java-config @bean method */ private boolean isAnnotatedReferenceBean(BeanDefinition beanDefinition) { if (beanDefinition instanceof AnnotatedBeanDefinition) { AnnotatedBeanDefinition annotatedBeanDefinition = ((AnnotatedBeanDefinition) (beanDefinition));String be...
3.26
dubbo_ReferenceAnnotationBeanPostProcessor_getInjectedFieldReferenceBeanMap_rdh
/** * Get {@link ReferenceBean} {@link Map} in injected field. * * @return non-null {@link Map} * @since 2.5.11 */ public Map<InjectionMetadata.InjectedElement, ReferenceBean<?>> getInjectedFieldReferenceBeanMap() { Map<InjectionMetadata.InjectedElement, ReferenceBean<?>> map = new HashMap<>(); for (Map.Entry<Inj...
3.26
dubbo_ReferenceAnnotationBeanPostProcessor_m0_rdh
/** * Get {@link ReferenceBean} {@link Map} in injected method. * * @return non-null {@link Map} * @since 2.5.11 */ public Map<InjectionMetadata.InjectedElement, ReferenceBean<?>> m0() { Map<InjectionMetadata.InjectedElement, ReferenceBean<?>> map = new HashMap<>();for (Map.Entry<InjectionMetadata.InjectedElement...
3.26
dubbo_ReferenceAnnotationBeanPostProcessor_postProcessProperties_rdh
/** * Alternatives to the {@link #postProcessPropertyValues(PropertyValues, PropertyDescriptor[], Object, String)}. * * @see #postProcessPropertyValues */ @Override public PropertyValues postProcessProperties(PropertyValues pvs, Object bean, String beanName) throws BeansException { try { AnnotatedInjectionMetadata ...
3.26
dubbo_ReferenceAnnotationBeanPostProcessor_processReferenceAnnotatedBeanDefinition_rdh
/** * process @DubboReference at java-config @bean method * <pre class="code"> * &#064;Configuration * public class ConsumerConfig { * * &#064;Bean * &#064;DubboReference(group="demo", version="1.2.3") * public ReferenceBean&lt;DemoService&gt; demoService() { ...
3.26
dubbo_ReferenceAnnotationBeanPostProcessor_postProcessPropertyValues_rdh
/** * Alternatives to the {@link #postProcessProperties(PropertyValues, Object, String)}, that removed as of Spring * Framework 6.0.0, and in favor of {@link #postProcessProperties(PropertyValues, Object, String)}. * <p>In order to be compatible with the lower version of Spring, it is still retained. * * @see #pos...
3.26