Example usage for io.netty.util.internal InternalThreadLocalMap destroy

List of usage examples for io.netty.util.internal InternalThreadLocalMap destroy

Introduction

In this page you can find the example usage for io.netty.util.internal InternalThreadLocalMap destroy.

Prototype

public static void destroy() 

Source Link

Usage

From source file:com.kevinherron.GatewayHook.java

@Override
public void shutdown() {
    logger.info("shutdown()");

    try {//from ww  w  .  j a v a  2 s  .c o  m
        eventLoop.shutdownGracefully().get();
    } catch (Throwable e) {
        logger.error("Error waiting for event loop shutdown: {}", e.getMessage(), e);
    }
    try {
        GlobalEventExecutor.INSTANCE.shutdownGracefully().get();
    } catch (Throwable e) {
        logger.error("Error waiting for GlobalEventExecutor shutdown: {}", e.getMessage(), e);
    }
    try {
        DefaultAddressResolverGroup.INSTANCE.close();
    } catch (Throwable e) {
        logger.error("Error closing DefaultAddressResolverGroup: {}", e.getMessage(), e);
    }
    InternalThreadLocalMap.destroy();
    FastThreadLocal.removeAll();
}