从 gridgain 移植到 ignite - 这些 gridgain 方法的 ignite 等价物是什么

Porting from gridgain to ignite - what the ignite equivalents for these gridgain methods

在将我们的代码库从 gridgain 移植到 ignite 时,我发现了大多数 ignite 方法的相似/重命名方法。不过,有一些我需要澄清。

  1. 的点燃等效物是多少
        //Listener for asynchronous local node grid events. You can subscribe for local node grid event notifications via {@link GridEventStorageManager#addLocalEventListener
        public interface GridLocalEventListener extends EventListener {}
    
  2. 调用计算未来的推荐方法是什么。编译失败见图片。

除此之外,future.listenAsync() 看起来应该是 future.listen()

        final ProcessingTaskAdapter taskAdapter = new ProcessingTaskAdapter(task, manager, node);
        ComputeTaskFuture<ProcessingJob> future = grid.cluster()
                .forPredicate(this) //===> what should this be
                .compute().execute(taskAdapter, job);
        future.listen(new IgniteInClosure<IgniteFuture<ProcessingJob>>() {
            @Override
            public void apply(IgniteFuture<ProcessingJob> future) {
                try {
                    // Need this to extract the remote exception, if one occurred
                    future.get();
                } catch (IgniteException e) {
                    manager.fail(e.getCause() != null ? e.getCause() : e);
                } finally {
                    manager.finishJob(job);
                    jobDistributor.distribute(taskAdapter.getSelectedNode());
                }
            }

  1. 没有什么特殊的class了,你只要用IgnitePredicate作为监听器就行了。详见[1]

  2. 有关异步支持的信息,请参阅 [2]。另请注意,投影已替换为集群组 [3](您的编译错误之一就是因为这个)。你是对的,listenAsync 已重命名为 listen

[1] https://apacheignite.readme.io/docs/events

[2]https://apacheignite.readme.io/docs/async-support

[3]https://apacheignite.readme.io/docs/cluster-groups