Starts off a new thread to monitor this connection attempt.
@param connectionHandle to monitor
763826
protected void watchConnection(ConnectionHandle connectionHandle) {
		String message = captureStackTrace(UNCLOSED_EXCEPTION_MESSAGE);
		this.closeConnectionExecutor.submit(new CloseThreadMonitor(Thread.currentThread(), connectionHandle, message, this.closeConnectionWatchTimeoutInMs));
	}
145738
public synchronized void start(final StartContext context) throws StartException {
        try {
            context.execute(new Runnable() {

                @Override
                public void run() {
                    connectionManagerRegistry.addLdapConnectionManagerService(name, LdapConnectionManagerService.this);
                    context.complete();
                }
            });
        } finally {
            context.asynchronous();
        }
    }
1255155
public void start(InputHandler ih, Set<Long> verbotenThreads) {
        m_ih = ih;
        m_verbotenThreads = verbotenThreads;
        startSetup();
        m_thread.start();
    }
76203
public void bindAndStart(int port) throws Exception {
        server = new NioServer(new StreamConnectionFactory() {
            @Override
            public ProtobufConnection<Protos.TwoWayChannelMessage> getNewConnection(InetAddress inetAddress, int port) {
                return new ServerHandler(new InetSocketAddress(inetAddress, port), timeoutSeconds).socketProtobufHandler;
            }
        }, new InetSocketAddress(port));
        server.startAsync();
        server.awaitRunning();
    }
393421
public synchronized void start() throws IOException {
    if (responder.isAlive()) {
      // The server is already running
      return;
    }
    responder.start();
    listener.start();
    handlers = new Handler[handlerCount];

    for (int i = 0; i < handlerCount; i++) {
      handlers[i] = new Handler(i);
      handlers[i].start();
    }
  }
1135467
def threaded_start(self, no_init=False):
        '''
        
        '''
        thread = Thread(target=self.init_connections, kwargs={
                        'no_init': no_init})
        thread.setDaemon(True)
        thread.start()
        thread.join()
225803
private void startWorker() {
    JobServiceFactory serviceFactory = new JobServiceFactory() {

      private boolean first = true;

      public JobService connect() {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            setStatus("Connecting...");
          }
        });
        JobService service = first ? MainWindow.this.connect()
            : reconnect();
        if (service == null) {
          setVisible(false);
          throw new RuntimeException("Unable to connect");
        }
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            setStatus("Connected");
          }
        });
        first = false;
        return service;
      }
//
//      public JobService connect() {
//        try {
//          SwingUtilities.invokeAndWait(task);
//        } catch (Exception e) {
//          logger.warn("Exception thrown trying to reconnect", e);
//          throw new RuntimeException(e);
//        }
//        if (task.service == null) {
//          throw new RuntimeException("No service.");
//        }
//        return task.service;
//      }

    };

    int availableCpus = Runtime.getRuntime().availableProcessors();
    if (options.numberOfCpus < 0) {
      options.numberOfCpus = pref.getInt("maxCpus", 0);
    }
    if (options.numberOfCpus <= 0 || options.numberOfCpus > availableCpus) {
      options.numberOfCpus = availableCpus;
    }

    if (worker != null) {
      setStatus("Shutting down worker...");
      worker.shutdown();
      try {
        workerThread.join();
      } catch (InterruptedException e) {
      }
      progressPanel.clear();
    }

    setStatus("Starting worker...");

    CourtesyMonitor courtesyMonitor = (powerMonitor != null) ? powerMonitor
        : new UnconditionalCourtesyMonitor();
    ThreadFactory threadFactory = new BackgroundThreadFactory();
    worker = new ThreadServiceWorker(serviceFactory, threadFactory,
        getProgressPanel(), courtesyMonitor);
    worker.setMaxWorkers(options.numberOfCpus);

    boolean cacheClassDefinitions = pref.getBoolean("cacheClassDefinitions", true);
    if (cacheClassDefinitions) {
      setStatus("Preparing data source...");
      EmbeddedDataSource ds = null;
      try {
        Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
        ds = new EmbeddedDataSource();
        ds.setConnectionAttributes("create=true");
        ds.setDatabaseName("classes");
        worker.setDataSource(ds);
      } catch (ClassNotFoundException e) {
        logger.error("Could not locate database driver.", e);
      } catch (SQLException e) {
        logger.error("Error occurred while initializing data source.", e);
      }
    }

    onPreferencesChanged();

    workerThread = new Thread(worker);
    workerThread.start();

  }
1002190
protected void internalReleaseConnection(ThriftConnectionHandle<T> connectionHandle)
			throws ThriftConnectionPoolException {
		if (connectionHandle.isExpired() || (!this.poolShuttingDown && connectionHandle.isPossiblyBroken()
				&& !isConnectionHandleAlive(connectionHandle))) {

			if (connectionHandle.isExpired()) {
				connectionHandle.internalClose();
			}

			ThriftConnectionPartition<T> connectionPartition = connectionHandle.getConnectionPartition();
			postDestroyConnection(connectionHandle);

			maybeSignalForMoreConnections(connectionPartition);
			return;
		}
		connectionHandle.setConnectionLastUsedInMs(System.currentTimeMillis());
		if (!this.poolShuttingDown) {
			putConnectionBackInPartition(connectionHandle);
		} else {
			connectionHandle.internalClose();
		}
	}
