简体   繁体   English

使用扩展TreeMap和Hazelcast TreeMap,充当Hazelcast分布式Map。

[英]Using Extended TreeMap with Hazelcast TreeMap, Act as Hazelcast distributed Map.

I have one my own extended TreeMap named MyTreeMap which is used to create TreeMap dynamically based on the DAO passed as parameter MyTreeMap. 我有一个名为MyTreeMap的扩展TreeMap,它用于根据作为参数MyTreeMap传递的DAO动态创建TreeMap。 Also, Hazelcast provides its own TreeMap which we can have by creating instance of the Hazelcast. 此外,Hazelcast提供了自己的TreeMap,我们可以通过创建Hazelcast实例来实现。 like instance = Hazelcast.getMap("HazelcastTreeMap"); like instance = Hazelcast.getMap(“HazelcastTreeMap”);

How i can achieve my own treemap "MyTreeMap" act as the Hazelcast treemap, not losing any of the extended properties. 如何实现我自己的树形图“MyTreeMap”充当Hazelcast树形图,而不会丢失任何扩展属性。 possessing both fetures of both TreeMaps. 拥有两个TreeMaps的两个部分。

Hazelcast 3 has introduced the SPI. Hazelcast 3推出了SPI。 Hazelcast has a lot of distributed data-structures and they all use a common lower level infrastructure. Hazelcast拥有大量分布式数据结构,它们都使用通用的低级基础架构。 We have pulled up this infrastructure in user space and called it the SPI. 我们已经在用户空间中提升了这个基础设施并将其称为SPI。

Using this SPI you can now create your own distributed data-structures like the TreeMap. 使用此SPI,您现在可以创建自己的分布式数据结构,如TreeMap。 But you can also make other distributed services, eg a distributed actors implementation. 但您也可以创建其他分布式服务,例如分布式actor实现。 So you are not longer limited by what Hazelcast provided, but only by your own imagination :) 因此,您不再受Hazelcast提供的限制,只能通过您自己的想象力:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM