Package com.hazelcast.core

Examples of com.hazelcast.core.HazelcastInstance.shutdown()


        assertEquals(100, q.size());
        transactionContext.commitTransaction();

        assertEquals(100, h.getQueue("default").size());
        assertFalse(result);
        h.shutdown();
    }

    @Test
    public void testListenerLifecycle() throws Exception {
        final HazelcastInstance instance = createHazelcastInstance();
View Full Code Here


            }
        };
        new Thread(runnable).start();
        try {
            Thread.sleep(1000);
            h2.shutdown();
            assertTrue(latch.await(30, TimeUnit.SECONDS));
            for (int i = 0; i < size; i++) {
                assertFalse(map1.isLocked(i));
            }
        } catch (InterruptedException e) {
View Full Code Here

    }

    protected void shutdownHazelcastInstance() {
        final HazelcastInstance localInstanceRef = hazelcastInstance;
        if (localInstanceRef != null) {
            localInstanceRef.shutdown();
        }
        hazelcastInstance = null;
    }

    @Override
View Full Code Here

        String[] cities = {"NEW YORK", "ISTANBULL", "TOKYO", "LONDON", "PARIS", "CAIRO", "HONG KONG"};
        putAll(map1, cities);

        //Now terminate one node
        i2.shutdown();

        assertGet(map1, "-foo", cities);

        //Now adding the node back in
        i2 = startNode(nodeFactory);
View Full Code Here

                latch.countDown();
            }
        };
        new Thread(runnable).start();
        assertTrue(latch2.await(20, TimeUnit.SECONDS));
        h2.shutdown();

        assertTrue(latch.await(60, TimeUnit.SECONDS));
        for (int i = 0; i < size; i++) {
            assertNull(map1.get(i));
        }
View Full Code Here

        assertEquals(200, instance3.getList(name).size());

        instance1 = factory.newHazelcastInstance(config);
        assertEquals(200, instance1.getList(name).size());

        instance3.shutdown();
        assertEquals(200, instance1.getList(name).size());

    }

    @Test
View Full Code Here

            txnMap.remove(i.toString());
            context.commitTransaction();
        }
        assertEquals(0, map.size());

        inst.shutdown();
    }


    @Test
    // TODO: @mm - Review following case...
View Full Code Here

                throw new RuntimeException(e);
            }
        }
        assertEquals(2, map.keySet().size());
        h1.shutdown();
        h2.shutdown();
    }

    @Test
    public void testIssue615KeysetWithPredicate() throws TransactionException {
        Config config = new Config();
View Full Code Here

        assertEquals(1, map.size());
        assertEquals(1, map.keySet().size());
        assertEquals(0, map.keySet(new SqlPredicate("age <= 10")).size());

        h1.shutdown();
        h2.shutdown();
    }

    @Test
    public void testIssue615KeysetPredicates() throws TransactionException {
        final String MAP_NAME = "defaultMap";
View Full Code Here


        assertEquals(2, map.size());

        h1.shutdown();
        h2.shutdown();
    }

    @Test
    public void testPortableKeysetAndValuesWithPredicates() throws Exception {
        final String mapName = randomString();
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.