Package com.hazelcast.core

Examples of com.hazelcast.core.HazelcastInstance


    @Test
    public void testDefaultInstance() throws InterruptedException {
        HazelcastServiceFactory factory = new HazelcastServiceFactory();
        factory.init();
        factory.getInstance();
        HazelcastInstance defaultInstance = Hazelcast.newHazelcastInstance(null);

        HazelcastInstance factoryInstance = factory.getInstance();
        Assert.assertEquals(true, factoryInstance.getCluster().getMembers().size() >= 2);
    }
View Full Code Here


    private IMap<String, Object> map;

    @Override
    protected void doPostSetup() throws Exception {
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        map = hazelcastInstance.getMap("foo");
        map.clear();
    }
View Full Code Here

    private BlockingQueue<String> map;

    @Override
    protected void doPostSetup() throws Exception {
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        this.map = hazelcastInstance.getQueue("mm");
        this.map.clear();
    }
View Full Code Here


    @Override
    protected void doPostSetup() throws Exception {
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        this.map = hazelcastInstance.getMultiMap("mm");
        this.map.clear();
    }
View Full Code Here

    @Override
    protected void doPostSetup() throws Exception {
        super.doPostSetup();
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        this.map = hazelcastInstance.getMap("foo");
        this.map.clear();
    }
View Full Code Here

    private BlockingQueue<String> queue;

    @Override
    protected void doPostSetup() throws Exception {
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        queue = hazelcastInstance.getQueue("bar");
        queue.clear();
    }
View Full Code Here

    private List<String> list;

    @Override
    protected void doPostSetup() throws Exception {
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        list = hazelcastInstance.getList("mm");
        list.clear();
    }
View Full Code Here

    private IMap<String, Object> map;

    @Override
    protected void doPostSetup() throws Exception {
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        map = hazelcastInstance.getMap("foo");
        map.clear();
    }
View Full Code Here

    private List<String> list;

    @Override
    protected void doPostSetup() throws Exception {
        HazelcastComponent component = (HazelcastComponent) context().getComponent("hazelcast");
        HazelcastInstance hazelcastInstance = component.getHazelcastInstance();
        list = hazelcastInstance.getList("bar");
        list.clear();
    }
View Full Code Here

    public void testRemoveInstance() throws InterruptedException {

        MockEndpoint removed = getMockEndpoint("mock:removed");
        removed.setExpectedMessageCount(1);

        HazelcastInstance h1 = Hazelcast.newHazelcastInstance(null);

        // TODO --> check how an instance can be killed...
        h1.shutdown();

        assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);

        // check headers
        Exchange ex = removed.getExchanges().get(0);
View Full Code Here

TOP

Related Classes of com.hazelcast.core.HazelcastInstance

Copyright © 2018 www.massapicom. 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.