name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
Activiti_ProcessEngines_m0_rdh
/** * Get initialization results. Only info will we available for process engines which were added in the {@link ProcessEngines#init()}. No {@link ProcessEngineInfo} is available for engines which were * registered programatically. */ public static ProcessEngineInfo m0(String processEngineName) { return f0.get(p...
3.26
Activiti_MultiSchemaMultiTenantProcessEngineConfiguration_registerTenant_rdh
/** * Add a new {@link DataSource} for a tenant, identified by the provided tenantId, to the engine. * This can be done after the engine has booted up. * * Note that the tenant identifier must have been added to the {@link TenantInfoHolder} *prior* * to calling this method. */ public void registerTenant(String te...
3.26
Activiti_CommandContext_getCommand_rdh
// getters and setters // ////////////////////////////////////////////////////// public Command<?> getCommand() { return command; }
3.26
Activiti_CommandContext_addInvolvedExecution_rdh
// Involved executions //////////////////////////////////////////////////////// public void addInvolvedExecution(ExecutionEntity executionEntity) { if (executionEntity.getId() != null) { involvedExecutions.put(executionEntity.getId(), executionEntity); } }
3.26
Activiti_CommandContext_m0_rdh
/** * Stores the provided exception on this {@link CommandContext} instance. * That exception will be rethrown at the end of closing the {@link CommandContext} instance. * <p> * If there is already an exception being stored, a 'masked exception' message will be logged. */ public void m0(Throwable exception) { ...
3.26
Activiti_BpmnParser_createParse_rdh
/** * Creates a new {@link BpmnParse} instance that can be used to parse only one BPMN 2.0 process definition. */ public BpmnParse createParse() { return f0.createBpmnParse(this); }
3.26
Activiti_AbstractOperation_findFirstParentScopeExecution_rdh
/** * Returns the first parent execution of the provided execution that is a scope. */ protected ExecutionEntity findFirstParentScopeExecution(ExecutionEntity executionEntity) { ExecutionEntityManager executionEntityManager = commandContext.getExecutionEntityManager(); ExecutionEntity parentScopeExecution = n...
3.26
Activiti_AbstractOperation_executeExecutionListeners_rdh
/** * Executes the execution listeners defined on the given element, with the given event type. * Uses the {@link #execution} of this operation instance as argument for the execution listener. */ protected void executeExecutionListeners(HasExecutionListeners elementWithExecutionListeners, String eventType) { m0(...
3.26
Activiti_AbstractOperation_getCurrentFlowElement_rdh
/** * Helper method to match the activityId of an execution with a FlowElement of the process definition referenced by the execution. */ protected FlowElement getCurrentFlowElement(final ExecutionEntity execution) { if (execution.getCurrentFlowElement() != null) { return execution....
3.26
Activiti_AbstractOperation_m0_rdh
/** * Executes the execution listeners defined on the given element, with the given event type, * and passing the provided execution to the {@link ExecutionListener} instances. */ protected void m0(HasExecutionListeners elementWithExecutionListeners, ExecutionEntity executionEntity, String eventType) { command...
3.26
dubbo_AppResponse_setAttachments_rdh
/** * Append all items from the map into the attachment, if map is empty then nothing happens * * @param map * contains all key-value pairs to append */ public void setAttachments(Map<String, String> map) { this.attachments = (map == null) ? new HashMap<>() : new HashMap<>(map...
3.26
dubbo_RpcServiceContext_getLocalHostName_rdh
/** * get local host name. * * @return local host name */ @Override public String getLocalHostName() { String host = (localAddress == null) ? null : localAddress.getHostName(); if (StringUtils.isEmpty(host)) { return getLocalHost();} return host;}
3.26
dubbo_RpcServiceContext_getRemoteAddress_rdh
/** * get remote address. * * @return remote address */@Override public InetSocketAddress getRemoteAddress() { return remoteAddress; }
3.26
dubbo_RpcServiceContext_getRemoteHost_rdh
/** * get remote host. * * @return remote host */ @Override public String getRemoteHost() { return remoteAddress == null ? null : remoteAddress.getAddress() == null ? remoteAddress.getHostName() : NetUtils.filterLocalHost(remoteAddress.getAddress().getHostAddress()); }
3.26
dubbo_RpcServiceContext_getInvokers_rdh
/** * * @deprecated Replace to getUrls() */ @Override @Deprecated @SuppressWarnings({ "unchecked", "rawtypes" }) public List<Invoker<?>> getInvokers() { return (invokers == null) && (invoker != null) ? ((List) (Arrays.asList(invoker))) : invokers; }
3.26
dubbo_RpcServiceContext_getRequest_rdh
/** * Get the request object of the underlying RPC protocol, e.g. HttpServletRequest * * @return null if the underlying protocol doesn't provide support for getting request or the request is not of the specified type */ @Override @SuppressWarnings("unchecked") public <T> T getRequest(Class<T> clazz) { return (reque...
3.26
dubbo_RpcServiceContext_getLocalHost_rdh
/** * get local host. * * @return local host */ @Override public String getLocalHost() { String host = (localAddress == null) ? null : localAddress.getAddress() == null ? localAddress.getHostName() : NetUtils.filterLocalHost(localAddress.getAddress().getHostAddress()); if ((host == null) || (host.length() ...
3.26
dubbo_RpcServiceContext_getMethodName_rdh
/** * get method name. * * @return method name. */ @Override public String getMethodName() { return methodName; }
3.26
dubbo_RpcServiceContext_getResponse_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 or the response is not of the specified type */ @Override @SuppressWarnings("unchecked") public <T> T getResponse(Class<T> clazz) { return ...
3.26
dubbo_RpcServiceContext_getInvoker_rdh
/** * * @deprecated Replace to getUrl() */ @Override @Deprecated public Invoker<?> getInvoker() { return invoker; }
3.26
dubbo_RpcServiceContext_getLocalPort_rdh
/** * get local port. * * @return port */ @Override public int getLocalPort() { return localAddress == null ? 0 : localAddress.getPort(); }
3.26
dubbo_RpcServiceContext_getInvocation_rdh
/** * * @deprecated Replace to getMethodName(), getParameterTypes(), getArguments() */ @Override@Deprecated public Invocation getInvocation() { return invocation; }
3.26
dubbo_RpcServiceContext_isServerSide_rdh
/** * * @deprecated Replace to isProviderSide() */ @Override @Deprecated public boolean isServerSide() { return isProviderSide(); }
3.26
dubbo_RpcServiceContext_getRemoteHostName_rdh
/** * get remote host name. * * @return remote host name */ @Override public String getRemoteHostName() { return remoteAddress == null ? null : remoteAddress.getHostName(); }
3.26
dubbo_RpcServiceContext_getRemoteAddressString_rdh
/** * get remote address string. * * @return remote address string. */ @Override public String getRemoteAddressString() { return (getRemoteHost() + ":") + getRemotePort(); }
3.26
dubbo_RpcServiceContext_setRemoteAddress_rdh
/** * set remote address. * * @param address * @return context */ @Override public RpcServiceContext setRemoteAddress(InetSocketAddress address) { this.remoteAddress = address; return this; }
3.26
dubbo_RpcServiceContext_getParameterTypes_rdh
/** * get parameter types. * * @serial */ @Override public Class<?>[] getParameterTypes() {return parameterTypes; }
3.26
dubbo_RpcServiceContext_asyncCall_rdh
/** * one way async call, send request only, and result is not required * * @param runnable */ @Override public void asyncCall(Runnable runnable) { try { setAttachment(RETURN_KEY, Boolean.FALSE.toString()); runnable.run(); } catch (Throwable e) { ...
3.26
dubbo_RpcServiceContext_isClientSide_rdh
/** * * @deprecated Replace to isConsumerSide() */ @Override @Deprecated public boolean isClientSide() { return isConsumerSide(); }
3.26
dubbo_RpcServiceContext_setLocalAddress_rdh
/** * set local address. * * @param address * @return context */ @Override public RpcServiceContext setLocalAddress(InetSocketAddress address) { this.localAddress = address; return this; }
3.26
dubbo_RpcServiceContext_isProviderSide_rdh
/** * is provider side. * * @return provider side. */ @Override public boolean isProviderSide() { return !isConsumerSide(); }
3.26
dubbo_RpcServiceContext_isConsumerSide_rdh
/** * is consumer side. * * @return consumer side. */ @Override public boolean isConsumerSide() { return getUrl().getSide(PROVIDER_SIDE).equals(CONSUMER_SIDE); }
3.26
dubbo_RpcServiceContext_copyOf_rdh
/** * Only part of the properties are copied, the others are either not used currently or can be got from invocation. * Also see {@link RpcContextAttachment#copyOf(boolean)} * * @param needCopy * @return a shallow copy of RpcServiceContext */ public RpcServiceContext copyOf(boolean needCopy) { if (needCopy) { Rpc...
3.26
dubbo_RegistryManager_reset_rdh
/** * Reset state of AbstractRegistryFactory */ public void reset() { f0.set(false); registries.clear(); }
3.26
dubbo_RegistryManager_getRegistries_rdh
/** * Get all registries * * @return all registries */ public Collection<Registry> getRegistries() { return Collections.unmodifiableCollection(new LinkedList<>(registries.values())); }
3.26
dubbo_RegistryManager_destroyAll_rdh
/** * Close all created registries */ public void destroyAll() { if (!f0.compareAndSet(false, true)) {return; } if (LOGGER.isInfoEnabled()) {LOGGER.info("Close all registries " + getRegistries()); } // Lock up the registry shutdown process lock.lock(); try { for (Registry registry : getRegistries()) ...
3.26
dubbo_NacosConfigServiceWrapper_handleInnerSymbol_rdh
/** * see {@link com.alibaba.nacos.client.config.utils.ParamUtils#isValid(java.lang.String)} */ private String handleInnerSymbol(String data) { if (data == null) { return null; } return data.replace(INNERCLASS_SYMBOL, INNERCLASS_COMPATIBLE_SYMBOL).replace(SLASH_CHAR, HYPHEN_CHAR);}
3.26
dubbo_AbstractInterfaceBuilder_local_rdh
/** * * @param local * @see AbstractInterfaceBuilder#stub(Boolean) * @deprecated Replace to <code>stub(Boolean)</code> */ @Deprecated public B local(Boolean local) { if (local != null) {this.local = local.toString(); } else { this.local = null; } return getThis(); }
3.26
dubbo_ConfigurableSourceBeanMetadataElement_setSource_rdh
/** * Set the source into the specified {@link BeanMetadataElement} * * @param beanMetadataElement * {@link BeanMetadataElement} instance */ default void setSource(BeanMetadataElement beanMetadataElement) { if (beanMetadataElement instanceof BeanMetadataAttributeAccessor) { ((BeanMetadataAttributeAc...
3.26
dubbo_CallbackServiceCodec_referOrDestroyCallbackService_rdh
/** * refer or destroy callback service on server side * * @param url */ @SuppressWarnings("unchecked") private Object referOrDestroyCallbackService(Channel channel, URL url, Class<?> clazz, Invocation inv, int instid, boolean isRefer) { Object proxy; String invokerCacheKey = getServerSideCallbackInvokerCac...
3.26
dubbo_CallbackServiceCodec_m0_rdh
/** * export or unexport callback service on client side * * @param channel * @param url * @param clazz * @param inst * @param export * @throws IOException */ @SuppressWarnings({ "unchecked", "rawtypes" }) private String m0(Channel channel, RpcInvocation inv, URL url, Class clazz, Object inst, Boolean export...
3.26
dubbo_AbstractTripleReactorSubscriber_subscribe_rdh
/** * Binding the downstream, and call subscription#request(1). * * @param downstream * downstream */ public void subscribe(final CallStreamObserver<T> downstream) { if (downstream == null) { throw new NullPointerException(); } if ((this.downstream == null) && SUBSCRIBED.compareAndSe...
3.26
dubbo_DubboBootstrapApplicationListener_isOriginalEventSource_rdh
/** * Is original {@link ApplicationContext} as the event source * * @param event * {@link ApplicationEvent} * @return if original, return <code>true</code>, or <code>false</code> */ private boolean isOriginalEventSource(ApplicationEvent event) { boolean originalEventSource = nullSafeEquals(getApplicat...
3.26
dubbo_URLParam_addParameter_rdh
/** * Add parameters to a new URLParam. * * @param key * key * @param value * value * @return A new URLParam */ public URLParam addParameter(String key, String value) { if (StringUtils.isEmpty(key) || StringUtils.isEmpty(value)) { return this; } return addParameters(Collections.singletonMap(key, value)); }
3.26
dubbo_URLParam_parse_rdh
/** * Parse URLParam * Init URLParam by constructor is not allowed * * @param params * params map added into URLParam * @param rawParam * original rawParam string, directly add to rawParam field, * will not affect real key-pairs store in URLParam. * Please make sure it can correspond with params or wil...
3.26
dubbo_URLParam_addParametersIfAbsent_rdh
/** * Add absent parameters to a new URLParam. * * @param parameters * parameters in key-value pairs * @return A new URL */ public URLParam addParametersIfAbsent(Map<String, String> parameters) { if (CollectionUtils.isEmptyMap(parameters)) { return this; } return doAddParameters(parameters, true); }
3.26
dubbo_URLParam_getAnyMethodParameter_rdh
/** * Get any method related parameter which match key * * @param key * key * @return result ( if any, random choose one ) */ public String getAnyMethodParameter(String key) { Map<String, String> methodMap = f1.get(key); if (CollectionUtils.isNotEmptyMap(methodMap)) { String methods = getParameter(METHODS...
3.26
dubbo_URLParam_hasParameter_rdh
/** * check if specified key is present in URLParam * * @param key * specified key * @return present or not */ public boolean hasParameter(String key) { int keyIndex = DynamicParamTable.getKeyIndex(enableCompressed, key); if (keyIndex < 0) { return f0.containsKey(key); } return KEY.g...
3.26
dubbo_URLParam_addParameterIfAbsent_rdh
/** * Add absent parameters to a new URLParam. * * @param key * key * @param value * value * @return A new URLParam */ public URLParam addParameterIfAbsent(String key, String value) { if (StringUtils.isEmpty(key) || StringUtils.isEmpty(value)) { return this; } if (hasParameter(key)) { return this; } return ...
3.26
dubbo_URLParam_addParameters_rdh
/** * Add parameters to a new URLParam. * If key-pair is present, this will cover it. * * @param parameters * parameters in key-value pairs * @return A new URLParam */ public URLParam addParameters(Map<String, String> parameters) { if (CollectionUtils.isEmptyMap(parameters)) { return this; } boolean hasAndEqu...
3.26
dubbo_URLParam_removeParameters_rdh
/** * remove specified parameters in URLParam * * @param keys * keys to being removed * @return A new URLParam */ public URLParam removeParameters(String... keys) { if ((keys == null) || (keys.length == 0)) { return this; } // lazy init, null if no modify BitSet newKey = null; int[] v60 = null; Map<String, Stri...
3.26
dubbo_URLParam_getParameter_rdh
/** * get value of specified key in URLParam * * @param key * specified key * @return value, null if key is absent */ public String getParameter(String key) { int keyIndex = DynamicParamTable.getKeyIndex(enableCompressed, key); if (keyIndex < 0) { return f0.get(key); }if (KEY.get(key...
3.26
dubbo_URLParam_getMethodParameterStrict_rdh
/** * Get method related parameter. If not contains, return null. * Specially, in some situation like `method1.1.callback=true`, key is `1.callback`. * * @param method * method name * @param key * key * @return value */ public String getMethodParameterStrict(String method, String key) { String methodsS...
3.26
dubbo_URLParam_getRawParam_rdh
/** * get raw string like parameters * * @return raw string like parameters */ public String getRawParam() { if (StringUtils.isNotEmpty(rawParam)) {return rawParam; } else { // empty if parameters have been modified or init by Map return toString(); } }
3.26
dubbo_URLParam_getMethodParameter_rdh
/** * Get method related parameter. If not contains, use getParameter(key) instead. * Specially, in some situation like `method1.1.callback=true`, key is `1.callback`. * * @param method * method name * @param key * key * @return value */ public String getMethodParameter(String method, String key) { Str...
3.26
dubbo_URLParam_getParameters_rdh
/** * Get a Map like URLParam * * @return a {@link URLParamMap} adapt to URLParam */ public Map<String, String> getParameters() { return new URLParamMap(this); }
3.26
dubbo_ThreadLocalCache_get_rdh
/** * API to return stored value using a key against the calling thread specific store. * * @param key * Unique identifier for cache lookup * @return Return stored object against key */ @Override public Object get(Object key) { return store.get().get(key); }
3.26
dubbo_ThreadLocalCache_put_rdh
/** * API to store value against a key in the calling thread scope. * * @param key * Unique identifier for the object being store. * @param value * Value getting store */ @Override public void put(Object key, Object value) { store.get().put(key, value); }
3.26
dubbo_HeaderExchangeServer_calculateLeastDuration_rdh
/** * Each interval cannot be less than 1000ms. */ private long calculateLeastDuration(int time) { if ((time / HEARTBEAT_CHECK_TICK) <= 0) { return LEAST_HEARTBEAT_DURATION; } else { return time / HEARTBEAT_CHECK_TICK; } }
3.26
dubbo_HttpMessageCodecManager_typeJudge_rdh
/** * if content-type is null or all ,will judge media type by class type * * @param mediaType * @param bodyType * @param httpMessageCodec * @return */ private static boolean typeJudge(MediaType mediaType, Class<?> bodyType, HttpMessageCodec httpMessageCodec) { return ((MediaType.ALL_VALUE.equals(mediaType...
3.26
dubbo_SingleRouterChain_initWithRouters_rdh
/** * the resident routers must being initialized before address notification. * only for ut */ public void initWithRouters(List<Router> builtinRouters) { this.builtinRouters = builtinRouters; this.routers = new LinkedList<>(builtinRouters);}
3.26
dubbo_SingleRouterChain_setInvokers_rdh
/** * Notify router chain of the initial addresses from registry at the first time. * Notify whenever addresses in registry change. */ public void setInvokers(BitList<Invoker<T>> invokers) { this.invokers = (invokers == null) ? BitList.emptyList() : invokers; f1.forEach(router -> router.notify(this.invokers)...
3.26
dubbo_SingleRouterChain_printRouterSnapshot_rdh
/** * store each router's input and output, log out if empty */ private void printRouterSnapshot(URL url, BitList<Invoker<T>> availableInvokers, Invocation invocation) { if (logger.isWarnEnabled()) { logRouterSnapshot(url, invocation, buildRouterSnapshot(url, availableInvokers, invocation)); } ...
3.26
dubbo_SingleRouterChain_buildRouterSnapshot_rdh
/** * Build each router's result */ public RouterSnapshotNode<T> buildRouterSnapshot(URL url, BitList<Invoker<T>> availableInvokers, Invocation invocation) { BitList<Invoker<T>> resultInvokers = availableInvokers.clone();RouterSnapshotNode<T> parentNod...
3.26
dubbo_SingleRouterChain_addRouters_rdh
/** * If we use route:// protocol in version before 2.7.0, each URL will generate a Router instance, so we should * keep the routers up to date, that is, each time router URLs changes, we should update the routers list, only * keep the builtinRouters which are available all the time and the latest notified routers w...
3.26
dubbo_SingleRouterChain_setHeadStateRouter_rdh
/** * for uts only */ @Deprecated public void setHeadStateRouter(StateRouter<T> headStateRouter) { this.headStateRouter = headStateRouter; }
3.26
dubbo_ThrowableConsumer_execute_rdh
/** * Executes {@link ThrowableConsumer} * * @param t * the function argument * @param consumer * {@link ThrowableConsumer} * @param <T> * the source type */ static <T> void execute(T t, ThrowableConsumer<T> consumer) { consumer.execute(t); }
3.26
dubbo_ModuleServiceRepository_registerService_rdh
/** * See {@link #registerService(Class)} * <p> * we assume: * 1. services with different interfaces are not allowed to have the same path. * 2. services share the same interface but has different group/version can share the same path. * 3. path's default value is the name of the interface. * * @param path * @...
3.26
dubbo_ModuleServiceRepository_registerConsumer_rdh
/** * * @deprecated Replaced to {@link ModuleServiceRepository#registerConsumer(ConsumerModel)} */ @Deprecated public void registerConsumer(String serviceKey, ServiceDescriptor serviceDescriptor, ReferenceConfigBase<?> rc, Object proxy, ServiceMetadata serviceMetadata) { ClassLoader classLoader = null; ...
3.26
dubbo_ModuleServiceRepository_lookupReferredService_rdh
/** * * @deprecated Replaced to {@link ModuleServiceRepository#lookupReferredServices(String)} */ @Deprecated public ConsumerModel lookupReferredService(String serviceKey) { if (consumers.containsKey(serviceKey)) { List<ConsumerModel> consumerModels = consumers.get(serviceKey); return consumerMod...
3.26
dubbo_ModuleServiceRepository_registerProvider_rdh
/** * * @deprecated Replaced to {@link ModuleServiceRepository#registerProvider(ProviderModel)} */ @Deprecated public void registerProvider(String serviceKey, Object serviceInstance, ServiceDescriptor serviceModel, ServiceConfigBase<?> serviceConfig, ServiceMetadata serviceMetadata) { ClassLoader classLoader =...
3.26
dubbo_ProtocolConfig_getDispather_rdh
/** * typo, switch to use {@link #getDispatcher()} * * @deprecated {@link #getDispatcher()} */ @Deprecated @Parameter(excluded = true, attribute = false) public String getDispather() { return m5(); }
3.26
dubbo_MeshRuleRouter_getRemoteAppName_rdh
/** * for ut only */ @Deprecated public Set<String> getRemoteAppName() { return remoteAppName; }
3.26
dubbo_MeshRuleRouter_getInvokerList_rdh
/** * for ut only */ @Deprecated public BitList<Invoker<T>> getInvokerList() { return invokerList; }
3.26
dubbo_MeshRuleRouter_computeDestination_rdh
/** * Compute Destination Subset */ protected String computeDestination(MeshRuleCache<T> meshRuleCache, String appName, DubboDestination dubboDestination, BitList<Invoker<T>> availableInvokers) throws RpcException { String subset = dubboDestination.getSubset(); do { BitList<Invoker<T>> result = meshR...
3.26
dubbo_MeshRuleRouter_getDubboRoute_rdh
/** * Match virtual service (by serviceName) */ protected DubboRoute getDubboRoute(VirtualServiceRule virtualServiceRule, Invocation invocation) {String v10 = invocation.getServiceName(); VirtualServiceSpec spec = virtualServiceRule.getSpec(); List<DubboRoute> dubboRouteList = spec.getDubbo(); if (Collect...
3.26
dubbo_MeshRuleRouter_randomSelectDestination_rdh
/** * Find out target invokers from RouteDestination */ protected String randomSelectDestination(MeshRuleCache<T> meshRuleCache, String appName, List<DubboRouteDestination> routeDestination, BitList<Invoker<T>> availableInvokers) throws RpcException { // randomly select one DubboRouteDestination from list by we...
3.26
dubbo_MeshRuleRouter_getDubboRouteDestination_rdh
/** * Match route detail (by params) */ protected List<DubboRouteDestination> getDubboRouteDestination(DubboRoute dubboRoute, Invocation invocation) { List<DubboRouteDetail> dubboRouteDetailList = dubboRoute.getRoutedetail(); if (CollectionUtils.isNotEmpty(dubboRouteDetailList)) { for (DubboRouteDeta...
3.26
dubbo_MeshRuleRouter_getMeshRuleCache_rdh
/** * for ut only */ @Deprecated public MeshRuleCache<T> getMeshRuleCache() {return meshRuleCache; }
3.26
dubbo_FrameworkModelCleaner_destroyProtocols_rdh
/** * Destroy all the protocols. */ private void destroyProtocols(FrameworkModel frameworkModel) { if (protocolDestroyed.compareAndSet(false, true)) { ExtensionLoader<Protocol> loader = frameworkModel.getExtensionLoader(Protocol.class);for (String protocolName : loader.getLoadedExtensions()) { ...
3.26
dubbo_DefaultModuleDeployer_prepare_rdh
/** * Prepare for export/refer service, trigger initializing application and module */ @Overridepublic void prepare() { applicationDeployer.initialize(); this.initialize(); }
3.26
dubbo_RdsRouteRuleManager_getRuleListeners_rdh
// for test static ConcurrentHashMap<String, Set<XdsRouteRuleListener>> getRuleListeners() { return RULE_LISTENERS; }
3.26
dubbo_ScopeModel_getDesc_rdh
/** * * @return to describe string of this scope model */ public String getDesc() { if (this.desc == null) { this.desc = buildDesc(); } return this.desc; }
3.26
dubbo_ScopeModel_initialize_rdh
/** * NOTE: * <ol> * <li>The initialize method only be called in subclass.</li> * <li> * In subclass, the extensionDirector and beanFactory are available in initialize but not available in constructor. * </li> * </ol> */ protected void initialize() { synchronized(instLock) { this.extensionDirector ...
3.26
dubbo_ScopeModel_getModelEnvironment_rdh
/** * Get current model's environment. * * @see <a href="https://github.com/apache/dubbo/issues/12542">Configuration refresh issue</a> * @deprecated use modelEnvironment() instead */ @Deprecated public final Environment getModelEnvironment() { try { return modelEnvironment(); } catch (Exception ex) { retur...
3.26
dubbo_DubboRelaxedBindingAutoConfiguration_dubboBasePackages_rdh
/** * The bean is used to scan the packages of Dubbo Service classes * * @param environment * {@link Environment} instance * @return non-null {@link Set} * @since 2.7.8 */ @ConditionalOnMissingBean(name = BASE_PACKAGES_BEAN_NAME) @Bean(name = BASE_PACKAGES_BEAN_NAME) public Set<String> dubboBasePackages(Enviro...
3.26
dubbo_ServiceDiscovery_isAvailable_rdh
/** * Get services is the default way for service discovery to be available */ default boolean isAvailable() { return (!isDestroy()) && CollectionUtils.isNotEmpty(getServices()); }
3.26
dubbo_ServiceDiscovery_removeServiceInstancesChangedListener_rdh
/** * unsubscribe to instance change event. * * @param listener * @throws IllegalArgumentException */ default void removeServiceInstancesChangedListener(ServiceInstancesChangedListener listener) throws IllegalArgumentException { }
3.26
dubbo_ReactorServerCalls_oneToMany_rdh
/** * Implements a unary -> stream call as Mono -> Flux * * @param request * request * @param responseObserver * response StreamObserver * @param func * service implementation */ public static <T, R> void oneToMany(T request, StreamObserver<R> responseObserver, Function<Mono<T>, Flux<R>> func) { try ...
3.26
dubbo_ReactorServerCalls_manyToOne_rdh
/** * Implements a stream -> unary call as Flux -> Mono * * @param responseObserver * response StreamObserver * @param func * service implementation * @return request StreamObserver */ public static <T, R> StreamObserver<T> manyToOne(StreamObserver<R> responseObserver, Function<Flux<T>, Mono<R>> func) { ...
3.26
dubbo_ReactorServerCalls_oneToOne_rdh
/** * Implements a unary -> unary call as Mono -> Mono * * @param request * request * @param responseObserver * response StreamObserver * @param func * service implementation */ public static <T, R> void oneToOne(T request, StreamObserver<R> responseObserver, Function<Mono<T>, Mono<R>> func) { func....
3.26
dubbo_ReactorServerCalls_manyToMany_rdh
/** * Implements a stream -> stream call as Flux -> Flux * * @param responseObserver * response StreamObserver * @param func * service implementation * @return request StreamObserver */ public static <T, R> StreamObserver<T> manyToMany(StreamObserver<R> responseObserver, Function<Flux<T>, Flux<R>> func) { ...
3.26
dubbo_PojoUtils_getKeyTypeForMap_rdh
/** * Get key type for {@link Map} directly implemented by {@code clazz}. * If {@code clazz} does not implement {@link Map} directly, return {@code null}. * * @param clazz * {@link Class} * @return Return String.class for {@link com.alibaba.fastjson.JSONObject} */private static Type getKeyTypeForMap(Class<?> c...
3.26
dubbo_PojoUtils_mapToPojo_rdh
/** * convert map to a specific class instance * * @param map * map wait for convert * @param cls * the specified class * @param <T> * the type of {@code cls} * @return class instance declare in param {@code cls} * @throws ReflectiveOperationException * if the instance creation is failed * @since 2....
3.26
dubbo_PojoUtils_getGenericClassByIndex_rdh
/** * Get parameterized type * * @param genericType * generic type * @param index * index of the target parameterized type * @return Return Person.class for List<Person>, return Person.class for Map<String, Person> when index=0 */ private static Type getGenericClassByIndex(Type genericType, int index) { ...
3.26
dubbo_PojoUtils_getDefaultValue_rdh
/** * return init value * * @param parameterType * @return */ private static Object getDefaultValue(Class<?> parameterType) { if ("char".equals(parameterType.getName())) { return Character.MIN_VALUE; } if ("boolean".equals(parameterType.getName())) { return false; } if ("byte".e...
3.26
dubbo_PojoUtils_updatePropertyIfAbsent_rdh
/** * Update the property if absent * * @param getterMethod * the getter method * @param setterMethod * the setter method * @param newValue * the new value * @param <T> * the value type * @since 2.7.8 */ public static <T> void updatePropertyIfAbsent(Supplier<T> getterMethod, Consumer<T> setterMethod...
3.26
dubbo_AbstractServiceRestMetadataResolver_postProcessRestMethodMetadata_rdh
/** * Post-Process for {@link RestMethodMetadata}, sub-type could override this method for further works * * @param processingEnv * {@link ProcessingEnvironment} * @param serviceType * The type that @Service annotated * @param method * The public method of <code>serviceType</code> * @param metadata * ...
3.26
dubbo_AbstractServiceRestMetadataResolver_findRestCapableMethod_rdh
/** * Find the method with the capable for REST from the specified service method and its override method * * @param processingEnv * {@link ProcessingEnvironment} * @param serviceType * @param serviceInterfaceType * @param serviceMethod * @return <code>null</code> if can't be found */ private ExecutableEleme...
3.26
dubbo_Configurator_toConfigurators_rdh
/** * Convert override urls to map for use when re-refer. Send all rules every time, the urls will be reassembled and * calculated * * URL contract: * <ol> * <li>override://0.0.0.0/...( or override://ip:port...?anyhost=true)&para1=value1... means global rules * (all of the provide...
3.26