{@inheritdoc}

@throws BrokenConnectionException
961074
public function values(Interfaces\JavaObject $javaObject)
    {
        try {
            return $this->pjbProxyClient->getValues($javaObject);
        } catch (Pjb62BrokenConnectionException | Exception\InvalidUsageException $e) {
            PjbProxyClient::unregisterInstance();
            throw new BrokenConnectionException($e->getMessage(), $e->getCode(), $e);
        }
    }
74659
function checkinConnection(\Plasma\DriverInterface $driver): void {
        if($driver->getConnectionState() !== \Plasma\DriverInterface::CONNECTION_UNUSABLE && !$this->goingAway) {
            $this->connections->add($driver);
            $this->busyConnections->delete($driver);
        }
    }
1048599
private function reconnect()
    {
        if (0 === (int) $this->getOption(self::OPT_MAX_RECONNECT_ATTEMPTS)) {
            throw new MaxConnectAttempsException("Connection lost.");
        } elseif ($this->reconnectAttempts === (int) $this->getOption(self::OPT_MAX_RECONNECT_ATTEMPTS)) {
            throw new MaxConnectAttempsException("Max attempts to connect to database has been reached.");
        }

        if (null === $this->credentials) {
            throw new AccessDeniedException("Unable to reconnect: credentials not provided.");
        }

        try {
            if (0 !== $this->reconnectAttempts) {
                usleep((int) $this->getOption(self::OPT_USLEEP_AFTER_FIRST_ATTEMPT));
            }
            $this->cnx = self::createLink($this->getCredentials(), $this->options);
            if ($this->isConnected()) {
                $this->reconnectAttempts = 0;
            } else {
                $this->reconnect();
            }
        } catch (Throwable $e) {
            $this->reconnectAttempts++;
        }
    }
294182
public function setTransactionIsolation($isolation)
    {
        if (!$this->getPlatform()->supportTransactionIsolations()) {
            throw ConnectionException::transactionIsolationNotSupported();
        }

        $this->executeUpdate($this->getPlatform()->getSetTransactionIsolationSQLQuery($isolation));
        $this->transactionIsolation = $isolation;
    }
198618
public function setFailConnectionFailed(bool $fail_connection_failed = true) : void
    {
        $this->is_connected = false;
        $this->fail_connection_failed = $fail_connection_failed;
    }
950350
public void txConnectionFailed (String ident, Connection conn, SQLException error)
    {
        close(conn, ident);
    }
1030167
public function reset() {
        if (!is_resource($this->connection))
            throw new RuntimeException('Cannot reset connection: Not connected');

        $this->writeData('RSET');
        $response = $this->readResponse();

        $this->parseResponse($response);
        if ($this->responseStatus != 250)
            throw new RuntimeException('RSET command not accepted: '.$this->responseStatus.' '.$this->response.NL.NL.'SMTP transfer log:'.NL.'------------------'.NL.$this->logBuffer);
    }
1100079
public function connect()
    {
        try {
            return $this->_driver->connect();
        } catch (Exception $e) {
            throw new MissingConnectionException(['reason' => $e->getMessage()], null, $e);
        }
    }
1078828
@Override
  public void reconnectFailedConnection(SearchFilter searchFilter) throws SQLException {
    proxy.lock.lock();
    try {
      if (!searchFilter.isInitialConnection()
          && (isExplicitClosed() || !isMasterHostFail())) {
        return;
      }

      currentConnectionAttempts.incrementAndGet();
      resetOldsBlackListHosts();

      List<HostAddress> loopAddress = new LinkedList<>(urlParser.getHostAddresses());
      if (HaMode.FAILOVER.equals(mode)) {
        //put the list in the following order
        // - random order not connected host
        // - random order blacklist host
        // - random order connected host
        loopAddress.removeAll(getBlacklistKeys());
        Collections.shuffle(loopAddress);
        List<HostAddress> blacklistShuffle = new LinkedList<>(getBlacklistKeys());
        blacklistShuffle.retainAll(urlParser.getHostAddresses());
        Collections.shuffle(blacklistShuffle);
        loopAddress.addAll(blacklistShuffle);
      } else {
        //order in sequence
        loopAddress.removeAll(getBlacklistKeys());
        loopAddress.addAll(getBlacklistKeys());
        loopAddress.retainAll(urlParser.getHostAddresses());
      }

      //put connected at end
      if (currentProtocol != null && !isMasterHostFail()) {
        loopAddress.remove(currentProtocol.getHostAddress());
        //loopAddress.add(currentProtocol.getHostAddress());
      }

      MasterProtocol.loop(this, globalInfo, loopAddress, searchFilter);
      //close loop if all connection are retrieved
      if (!isMasterHostFail()) {
        FailoverLoop.removeListener(this);
      }

      //if no error, reset failover variables
      resetMasterFailoverData();
    } finally {
      proxy.lock.unlock();
    }
  }
