Obtain and remove the current {@link ConnectionObserver} from the bootstrap.

@param b the bootstrap to scan

@return current {@link ConnectionObserver} or null
962585
@SuppressWarnings("unchecked")
	public static ConnectionObserver connectionObserver(AbstractBootstrap<?, ?> b) {
		Objects.requireNonNull(b, "bootstrap");
		ConnectionObserver obs =
				(ConnectionObserver) b.config()
				                             .options()
				                             .get(OBSERVER_OPTION);
		if (obs == null) {
			return ConnectionObserver.emptyListener(); //will not be triggered in
		}
		b.option(OBSERVER_OPTION, null);
		return obs;
	}
1148000
@Override
  public boolean addObserver(ConnectionObserver obs) {
    boolean rv = mconn.addObserver(obs);
    if (rv) {
      for (MemcachedNode node : mconn.getLocator().getAll()) {
        if (node.isActive()) {
          obs.connectionEstablished(node.getSocketAddress(), -1);
        }
      }
    }
    return rv;
  }
1013243
public final UdpServer doOnBind(Consumer<? super Bootstrap> doOnBind) {
		Objects.requireNonNull(doOnBind, "doOnBind");
		return new UdpServerDoOn(this, doOnBind, null, null);

	}
1293982
public static void channelOperationFactory(AbstractBootstrap<?, ?> b,
			ChannelOperations.OnSetup opsFactory) {
		Objects.requireNonNull(b, "bootstrap");
		Objects.requireNonNull(opsFactory, "opsFactory");
		b.option(OPS_OPTION, opsFactory);
	}
29978
public static Bootstrap removeSslSupport(Bootstrap b) {
		BootstrapHandlers.removeConfiguration(b, NettyPipeline.SslHandler);
		return b;
	}
1098555
private CompletableFuture<Void> bootstrapServer() {
    ServerBootstrap b = new ServerBootstrap();
    b.option(ChannelOption.SO_REUSEADDR, true);
    b.option(ChannelOption.SO_BACKLOG, 128);
    b.childOption(ChannelOption.WRITE_BUFFER_WATER_MARK,
        new WriteBufferWaterMark(8 * 1024, 32 * 1024));
    b.childOption(ChannelOption.SO_RCVBUF, 1024 * 1024);
    b.childOption(ChannelOption.SO_SNDBUF, 1024 * 1024);
    b.childOption(ChannelOption.SO_KEEPALIVE, true);
    b.childOption(ChannelOption.TCP_NODELAY, true);
    b.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);
    b.group(serverGroup, clientGroup);
    b.channel(serverChannelClass);
    if (enableNettyTls) {
      try {
        b.childHandler(new SslServerChannelInitializer());
      } catch (SSLException e) {
        return Futures.exceptionalFuture(e);
      }
    } else {
      b.childHandler(new BasicServerChannelInitializer());
    }
    return bind(b);
  }
568934
public T getObject(Connection conn, DataObject object) throws Exception {
        return executeSelect(conn, object, new ResultSetMapper<SingleObjectCollector<T>>(new SingleObjectCollector<T>())).value;
    }
562857
public static Connection newInstance(Connection conn) {
        return (Connection) java.lang.reflect.Proxy.newProxyInstance(Connection.class.getClassLoader(), new Class[]{Connection.class},
                new ConnectionProxy(conn));
        /*
        return (Connection) java.lang.reflect.Proxy.newProxyInstance(conn.getClass().getClassLoader(), conn.getClass().getInterfaces(),
                new ConnectionProxy(conn));
                */
    }
672874
public ConnectionManager getConnectionManager() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(this, tc, "Connection manager is " + cm + " for managed connection " + this);
            if (cm == null && pm != null) {
                Tr.debug(this, tc, "Connection pool is " + this.pm.toString());
            }
        }
        if (cm != null) {
            return cm;
        } else {
            IllegalStateException e = new IllegalStateException("ConnectionManager is null");
            Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", "getConnectionManager", e);
            throw e;
        }
    }
945588
public static function closeDbConnection()
    {
        if (isset(self::$dbLink)) {
            $dbConn = self::$dbLink;
            $dbConn->close();
            self::$dbLink = null;
        }
        
        return null;
    }
989648
public static ServerBootstrap updateLogSupport(ServerBootstrap b,
												   LoggingHandler handler) {
		updateConfiguration(b, NettyPipeline.LoggingHandler, logConfiguration(handler, SSL_SERVER_DEBUG));
		return b;
	}
715136
public final TcpServer doOnBind(Consumer<? super ServerBootstrap> doOnBind) {
		Objects.requireNonNull(doOnBind, "doOnBind");
		return new TcpServerDoOn(this, doOnBind, null, null);

	}
1157761
@Deprecated
    BasicUser getCurrentUserBasic(AccessToken accessToken) {
        checkAccessTokenIsNotNull(accessToken);

        StatusType status;
        String content;
        try {
            Response response = targetEndpoint.path("me").request(MediaType.APPLICATION_JSON)
                    .header("Authorization", BEARER + accessToken.getToken())
                    .property(ClientProperties.CONNECT_TIMEOUT, getConnectTimeout())
                    .property(ClientProperties.READ_TIMEOUT, getReadTimeout())
                    .get();

            status = response.getStatusInfo();
            content = response.readEntity(String.class);
        } catch (ProcessingException e) {
            throw new ConnectionInitializationException(CONNECTION_SETUP_ERROR_STRING, e);
        }

        checkAndHandleResponse(content, status, accessToken);

        return mapToType(content, BasicUser.class);
    }
135423
Connection getConnection() throws SQLException {
		if (connection == null) {
			connection = connectionSupplier.getConnection();
			initSavepoints(connection);
		}
		return connection;
	}
415484
private Observable<Server> selectServer() {
        return Observable.create(new OnSubscribe<Server>() {
            @Override
            public void call(Subscriber<? super Server> next) {
                try {
                    Server server = loadBalancerContext.getServerFromLoadBalancer(loadBalancerURI, loadBalancerKey);   
                    next.onNext(server);
                    next.onCompleted();
                } catch (Exception e) {
                    next.onError(e);
                }
            }
        });
    }
630977
public final UdpClient doOnDisconnected(Consumer<? super Connection> doOnDisconnected) {
		Objects.requireNonNull(doOnDisconnected, "doOnDisconnected");
		return new UdpClientDoOn(this, null, null, doOnDisconnected);
	}
429591
public static LinkedBindingBuilder<HttpClientObserver> bindNewObserver(final Binder binder, final Annotation annotation)
    {
        return Multibinder.newSetBinder(binder, HttpClientObserver.class, annotation).addBinding();
    }