当前位置: 首页>>代码示例>>Java>>正文


Java Hazelcast.shutdownAll方法代码示例

本文整理汇总了Java中com.hazelcast.core.Hazelcast.shutdownAll方法的典型用法代码示例。如果您正苦于以下问题:Java Hazelcast.shutdownAll方法的具体用法?Java Hazelcast.shutdownAll怎么用?Java Hazelcast.shutdownAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.hazelcast.core.Hazelcast的用法示例。


在下文中一共展示了Hazelcast.shutdownAll方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: preDestroy

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public void preDestroy() {
    if (sf != null) {
        sf.close();
        sf = null;
    }
    if (sf2 != null) {
        sf2.close();
        sf2 = null;
    }
    Hazelcast.shutdownAll();
    factory.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:14,代码来源:HibernateStatisticsTestSupport.java

示例2: preDestroy

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public void preDestroy() {
    if (sf != null) {
        sf.close();
        sf = null;
    }
    if (sf2 != null) {
        sf2.close();
        sf2 = null;
    }
    Hazelcast.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:13,代码来源:HibernateSlowTestSupport.java

示例3: setup

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@Before
@Override
public void setup() throws Exception {
    Hazelcast.shutdownAll();
    ContainerContext cc = CONTAINER_CONTEXT_MAP.get(getClass());
    // If container is not exist yet or
    // Hazelcast instance is not active (because of such as server shutdown)
    if (cc == null) {
        // Build a new instance
        ensureInstanceIsUp();
        CONTAINER_CONTEXT_MAP.put(
                getClass(),
                new ContainerContext(
                        this,
                        serverXml1,
                        serverXml2,
                        serverPort1,
                        serverPort2,
                        server1,
                        server2,
                        null));
    } else {
        // For every test method a different test class can be constructed for parallel runs by JUnit.
        // So container can be exist, but configurations of current test may not be exist.
        // For this reason, we should copy container context information (such as ports, servers, ...)
        // to current test.
        cc.copyInto(this);
        // Ensure that instance is up and running
        ensureInstanceIsUp();
        // After ensuring that system is up, new containers or instance may be created.
        // So, we should copy current information from test to current context.
        cc.copyFrom(this);
    }
}
 
开发者ID:hazelcast,项目名称:hazelcast-wm,代码行数:35,代码来源:DisconnectedHazelcastTest.java

示例4: setup

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@Before
    @Override
    public void setup() throws Exception {
        Hazelcast.shutdownAll();
        ContainerContext cc = CONTAINER_CONTEXT_MAP.get(getClass());
        // If container is not exist yet or
        // Hazelcast instance is not active (because of such as server shutdown)
        if (cc == null) {
            // Build a new instance
            ensureInstanceIsUp();
            CONTAINER_CONTEXT_MAP.put(
                    getClass(),
                    new ContainerContext(
                            this,
                            serverXml1,
                            serverXml2,
                            serverPort1,
                            serverPort2,
                            server1,
                            server2,
                            null));
        } else {
            // For every test method a different test class can be constructed for parallel runs by JUnit.
            // So container can be exist, but configurations of current test may not be exist.
            // For this reason, we should copy container context information (such as ports, servers, ...)
            // to current test.
            cc.copyInto(this);
            // Ensure that instance is up and running
            ensureInstanceIsUp();
            // After ensuring that system is up, new containers or instance may be created.
            // So, we should copy current information from test to current context.
            cc.copyFrom(this);
        }
        // Clear map
//        IMap<String, Object> map = hz.getMap(DEFAULT_MAP_NAME);
//        map.clear();
    }
 
开发者ID:hazelcast,项目名称:hazelcast-wm,代码行数:38,代码来源:DeferredFailoverClusterTest.java

示例5: destroy

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@PreDestroy
public void destroy() {
    log.info("Closing Cache Manager");
    Hazelcast.shutdownAll();
}
 
开发者ID:xm-online,项目名称:xm-uaa,代码行数:6,代码来源:CacheConfiguration.java

示例6: destroy

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@PreDestroy
public void destroy() {
    log.info("Closing hazelcast");
    Hazelcast.shutdownAll();
}
 
开发者ID:xm-online,项目名称:xm-commons,代码行数:6,代码来源:XmConfigHazelcastConfiguration.java

示例7: tearDown

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public void tearDown() throws IOException {
    Hazelcast.shutdownAll();

    zkTestServer.close();
}
 
开发者ID:hazelcast,项目名称:hazelcast-zookeeper,代码行数:7,代码来源:HazelcastIntegrationTest.java

示例8: resetLockProvider

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public void resetLockProvider() throws UnknownHostException {
    Hazelcast.shutdownAll();
}
 
开发者ID:lukas-krecan,项目名称:ShedLock,代码行数:5,代码来源:HazelcastLockProviderClusterTest.java

示例9: teardown

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public void teardown() {
    Hazelcast.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:5,代码来源:HibernateSerializationHookAvailableTest.java

示例10: cleanup

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public final void cleanup() {
    Hazelcast.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:5,代码来源:HibernateTestSupport.java

示例11: tearDown

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@Override
protected void tearDown() throws Exception {
	bootstrap.close();
	Hazelcast.shutdownAll();
}
 
开发者ID:gerritjvv,项目名称:bigstreams,代码行数:6,代码来源:TestCoordinationHandlers.java

示例12: tearDown

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public void tearDown() throws Exception {
    HazelcastClient.shutdownAll();
    Hazelcast.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-jetty-sessionmanager,代码行数:6,代码来源:JettySessionUtilsTest.java

示例13: tearUpAndDown

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@BeforeClass
@AfterClass
public static void tearUpAndDown() {
    Hazelcast.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate5,代码行数:6,代码来源:HibernateTestSupport.java

示例14: killAllHazelcastInstances

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@BeforeClass
@AfterClass
public static void killAllHazelcastInstances() throws IOException {
    Hazelcast.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-hibernate,代码行数:6,代码来源:LocalRegionFactoryDefaultTest.java

示例15: cleanup

import com.hazelcast.core.Hazelcast; //导入方法依赖的package包/类
@After
public void cleanup() {
    Hazelcast.shutdownAll();
}
 
开发者ID:hazelcast,项目名称:hazelcast-jclouds,代码行数:5,代码来源:ComputeServiceBuilderInvalidConfigTest.java


注:本文中的com.hazelcast.core.Hazelcast.shutdownAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。