Examples of newHazelcastInstance()


Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

    public void testEntryAdapterMapEvicted() {
        String mapName = randomMapName();
        Config cfg = new Config();

        TestHazelcastInstanceFactory instanceFactory = createHazelcastInstanceFactory(1);
        HazelcastInstance instance = instanceFactory.newHazelcastInstance(cfg);

        IMap map = instance.getMap(mapName);
        map.put(1, 1);
        map.put(2, 2);
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

    @Test
    public void testEntryAdapterMapCleared() {
        String mapName = randomMapName();
        Config cfg = new Config();
        TestHazelcastInstanceFactory instanceFactory = createHazelcastInstanceFactory(1);
        HazelcastInstance instance = instanceFactory.newHazelcastInstance(cfg);

        IMap map = instance.getMap(mapName);
        map.put(1, 1);
        map.put(2, 2);
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

    }

    @Test(timeout = 120000)
    public void testSemaphoreWithFailuresAndJoin() {
        final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(3);
        final HazelcastInstance instance1 = factory.newHazelcastInstance();
        final HazelcastInstance instance2 = factory.newHazelcastInstance();
        final ISemaphore semaphore = instance1.getSemaphore("test");
        final CountDownLatch countDownLatch = new CountDownLatch(1);

        assertTrue(semaphore.init(0));
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

    @Test(timeout = 120000)
    public void testSemaphoreWithFailuresAndJoin() {
        final TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(3);
        final HazelcastInstance instance1 = factory.newHazelcastInstance();
        final HazelcastInstance instance2 = factory.newHazelcastInstance();
        final ISemaphore semaphore = instance1.getSemaphore("test");
        final CountDownLatch countDownLatch = new CountDownLatch(1);

        assertTrue(semaphore.init(0));
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

        thread.start();

        instance2.shutdown();
        semaphore.release();

        HazelcastInstance instance3 = factory.newHazelcastInstance();
        ISemaphore semaphore1 = instance3.getSemaphore("test");
        semaphore1.release();

        try {
            assertTrue(countDownLatch.await(15, TimeUnit.SECONDS));
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

        HazelcastInstance h3 = nodeFactory.newHazelcastInstance(config);
        IMap<Integer, Integer> m3 = h3.getMap(MAP_NAME);
        h2.shutdown();
        checkSizeEventually(size, m3);

        HazelcastInstance h4 = nodeFactory.newHazelcastInstance(config);
        IMap<Integer, Integer> m4 = h4.getMap(MAP_NAME);
        h3.shutdown();
        checkSizeEventually(size, m4);
    }
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

    public void testGracefulShutdown2() throws Exception {
        Config config = new Config();
        config.getMapConfig(MAP_NAME).setBackupCount(2);

        TestHazelcastInstanceFactory f = createHazelcastInstanceFactory(8);
        final HazelcastInstance hz = f.newHazelcastInstance(config);

        final IMap<Integer, Integer> map = hz.getMap(MAP_NAME);
        final int size = 50000;
        for (int i = 0; i < size; i++) {
            map.put(i, i);
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

        final int size = 50000;
        for (int i = 0; i < size; i++) {
            map.put(i, i);
        }

        final HazelcastInstance hz2 = f.newHazelcastInstance(config);
        final IMap<Integer, Integer> map2 = hz2.getMap(MAP_NAME);

        checkSizeEventually(size, map2);

        final HazelcastInstance hz3 = f.newHazelcastInstance(config);
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

        final HazelcastInstance hz2 = f.newHazelcastInstance(config);
        final IMap<Integer, Integer> map2 = hz2.getMap(MAP_NAME);

        checkSizeEventually(size, map2);

        final HazelcastInstance hz3 = f.newHazelcastInstance(config);
        final IMap<Integer, Integer> map3 = hz3.getMap(MAP_NAME);

        final HazelcastInstance hz4 = f.newHazelcastInstance(config);
        final IMap<Integer, Integer> map4 = hz4.getMap(MAP_NAME);
View Full Code Here

Examples of com.hazelcast.test.TestHazelcastInstanceFactory.newHazelcastInstance()

        QueueStoreConfig queueStoreConfig = new QueueStoreConfig();
        queueStoreConfig.setStoreImplementation(queueStore);
        queueConfig.setQueueStoreConfig(queueStoreConfig);

        TestHazelcastInstanceFactory factory = createHazelcastInstanceFactory(2);
        HazelcastInstance instance = factory.newHazelcastInstance(config);

        for (int i = 0; i < maxSize / 2; i++) {
            queueStore.store.put((long) i, i);
        }
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.