240988
public void reconnect() throws SQLException {
    SearchFilter filter;
    boolean inTransaction = false;
    if (currentReadOnlyAsked) {
      filter = new SearchFilter(true, true);
    } else {
      inTransaction = masterProtocol != null && masterProtocol.inTransaction();
      filter = new SearchFilter(true, urlParser.getOptions().failOnReadOnly);
    }
    reconnectFailedConnection(filter);
    handleFailLoop();
    if (inTransaction) {
      throw new ReconnectDuringTransactionException(
          "Connection reconnect automatically during an active transaction", 1401, "25S03");
    }
  }
436933
private void handleConnection(Address address, Connection connection, Throwable error, CompletableFuture<Connection> future) {
    if (open) {
      if (error == null) {
        setupConnection(address, connection, future);
      } else {
        LOGGER.debug("{} - Failed to connect! Reason: {}", id, error);
        connect(future);
      }
    }
  }
941008
protected function setConnectionPassiveMode()
	{
		if (!ftp_pasv($this->getConnection(), $this->passive))
		{
			throw new RuntimeException(sprintf('Could not set passive mode for connection: %s::%s', $this->getHost(), $this->getPort()));
		}
	}
2324
protected void invalidateConnection(boolean notifyPeer, Throwable throwable, String debugReason)
   {
       if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "invalidateConnection", new Object[]{new Boolean(notifyPeer),
                                                                                     throwable,
                                                                                     debugReason});
       if (con != null)
       {
           ConnectionInterface connection = con.getConnectionReference();
           if (connection != null)
           {
               connection.invalidate(notifyPeer, throwable, debugReason);
           }         
       }
       if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "invalidateConnection");
   }
893621
@Override
    void connectionError(SibRaMessagingEngineConnection connection, SIException exception)
    {
        String methodName = "connectionError";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName, new Object[] { connection, exception });
        }

        /*
         * We have lost our remote connection, output a warning to the
         * admin console, close the connection and schedule an attempt
         * to create a new one
         */

        SibTr.warning(TRACE, "CONNECTION_ERROR_CWSIV0776",
                      new Object[] { connection.getConnection().getMeName(),
                                    _endpointConfiguration.getBusName(), this,
                                    exception });

        dropConnection(connection, false, true, true);

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(this, TRACE, methodName);
        }
    }
345011
protected function _handleDbConnectionException(\OxidEsales\Eshop\Core\Exception\DatabaseException $exception)
    {
        $exceptionHandler = $this->getExceptionHandler();
        $exceptionHandler->handleDatabaseException($exception);
    }
87303
public function setActiveConnections($connections)
    {
        if (!is_array($connections)) {
            $connections = explode(',', $connections);
        }

        // Sanitize and set connections
        $filtered = array_filter($connections, [$this, 'isValidConnection']);
        if (!$filtered) {
            throw new ConnectionException('Invalid connection(s): '.implode(', ', $connections));
        }

        $this->available = $this->getConnections()->map(function (ConnectionInterface $connection) use ($connections) {
            $connectionKey = $connection->getConnectionKey();
            $handle = $connectionKey->toHandle();

            $connection->setActive(in_array($handle, $connections, true) || in_array($connectionKey->name, $connections, true));
            $connection->setCurrent(false);

            return $connection;
        });
    }
395440
private static function isConnectionError(\GuzzleHttp\Exception\RequestException $exception = null)
    {
        return $exception instanceof \GuzzleHttp\Exception\ConnectException;
    }