如果我有一个界面
public interface TestService {
public String getSomething();
}
和一堂课
import org.apache.ignite.services.Service;
import org.apache.ignite.services.ServiceContext;
public class TestServiceImpl implements Service, TestService {
@Override
public void init(ServiceContext ctx) throws Exception {
}
@Override
public void execute(ServiceContext ctx) throws Exception {
}
@Override
public void cancel(ServiceContext ctx) {
}
@Override
public String getSomething() {
return "HelloWorld";
}
}
我将此服务部署在 ignite 服务器节点上
// Deploy services only on server nodes.
IgniteServices serverSvcs = ignite.services(ignite.cluster().forServers());
// Deploy cluster singleton.
serverSvcs.deployClusterSingleton("TestService", new TestServiceImpl());
并点燃客户端节点尝试获取服务
TestService testSvc = mIgnite.services().serviceProxy("TestService", TestService.class, false);
如果客户端节点不包含“TestServiceImpl”类,
将捕获异常消息:“无法找到具有给定类加载器的类以进行解组(确保所有类的相同版本在所有节点上可用或启用对等类加载)”,
ignite 客户端节点是否必须具有类 TestServiceImpl ?