Package com.hazelcast.core

Examples of com.hazelcast.core.IMap.keySet()


            }
        }, 10);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                Iterator it = map.keySet(new SqlPredicate("name=" + random.nextInt(10000))).iterator();
                while (it.hasNext()) {
                    it.next();
                }
            }
        }, 10);
View Full Code Here


                            for (Object o : col) {
                                int i = 0;
                            }
                            stats.increment("values");
                        } else if (operation < 8) {
                            Collection col = map.keySet();
                            for (Object o : col) {
                                int i = 0;
                            }
                            stats.increment("keySet");
                        } else if (operation < 9) {
View Full Code Here

            }
        }, 10);
        addOperation(operations, new Runnable() {
            public void run() {
                IMap map = hazelcast.getMap("myMap");
                Iterator it = map.keySet(new SqlPredicate("name=" + random.nextInt(10000))).iterator();
                while (it.hasNext()) {
                    it.next();
                }
            }
        }, 10);
View Full Code Here

        map.put("5", 55);
        map.put("6", 66);
        Predicate predicate = new PredicateBuilder().getEntryObject().key().equal("1");
        assertEquals(1, map.values(predicate).size());
        predicate = new PredicateBuilder().getEntryObject().key().in("2", "3");
        assertEquals(2, map.keySet(predicate).size());
        predicate = new PredicateBuilder().getEntryObject().key().in("2", "3", "5", "6", "7");
        assertEquals(4, map.keySet(predicate).size());
    }

    /**
 
View Full Code Here

        Predicate predicate = new PredicateBuilder().getEntryObject().key().equal("1");
        assertEquals(1, map.values(predicate).size());
        predicate = new PredicateBuilder().getEntryObject().key().in("2", "3");
        assertEquals(2, map.keySet(predicate).size());
        predicate = new PredicateBuilder().getEntryObject().key().in("2", "3", "5", "6", "7");
        assertEquals(4, map.keySet(predicate).size());
    }

    /**
     * Github issues 98 and 131
     */
 
View Full Code Here

    }

    @Test
    public void testKeySet_whenEmpty() {
        final IMap map = client.getMap(randomString());
        final Set keySet = map.keySet();
        assertTrue(keySet.isEmpty());
    }

    @Test
    public void testKeySet() {
View Full Code Here

        for (int key = 0; key < max; key++) {
            Object value = key+"value";
            expected.add(key);
            map.put(key, value);
        }
        final Set keySet = map.keySet();

        assertEquals(expected, keySet);
    }

    @Test
View Full Code Here

            Object value = key+"value";
            map.put(key, value);
        }
        expected.add(4);

        final Set keySet = map.keySet(new SqlPredicate("this == 4value"));

        assertEquals(expected, keySet);
    }

    @Test
View Full Code Here

            Object value = key+"value";
            map.put(key, value);
        }
        expected.add(4);

        final Set keySet = map.keySet(new SqlPredicate("this == 4value"));

        assertEquals(expected, keySet);
    }

    @Test
View Full Code Here

                            for (Object o : col) {
                                int i = 0;
                            }
                            stats.increment("values");
                        } else if (operation < 8) {
                            Collection col = map.keySet();
                            for (Object o : col) {
                                int i = 0;
                            }
                            stats.increment("keySet");
                        } else if (operation < 9) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.