1218385
public synchronized void start() throws Exception {
        if (running) {
            return;
        }
        
        List<Connector> startedConnectors = new ArrayList<Connector>();
        for (Connector each : this.connectors) {
            try {
                each.setServer( this );
                each.start();
                startedConnectors.add( each );
            } catch (Exception e) {
                for (Connector stop : startedConnectors) {
                    try {
                        stop.stop();
                    } catch (Exception e2) {

                    }
                }
                throw e;
            }
        }
        running = true;
    }
1231690
@Override
	protected void checkHandle(int handle) throws DataStoreException
    {
        if (handle < 0 ||
            handle >= blockCount ||
            allocatedSize[handle] == -1 ||
            (flags[handle] & FLAG_START_BLOCK) == 0)
            throw new DataStoreException("Invalid handle : "+handle);
    }
242146
public function onRequest(ConnectionInterface $incoming)
    {
        $this->handledRequests++;

        $handler = new RequestHandler($this->socketPath, $this->loop, $this->output, $this->slaves, $this->maxExecutionTime);
        $handler->handle($incoming);
    }
79138
protected void threadWatch(final ConnectionHandle c) {
		this.threadFinalizableRefs.put(c, new FinalizableWeakReference<Thread>(Thread.currentThread(), this.finalizableRefQueue) {
			public void finalizeReferent() {
					try {
						if (!CachedConnectionStrategy.this.pool.poolShuttingDown){
							logger.debug("Monitored thread is dead, closing off allocated connection.");
						}
						c.internalClose();
					} catch (SQLException e) {
						e.printStackTrace();
					}
					CachedConnectionStrategy.this.threadFinalizableRefs.remove(c);
			}
		});
	}
814207
public void start() throws Throwable
   {
      if (!isExternal)
      {
         executorService = Executors.newSingleThreadExecutor(new IdleThreadFactory());
      }

      shutdown.set(false);
      interval = Long.MAX_VALUE;
      next = Long.MAX_VALUE;

      executorService.execute(new IdleConnectionRemoverRunner());
   }
52503
protected static Connection memorize(final Connection target, final ConnectionHandle connectionHandle) {

		return (Connection) Proxy.newProxyInstance(
				ConnectionProxy.class.getClassLoader(),
				new Class[] {ConnectionProxy.class},
				new MemorizeTransactionProxy(target, connectionHandle));
	}
1076364
private void startMaster() throws IOException, ConnectionFailedException {
    mMaster = AlluxioJobMasterProcess.Factory.create();

    ServerConfiguration
        .set(PropertyKey.JOB_MASTER_RPC_PORT, String.valueOf(mMaster.getRpcAddress().getPort()));
    Runnable runMaster = new Runnable() {
      @Override
      public void run() {
        try {
          mMaster.start();
        } catch (Exception e) {
          throw new RuntimeException(e + " \n Start Master Error \n" + e.getMessage(), e);
        }
      }
    };
    mMasterThread = new Thread(runMaster);
    mMasterThread.start();
  }
193662
public void start() throws Exception
    {
        Preconditions.checkState(state.compareAndSet(State.LATENT, State.STARTED), "Cannot be started more than once");

        client.getConnectionStateListenable().addListener(connectionStateListener);
        try
        {
            client.create().creatingParentContainersIfNeeded().forPath(path, seedValue);
        }
        catch ( KeeperException.NodeExistsException ignore )
        {
            // ignore
        }

        readValue();
    }
1178747
protected void internalReleaseConnection(ConnectionHandle connectionHandle) throws SQLException {
		if (!this.cachedPoolStrategy){
			connectionHandle.clearStatementCaches(false);
		}

		if (connectionHandle.getReplayLog() != null){
			connectionHandle.getReplayLog().clear();
			connectionHandle.recoveryResult.getReplaceTarget().clear();
		}

		if (connectionHandle.isExpired() || 
				(!this.poolShuttingDown 
						&& connectionHandle.isPossiblyBroken()
				&& !isConnectionHandleAlive(connectionHandle))){

            if (connectionHandle.isExpired()) {
                connectionHandle.internalClose();
            }

			ConnectionPartition connectionPartition = connectionHandle.getOriginatingPartition();
			postDestroyConnection(connectionHandle);

			maybeSignalForMoreConnections(connectionPartition);
			connectionHandle.clearStatementCaches(true);
			return; // don't place back in queue - connection is broken or expired.
		}


		connectionHandle.setConnectionLastUsedInMs(System.currentTimeMillis());
		if (!this.poolShuttingDown){
			putConnectionBackInPartition(connectionHandle);
		} else {
			connectionHandle.internalClose();
		}
	}