Java Code Examples for com.alibaba.dubbo.registry.support.AbstractRegistryFactory#destroyAll()
The following examples show how to use
com.alibaba.dubbo.registry.support.AbstractRegistryFactory#destroyAll() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DubboShutdownHook.java From dubbo-2.6.5 with Apache License 2.0 | 6 votes |
/** * Destroy all the resources, including registries and protocols. */ public void destroyAll() { // 自旋锁,保证只处理一次,一般在项目中多线程情况下做线程开关很好用 if (!destroyed.compareAndSet(false, true)) { return; } // destroy all the registries 销毁所有注册信息=》 AbstractRegistryFactory.destroyAll(); // destroy all the protocols 销毁所有协议信息 ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class); for (String protocolName : loader.getLoadedExtensions()) { try { Protocol protocol = loader.getLoadedExtension(protocolName); if (protocol != null) { // 销毁协议 protocol.destroy(); } } catch (Throwable t) { logger.warn(t.getMessage(), t); } } }
Example 2
Source File: ProtocolConfig.java From dubbox with Apache License 2.0 | 5 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class); for (String protocolName : loader.getLoadedExtensions()) { try { Protocol protocol = loader.getLoadedExtension(protocolName); if (protocol != null) { protocol.destroy(); } } catch (Throwable t) { logger.warn(t.getMessage(), t); } } }
Example 3
Source File: ProtocolConfig.java From dubbox-hystrix with Apache License 2.0 | 5 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class); for (String protocolName : loader.getLoadedExtensions()) { try { Protocol protocol = loader.getLoadedExtension(protocolName); if (protocol != null) { protocol.destroy(); } } catch (Throwable t) { logger.warn(t.getMessage(), t); } } }
Example 4
Source File: ProtocolConfig.java From dubbo3 with Apache License 2.0 | 5 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class); for (String protocolName : loader.getLoadedExtensions()) { try { Protocol protocol = loader.getLoadedExtension(protocolName); if (protocol != null) { protocol.destroy(); } } catch (Throwable t) { logger.warn(t.getMessage(), t); } } }
Example 5
Source File: ProtocolConfig.java From dubbox with Apache License 2.0 | 5 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class); for (String protocolName : loader.getLoadedExtensions()) { try { Protocol protocol = loader.getLoadedExtension(protocolName); if (protocol != null) { protocol.destroy(); } } catch (Throwable t) { logger.warn(t.getMessage(), t); } } }
Example 6
Source File: ProtocolConfig.java From dubbox with Apache License 2.0 | 5 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class); for (String protocolName : loader.getLoadedExtensions()) { try { Protocol protocol = loader.getLoadedExtension(protocolName); if (protocol != null) { protocol.destroy(); } } catch (Throwable t) { logger.warn(t.getMessage(), t); } } }
Example 7
Source File: RegistryStatusCheckerTest.java From dubbo-2.6.5 with Apache License 2.0 | 4 votes |
@Before public void setUp() { AbstractRegistryFactory.destroyAll(); }
Example 8
Source File: RegistryConfig.java From dubbox with Apache License 2.0 | 4 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); }
Example 9
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 4 votes |
@Before public void setUp() { AbstractRegistryFactory.destroyAll(); }
Example 10
Source File: RegistryConfig.java From dubbox-hystrix with Apache License 2.0 | 4 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); }
Example 11
Source File: RegistryStatusCheckerTest.java From dubbox-hystrix with Apache License 2.0 | 4 votes |
@Before public void setUp() { AbstractRegistryFactory.destroyAll(); }
Example 12
Source File: RegistryConfig.java From dubbo3 with Apache License 2.0 | 4 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); }
Example 13
Source File: RegistryConfig.java From dubbox with Apache License 2.0 | 4 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); }
Example 14
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 4 votes |
@Before public void setUp() { AbstractRegistryFactory.destroyAll(); }
Example 15
Source File: RegistryConfig.java From dubbox with Apache License 2.0 | 4 votes |
public static void destroyAll() { AbstractRegistryFactory.destroyAll(); }
Example 16
Source File: RegistryStatusCheckerTest.java From dubbox with Apache License 2.0 | 4 votes |
@Before public void setUp() { AbstractRegistryFactory.destroyAll(); }