com.hazelcast.config.Config.getUserContext()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中com.hazelcast.config.Config.getUserContext()方法的一些代码示例,展示了Config.getUserContext()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.getUserContext()方法的具体详情如下:
包路径:com.hazelcast.config.Config
类名称:Config
方法名:getUserContext

Config.getUserContext介绍

[英]Returns the user supplied context. This context can then be obtained from an instance of com.hazelcast.core.HazelcastInstance.
[中]返回用户提供的上下文。然后可以从com实例中获取该上下文。黑泽尔卡斯特。果心例如,黑泽尔卡斯特。

代码示例

代码示例来源:origin: com.hazelcast/hazelcast-all

@Override
public ConcurrentMap<String, Object> getUserContext() {
  return staticConfig.getUserContext();
}

代码示例来源:origin: hazelcast/hazelcast-jet

@Override
public ConcurrentMap<String, Object> getUserContext() {
  return staticConfig.getUserContext();
}

代码示例来源:origin: hazelcast/hazelcast-code-samples

public static void main(String[] args) {
    EchoService echoService = new EchoService();

    Config config = new Config();
    config.getUserContext().put("echoService", echoService);
    HazelcastInstance hz = Hazelcast.newHazelcastInstance(config);

    IExecutorService executor = hz.getExecutorService("echoExecutor");
    executor.execute(new EchoTask("hello"));

    Hazelcast.shutdownAll();
  }
}

代码示例来源:origin: hazelcast/hazelcast-jet

this.userContext.putAll(config.getUserContext());
this.node = createNode(config, nodeContext);

代码示例来源:origin: com.hazelcast/hazelcast-all

this.userContext.putAll(config.getUserContext());
this.node = createNode(config, nodeContext);

相关文章

微信公众号

最新文章

更多

Config类方法