Package com.hazelcast.core

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


        });

        assertEquals(3, map2.values().size());

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

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


            }
        });
        assertEquals(0, map2.values(new SqlPredicate("age <= 10")).size());
        assertEquals(1, map2.values(new SqlPredicate("age = 34")).size());
        h1.shutdown();
        h2.shutdown();
    }

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

                assertEquals(1, coll.size());
                return true;
            }
        });
        h1.shutdown();
        h2.shutdown();

    }


    @Test(expected = IllegalArgumentException.class)
View Full Code Here

                Collection<Object> coll = txMap.values(new SqlPredicate("age > 70 "));
                assertEquals(0, coll.size());
                return true;
            }
        });
        node.shutdown();
    }

    @Test
    public void testValues_resultSetContainsUpdatedEntry() throws TransactionException {
        final int nodeCount = 1;
View Full Code Here

                SampleObjects.Employee employee = coll.iterator().next();
                assertEquals(30, employee.getAge());
                return true;
            }
        });
        node.shutdown();
    }

    @Test
    public void testUpdatesInTxnFiringUpdateEvent() {
        final String mapName = randomMapName("testUpdatesInTxnFiringUpdateEvent");
View Full Code Here

        final HazelcastInstance server2 = Hazelcast.newHazelcastInstance();

        client.getCluster().addMembershipListener(listener);

        final Member server2Member = server2.getCluster().getLocalMember();
        server2.shutdown();

        //verify that the correct member removed event was received.
        assertTrueEventually(new AssertTask() {
            @Override
            public void run() {
View Full Code Here

        assertEquals("value1", map2.get(1));
        assertEquals("value1", map3.get(1));
        assertEquals(1000, map1.size());
        assertEquals(1000, map2.size());
        assertEquals(1000, map3.size());
        h3.shutdown();
        assertEquals("value1", map1.get(1));
        assertEquals("value1", map2.get(1));
        assertEquals(1000, map1.size());
        assertEquals(1000, map2.size());
    }
View Full Code Here

                } catch (InterruptedException e) {
                }

                int index = random.nextInt(CLUSTER_SIZE);
                HazelcastInstance instance = instances.remove(index);
                instance.shutdown();

                HazelcastInstance newInstance = newHazelcastInstance(createClusterConfig());
                instances.add(newInstance);
            }
        }
View Full Code Here

        final IMap<Integer, Integer> map = client.getMap(mapName);

        map.get(1);
        //test should finish without throwing any exception.
        client.shutdown();
    }
}
View Full Code Here

        final MyXid myXid = new MyXid();
        xaResource1.start(myXid, 0);
        final TransactionalMap<Object, Object> map = context1.getMap("map");
        map.put("key", "value");
        xaResource1.prepare(myXid);
        client1.shutdown();

        assertNull(instance1.getMap("map").get("key"));

        final HazelcastInstance client2 = HazelcastClient.newHazelcastClient();
        final TransactionContext context2 = client2.newTransactionContext();
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.