continue; if (LocalBookiesRegistry.isLocalBookie(bookie)) { localBookie = bookie; break;
void shutdown() { LOG.info("Shutting down BookieNettyServer"); isRunning.set(false); if (!isClosed.compareAndSet(false, true)) { // the netty server is already closed. return; } allChannels.close().awaitUninterruptibly(); if (eventLoopGroup != null) { try { eventLoopGroup.shutdownGracefully(0, 10, TimeUnit.MILLISECONDS).await(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); /// OK } } if (jvmEventLoopGroup != null) { LocalBookiesRegistry.unregisterLocalBookieAddress(bookieAddress); jvmEventLoopGroup.shutdownGracefully(); } authProviderFactory.close(); }
LocalBookiesRegistry.registerLocalBookieAddress(bookieAddress);
this.addr = addr; this.executor = executor; if (LocalBookiesRegistry.isLocalBookie(addr)) { this.eventLoopGroup = new DefaultEventLoopGroup(); } else {