當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。