hazelcast-imap

why hazelcast can not query incorrect result with imap and hazelcastjsonvalue

北战南征 提交于 2021-01-29 07:34:00
问题 I use IMap store data in hazelcast, key is a string, value is a hazelcastjsonvalue. code example: ` Gson gson = new Gson(); String json = "{\"orderId\":\"-20200822-221116-188-quote-100002\",\"securityId\":\"130015\",\"tradingAccount\":\"xtrinterbanktra01\",\"subSystemId\":\"QDM-ESP\",\"userId\":\"xtrinterbankat01\",\"securityExchange\":\"B\",\"systemNodeId\":710,\"quoteId\":\"1598145974197\",\"execId\":\"22550774606679263\",\"investAccount\":\"xtrinterbankinvest01\",\"productAccount\":\

Prevent hazelcast to register EvictionListener on every node

陌路散爱 提交于 2020-01-24 21:05:08
问题 We currently having an issue that we configure a map entry listener for a specific map in the Hazelcast Config Bean. The problem we have is that the listener is instanciated on every node what make sense and is right with our implementation but actually it is not what we try to achieve. Is there a way to just add a listener on a map for just one cluster node or the cluster itself so when the entry is evicted there is only one listener registered to the map? To be clear: There are 12 Servers

Prevent hazelcast to register EvictionListener on every node

旧城冷巷雨未停 提交于 2020-01-24 21:04:06
问题 We currently having an issue that we configure a map entry listener for a specific map in the Hazelcast Config Bean. The problem we have is that the listener is instanciated on every node what make sense and is right with our implementation but actually it is not what we try to achieve. Is there a way to just add a listener on a map for just one cluster node or the cluster itself so when the entry is evicted there is only one listener registered to the map? To be clear: There are 12 Servers

Controlled partitioning and MapStore

可紊 提交于 2020-01-16 16:53:46
问题 Lets say, I have several Hazelcast members (servers) spread across world (e.g. Germany, Russia and etc). It was required to store/split data in database by region and all data should be accessible from any server via IMap backed by MapStore . I recently read this article which fulfills my requirement, but I am not sure about how will MapStore behave. Crucial moment is that, if member1 (e.g. Russia) requests data from IMap with key owned by member2 (e.g. Germany), on which side MapStore.load()

Controlled partitioning and MapStore

醉酒当歌 提交于 2020-01-16 16:52:08
问题 Lets say, I have several Hazelcast members (servers) spread across world (e.g. Germany, Russia and etc). It was required to store/split data in database by region and all data should be accessible from any server via IMap backed by MapStore . I recently read this article which fulfills my requirement, but I am not sure about how will MapStore behave. Crucial moment is that, if member1 (e.g. Russia) requests data from IMap with key owned by member2 (e.g. Germany), on which side MapStore.load()

Not able to retrieve element from Hazelcast's Map if using custom object as a key

╄→尐↘猪︶ㄣ 提交于 2019-12-24 05:46:04
问题 I am using Hazelast Map and trying to store Objects against key which is object of my custom class i.e. HMapKey . Here is snippet of HMapKey class. public class HMapKey implements Serializable{ private String keyCode; private long time; public HMapKey(String keyCode, long time) { this.keyCode = keyCode; this.time = time; } public String getKeyCode() { return keyCode; } public void setKeyCode(String keyCode) { this.keyCode = keyCode; } public long getTime() { return time; } public void setTime

Setting TTL/Record Expiry in hazelcast

夙愿已清 提交于 2019-12-23 17:51:45
问题 Is there any way to set TTL per record in hazelcast DB?Preferably in Map or Ringbuffer. 回答1: I guess you're looking for that: IMap::put(Key, Value, TTL, TimeUnit) IMap: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#evicting-specific-entries http://docs.hazelcast.org/docs/3.6/javadoc/com/hazelcast/core/IMap.html#put(K,%20V,%20long,%20java.util.concurrent.TimeUnit) http://docs.hazelcast.org/docs/3.6/javadoc/com/hazelcast/core/IMap.html#putAsync(K,%20V,%20long,%20java.util

hazelcast - is there a way to iterate over a map keys and/or values to query

我怕爱的太早我们不能终老 提交于 2019-12-12 17:21:20
问题 I have an class that has a map as one of its fields. Is there a way in Hazelcast using predicates to query for object where the key in the map has the values I am looking for? 回答1: Queries on maps are not yet implemented (as they are out of the box for lists / arrays). It is, however, possible to implement your own ValueExtractor to extract the values from the map based on your key. http://docs.hazelcast.org/docs/3.8/manual/html-single/index.html#custom-attributes 来源: https://stackoverflow

Size of Predicate results in Hazelcast

﹥>﹥吖頭↗ 提交于 2019-12-11 05:06:45
问题 What is the best way of finding size of a predicate results in hazelcast IMap? There is no direct size support in MapProxyImpl.java and size() will be calculated on returned collection which in undesired in this case. Do you have any recommendations ? Thanks. 回答1: You're probably looking for an IMap::size(Predicate) overload which is not yet available, anyhow it sounds like a nice feature. Would you like to create a feature request for that? To solve the problem at the moment, I guess the

Hazelcast performing slower

强颜欢笑 提交于 2019-12-10 23:50:58
问题 We are trying to use Hazelcast as distributed cache in our application. Here is our config: <hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.7.xsd" xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <group> <name>sample_dev</name> <password>dev@123</password> </group> <management-center enabled="false">http://localhost:8080/mancenter</management-center> <properties> <property name="hazelcast.logging