ivandasch commented on a change in pull request #7751: URL: https://github.com/apache/ignite/pull/7751#discussion_r428141840
########## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java ########## @@ -1030,11 +1031,11 @@ private CancelResult removeServiceFromCache(String name) throws IgniteCheckedExc Service svc = ctx.service(); if (svc != null) { - if (!srvcCls.isAssignableFrom(svc.getClass())) + if (srvcCls.isAssignableFrom(svc.getClass())) + return (T)svc; + else if (!PlatformService.class.isAssignableFrom(svc.getClass())) Review comment: Fixed ########## File path: modules/core/src/main/java/org/apache/ignite/platform/PlatformServiceGetter.java ########## @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.platform; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation for setting mapping between java interface's method and getter of platform service property (mostly useful + * for .NET services). Name mapping is constructed by concatenating {@link PlatformServiceGetter#prefix} + * with {@link PlatformServiceGetter#value}. + * <p/> + * For example, this annotated java inerface method: + * <pre> + * @PlatformServiceGetter("SomeProperty") + * SomeProperty getSomeProperty() + * </pre> + * will be mapped to {@code get_SomeProperty} method name and corresponds to the following .NET property: + * <pre> + * SomeProperty { get; } + * </pre> + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.METHOD}) +public @interface PlatformServiceGetter { Review comment: Agree, fixed ########## File path: modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProxy.java ########## @@ -354,6 +392,49 @@ T proxy() { return proxy; } + /** + * @param mtd Method to invoke. + */ + String methodName(Method mtd) { + GridServiceMethodReflectKey mtdKey = new GridServiceMethodReflectKey(mtd.getName(), mtd.getParameterTypes()); + + return srvMtds.getOrDefault(mtdKey, mtd.getName()); Review comment: Fixed. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org