我们最近将版本从Hazelcast 3.2跳到了3.7。在3.2版本中,我们可以通过重写HazelcastInstance (属性)来为WebFilter创建一个getInstance,而不是使用(默认的) XML builder。http://docs.hazelcast.org/docs/3.2/javadoc/com/hazelcast/web/WebFilter.html
这使我们可以使用编程API以自己的方式配置WebFilter,而不必手动编辑hazelcast XML文件或使用多播。
在3.7中,这看起来已经被删除了,并且似乎没有一种不同的直接方法来使用WebFilter的编程应用程序接口。
有没有不同的方法可以使用编程应用程序接口来创建我所缺少的WebFilter的HazelcastInstance?
发布于 2016-11-02 04:39:07
这是你需要的吗?
Properties properties = new Properties();
properties.put("instance-name", hazelcastInstance.getName());
WebFilter webFilter = new WebFilter(properties);通过XML或以编程方式创建Hazelcast实例,并通过属性传递给WebFilter的构造函数。
https://stackoverflow.com/questions/40362698
复制相似问题