@Test public void testMultiMapPutGetRemove() { MultiMap mm = Hazelcast.getMultiMap("testMultiMapPutGetRemove"); mm.put("1", "C"); mm.put("2", "x"); mm.put("2", "y"); mm.put("1", "A"); mm.put("1", "B"); Collection g1 = mm.get("1"); assertTrue(g1.contains("A")); assertTrue(g1.contains("B")); assertTrue(g1.contains("C")); assertEquals(5, mm.size()); assertTrue(mm.remove("1", "C")); assertEquals(4, mm.size()); Collection g2 = mm.get("1"); assertTrue(g2.contains("A")); assertTrue(g2.contains("B")); assertFalse(g2.contains("C")); Collection r1 = mm.remove("2"); assertTrue(r1.contains("x")); assertTrue(r1.contains("y")); assertNotNull(mm.get("2")); assertTrue(mm.get("2").isEmpty()); assertEquals(2, mm.size()); Collection r2 = mm.remove("1"); assertTrue(r2.contains("A")); assertTrue(r2.contains("B")); assertNotNull(mm.get("1")); assertTrue(mm.get("1").isEmpty()); assertEquals(0, mm.size()); }
@Deprecated public static <K, V> MultiMap<K, V> getMultiMap(String name) { return getDefaultInstance().getMultiMap(name); }
Hazelcast { @Deprecated public static <K, V> MultiMap<K, V> getMultiMap(String name) { return getDefaultInstance().getMultiMap(name); } }
Hazelcast { @Deprecated public static <K, V> MultiMap<K, V> getMultiMap(String name) { return getDefaultInstance().getMultiMap(name); } private  Hazelcast(); }
Hazelcast { @Deprecated public static <K, V> MultiMap<K, V> getMultiMap(String name) { return getDefaultInstance().getMultiMap(name); } private  Hazelcast(); @Deprecated static HazelcastInstance init(Config config); @Deprecated static HazelcastInstance getDefaultInstance(); @Deprecated static IQueue<E> getQueue(String name); @Deprecated static ITopic<E> getTopic(String name); @Deprecated static ISet<E> getSet(String name); @Deprecated static IList<E> getList(String name); @Deprecated static IMap<K, V> getMap(String name); @Deprecated static MultiMap<K, V> getMultiMap(String name); @Deprecated static ILock getLock(Object key); @Deprecated static Cluster getCluster(); @Deprecated static ExecutorService getExecutorService(); @Deprecated static ExecutorService getExecutorService(String name); @Deprecated static Transaction getTransaction(); @Deprecated static AtomicNumber getAtomicNumber(String name); @Deprecated static ICountDownLatch getCountDownLatch(String name); @Deprecated static ISemaphore getSemaphore(String name); @Deprecated static IdGenerator getIdGenerator(String name); @Deprecated static void shutdown(); static void shutdownAll(); @Deprecated static void restart(); @Deprecated static Collection<Instance> getInstances(); @Deprecated static void addInstanceListener(InstanceListener instanceListener); @Deprecated static void removeInstanceListener(InstanceListener instanceListener); static HazelcastInstance newHazelcastInstance(Config config); static HazelcastInstance newHazelcastInstance(); static HazelcastInstance newLiteMemberHazelcastInstance(); static HazelcastInstance getHazelcastInstanceByName(String instanceName); static Set<HazelcastInstance> getAllHazelcastInstances(); @Deprecated static Config getConfig(); @Deprecated static PartitionService getPartitionService(); @Deprecated static LoggingService getLoggingService(); @Deprecated static LifecycleService getLifecycleService(); static void setOutOfMemoryHandler(OutOfMemoryHandler outOfMemoryHandler); }
Hazelcast { @Deprecated public static <K, V> MultiMap<K, V> getMultiMap(String name) { return getDefaultInstance().getMultiMap(name); } private  Hazelcast(); @Deprecated static HazelcastInstance init(Config config); @Deprecated static HazelcastInstance getDefaultInstance(); @Deprecated static IQueue<E> getQueue(String name); @Deprecated static ITopic<E> getTopic(String name); @Deprecated static ISet<E> getSet(String name); @Deprecated static IList<E> getList(String name); @Deprecated static IMap<K, V> getMap(String name); @Deprecated static MultiMap<K, V> getMultiMap(String name); @Deprecated static ILock getLock(Object key); @Deprecated static Cluster getCluster(); @Deprecated static ExecutorService getExecutorService(); @Deprecated static ExecutorService getExecutorService(String name); @Deprecated static Transaction getTransaction(); @Deprecated static AtomicNumber getAtomicNumber(String name); @Deprecated static ICountDownLatch getCountDownLatch(String name); @Deprecated static ISemaphore getSemaphore(String name); @Deprecated static IdGenerator getIdGenerator(String name); @Deprecated static void shutdown(); static void shutdownAll(); @Deprecated static void restart(); @Deprecated static Collection<Instance> getInstances(); @Deprecated static void addInstanceListener(InstanceListener instanceListener); @Deprecated static void removeInstanceListener(InstanceListener instanceListener); static HazelcastInstance newHazelcastInstance(Config config); static HazelcastInstance newHazelcastInstance(); static HazelcastInstance newLiteMemberHazelcastInstance(); static HazelcastInstance getHazelcastInstanceByName(String instanceName); static Set<HazelcastInstance> getAllHazelcastInstances(); @Deprecated static Config getConfig(); @Deprecated static PartitionService getPartitionService(); @Deprecated static LoggingService getLoggingService(); @Deprecated static LifecycleService getLifecycleService(); static void setOutOfMemoryHandler(OutOfMemoryHandler outOfMemoryHandler);  }