@Test public void testMapEntryListener() { IMap<String, String> map = getHazelcastClient().getMap("testMapEntryListener"); final CountDownLatch latchAdded = new CountDownLatch(1); final CountDownLatch latchRemoved = new CountDownLatch(1); final CountDownLatch latchUpdated = new CountDownLatch(1); map.addEntryListener(new EntryListener<String, String>() { public void entryAdded(EntryEvent<String, String> event) { assertEquals("world", event.getValue()); assertEquals("hello", event.getKey()); latchAdded.countDown(); } public void entryRemoved(EntryEvent<String, String> event) { assertEquals("hello", event.getKey()); assertEquals("new world", event.getValue()); latchRemoved.countDown(); } public void entryUpdated(EntryEvent<String, String> event) { assertEquals("world", event.getOldValue()); assertEquals("new world", event.getValue()); assertEquals("hello", event.getKey()); latchUpdated.countDown(); } public void entryEvicted(EntryEvent<String, String> event) { entryRemoved(event); } }, true); map.put("hello", "world"); map.put("hello", "new world"); map.remove("hello"); try { assertTrue(latchAdded.await(5, TimeUnit.SECONDS)); assertTrue(latchUpdated.await(10, TimeUnit.SECONDS)); assertTrue(latchRemoved.await(10, TimeUnit.SECONDS)); } catch (InterruptedException e) { e.printStackTrace(); fail(e.getMessage()); } }
public <K, V> IMap<K, V> getMap(String name) { return (IMap<K, V>) getClientProxy(Prefix.MAP + name); }
HazelcastClient implements HazelcastInstance { public <K, V> IMap<K, V> getMap(String name) { return (IMap<K, V>) getClientProxy(Prefix.MAP + name); } }
HazelcastClient implements HazelcastInstance { public <K, V> IMap<K, V> getMap(String name) { return (IMap<K, V>) getClientProxy(Prefix.MAP + name); } private  HazelcastClient(ClientConfig config); }
HazelcastClient implements HazelcastInstance { public <K, V> IMap<K, V> getMap(String name) { return (IMap<K, V>) getClientProxy(Prefix.MAP + name); } private  HazelcastClient(ClientConfig config); InRunnable getInRunnable(); OutRunnable getOutRunnable(); static HazelcastClient newHazelcastClient(ClientConfig config); Config getConfig(); PartitionService getPartitionService(); ClientService getClientService(); LoggingService getLoggingService(); IMap<K, V> getMap(String name); Object getClientProxy(Object o); com.hazelcast.core.Transaction getTransaction(); ConnectionManager getConnectionManager(); void addInstanceListener(InstanceListener instanceListener); Cluster getCluster(); ExecutorService getExecutorService(); ExecutorService getExecutorService(String name); IdGenerator getIdGenerator(String name); AtomicNumber getAtomicNumber(String name); ICountDownLatch getCountDownLatch(String name); ISemaphore getSemaphore(String name); Collection<Instance> getInstances(); IList<E> getList(String name); ILock getLock(Object obj); MultiMap<K, V> getMultiMap(String name); String getName(); IQueue<E> getQueue(String name); ISet<E> getSet(String name); ITopic<E> getTopic(String name); void removeInstanceListener(InstanceListener instanceListener); static void shutdownAll(); static Collection<HazelcastClient> getAllHazelcastClients(); void shutdown(); boolean isActive(); void restart(); LifecycleService getLifecycleService(); ClientConfig getClientConfig(); }
HazelcastClient implements HazelcastInstance { public <K, V> IMap<K, V> getMap(String name) { return (IMap<K, V>) getClientProxy(Prefix.MAP + name); } private  HazelcastClient(ClientConfig config); InRunnable getInRunnable(); OutRunnable getOutRunnable(); static HazelcastClient newHazelcastClient(ClientConfig config); Config getConfig(); PartitionService getPartitionService(); ClientService getClientService(); LoggingService getLoggingService(); IMap<K, V> getMap(String name); Object getClientProxy(Object o); com.hazelcast.core.Transaction getTransaction(); ConnectionManager getConnectionManager(); void addInstanceListener(InstanceListener instanceListener); Cluster getCluster(); ExecutorService getExecutorService(); ExecutorService getExecutorService(String name); IdGenerator getIdGenerator(String name); AtomicNumber getAtomicNumber(String name); ICountDownLatch getCountDownLatch(String name); ISemaphore getSemaphore(String name); Collection<Instance> getInstances(); IList<E> getList(String name); ILock getLock(Object obj); MultiMap<K, V> getMultiMap(String name); String getName(); IQueue<E> getQueue(String name); ISet<E> getSet(String name); ITopic<E> getTopic(String name); void removeInstanceListener(InstanceListener instanceListener); static void shutdownAll(); static Collection<HazelcastClient> getAllHazelcastClients(); void shutdown(); boolean isActive(); void restart(); LifecycleService getLifecycleService(); ClientConfig getClientConfig();  }