Connects to the member and sends a commit message.
326741
protected void sendAppendRequest(MemberState member, AppendRequest request) {
    // Set the start time of the member's current commit. This will be used to associate responses
    // with the current commit request.
    member.setHeartbeatStartTime(heartbeatTime);

    super.sendAppendRequest(member, request);
  }
609756
def _connect(self):
        
        self.kik_connection_thread = Thread(target=self._kik_connection_thread_function, name="Kik Connection")
        self.kik_connection_thread.start()
781759
void commit(CallInfo callInfo) {
    access(callInfo, () -> {
      logSetup(callInfo);
      clearSavePointIfSet();
      connection.commit();
      return 0;
    });
  }
312363
protected void sendInstallRequest(Connection connection, MemberState member, InstallRequest request) {
    logger.trace("{} - Sending {} to {}", context.getCluster().member().address(), request, member.getMember().serverAddress());
    connection.<InstallRequest, InstallResponse>sendAndReceive(request).whenComplete((response, error) -> {
      context.checkThread();

      // Complete the install to the member.
      member.completeInstall();

      if (open) {
        if (error == null) {
          logger.trace("{} - Received {} from {}", context.getCluster().member().address(), response, member.getMember().serverAddress());
          handleInstallResponse(member, request, response);
        } else {
          logger.warn("{} - Failed to install {}", context.getCluster().member().address(), member.getMember().serverAddress());

          // Trigger reactions to the install response failure.
          handleInstallResponseFailure(member, request, error);
        }
      }
    });
  }
559115
public function trans_commit()
    {
        $this->conn('master'); //connect server
        $this->db->commit();
        $this->db->autocommit(true);
    }
102313
protected void sendAppendRequest(Connection connection, MemberState member, AppendRequest request) {
    long timestamp = System.nanoTime();

    logger.trace("{} - Sending {} to {}", context.getCluster().member().address(), request, member.getMember().address());
    connection.<AppendRequest, AppendResponse>sendAndReceive(request).whenComplete((response, error) -> {
      context.checkThread();

      // Complete the append to the member.
      if (!request.entries().isEmpty()) {
        member.completeAppend(System.nanoTime() - timestamp);
      } else {
        member.completeAppend();
      }

      if (open) {
        if (error == null) {
          logger.trace("{} - Received {} from {}", context.getCluster().member().address(), response, member.getMember().address());
          handleAppendResponse(member, request, response);
        } else {
          handleAppendResponseFailure(member, request, error);
        }
      }
    });

    updateNextIndex(member, request);
    if (!request.entries().isEmpty() && hasMoreEntries(member)) {
      appendEntries(member);
    }
  }
1120435
protected void sendConfigureRequest(MemberState member, ConfigureRequest request) {
    logger.debug("{} - Configuring {}", context.getCluster().member().address(), member.getMember().address());

    // Start the configure to the member.
    member.startConfigure();

    context.getConnections().getConnection(member.getMember().serverAddress()).whenComplete((connection, error) -> {
      context.checkThread();

      if (open) {
        if (error == null) {
          sendConfigureRequest(connection, member, request);
        } else {
          // Complete the configure to the member.
          member.completeConfigure();

          // Trigger reactions to the request failure.
          handleConfigureRequestFailure(member, request, error);
        }
      }
    });
  }
892200
public void commit() {
        Log.info("Committing");
        try {
            indexWriter.commit();
        } catch (IOException e) {
            Log.error(e, "Error while committing");
            throw new RuntimeException(e);
        }
    }
1374117
protected void commit() throws IOException
    {
        log.debug("ajp13 commit()");
        if (_response.isCommitted())
            return;
        _request.setHandled(true);
        getOutputStream().writeHeader(_response);
    }
968910
public void commit ()
    {
        // first clear our target
        clearTarget();

        // then post this event onto the queue (but only if we actually
        // accumulated some events)
        int size = _events.size();
        switch (size) {
        case 0: // nothing doing
            break;
        case 1: // no point in being compound
            _omgr.postEvent(_events.get(0));
            break;
        default: // now we're talking
            _transport = _events.get(0).getTransport();
            for (int ii = 1; ii < size; ii++) {
                _transport = _events.get(ii).getTransport().combine(_transport);
            }
            _omgr.postEvent(this);
            break;
        }
    }
324239
public boolean addMember(long commitIndex, CPMemberInfo member) {
        checkNotNull(member);
        checkMetadataGroupInitSuccessful();

        for (CPMemberInfo existingMember : activeMembers) {
            if (existingMember.getAddress().equals(member.getAddress())) {
                if (existingMember.getUuid().equals(member.getUuid())) {
                    if (logger.isFineEnabled()) {
                        logger.fine(member + " already exists.");
                    }

                    if (membershipChangeSchedule != null && member.equals(membershipChangeSchedule.getAddedMember())) {
                        membershipChangeSchedule = membershipChangeSchedule.addRetriedCommitIndex(commitIndex);
                        logger.info("CP groups are already being rebalanced for " + member);
                        return false;
                    }

                    return true;
                }

                throw new IllegalStateException(member + " cannot be added to the CP subsystem because another " + existingMember
                        + " exists with the same address!");
            }
        }

        checkState(membershipChangeSchedule == null,
                "Cannot rebalance CP groups because there is ongoing " + membershipChangeSchedule);

        Collection<CPMemberInfo> newMembers = new LinkedHashSet<>(activeMembers);
        newMembers.add(member);
        doSetActiveMembers(commitIndex, newMembers);
        logger.info("Added new " + member + ". New active CP members list: " + newMembers);

        List<CPGroupMembershipChange> changes = getGroupMembershipChangesForNewMember(member);
        if (changes.size() > 0) {
            membershipChangeSchedule = MembershipChangeSchedule.forJoiningMember(singletonList(commitIndex), member, changes);
            if (logger.isFineEnabled()) {
                logger.fine("CP group rebalancing is triggered for " + member + ", changes: " + membershipChangeSchedule);
            }

            return false;
        }

        return true;
    }
201120
public function commit()
    {
        if ($this->transactions == 1) $this->pdo->commit();

        --$this->transactions;

        $this->fireConnectionEvent('committed');
    }
355841
protected void commit()
        throws IOException
    {        
        if (_response.isCommitted())
            return;

        int status=_response.getStatus();
        int length=-1;
        
        // Check if there is missing content expectations
        if (_inputStream.getExpectContinues()!=null)
        {
            // No input read yet - so assume it never will be
            _inputStream.setExpectContinues(null);
            _inputStream.unsafeSetContentLength(0);
        }
        
        // Handler forced close, listener stopped or no idle threads left.
        boolean has_close=HttpFields.__Close.equals(_response.getField(HttpFields.__Connection));
        if (!_persistent || _close || _listener!=null && (!_listener.isStarted()||_listener.isOutOfResources()))
        {
            _close=true;
            if (!has_close)
                _response.setField(HttpFields.__Connection,HttpFields.__Close);
            has_close=true;
        }
        if (_close)
            _persistent=false;
        
        // Determine how to limit content length
        if (_persistent)
        {
            switch(_dotVersion)
            {
                case 1:
                {
                    String transfer_coding=_response.getField(HttpFields.__TransferEncoding);
                    if (transfer_coding==null || transfer_coding.length()==0 || HttpFields.__Identity.equalsIgnoreCase(transfer_coding))
                    {
                        // if (can have content and no content length)
                        if (status!=HttpResponse.__304_Not_Modified &&
                            status!=HttpResponse.__204_No_Content &&
                            _response.getField(HttpFields.__ContentLength)==null)
                        {
                            if (_completing)
                            {
                                length=_outputStream.getBytesWritten();
                                _response.setContentLength(length);
                            }
                            else
                            {   
                                // Chunk it!
                                _response.setField(HttpFields.__TransferEncoding,HttpFields.__Chunked);
                                _outputStream.setChunking();
                            }
                        }
                    }
                    else
                    {
                        // Use transfer encodings to determine length
                        _response.removeField(HttpFields.__ContentLength);
                        _outputStream.setChunking();

                        if (!HttpFields.__Chunked.equalsIgnoreCase(transfer_coding))
                        {
                            // Check against any TE field
                            List te = _request.getAcceptableTransferCodings();
                            Enumeration enm =
                                _response.getFieldValues(HttpFields.__TransferEncoding,
                                                         HttpFields.__separators);
                            while (enm.hasMoreElements())
                            {
                                String coding=(String)enm.nextElement();
                                if (HttpFields.__Identity.equalsIgnoreCase(coding) ||
                                    HttpFields.__Chunked.equalsIgnoreCase(coding))
                                    continue;
                                if (te==null || !te.contains(coding))
                                    throw new HttpException(HttpResponse.__501_Not_Implemented,coding);
                            }
                        }
                    }
                }
                break;
                
                case 0:
                {
                    // if (can have content and no content length)
                    _response.removeField(HttpFields.__TransferEncoding);
                    if (_keepAlive)
                    {
                        if (status!=HttpResponse.__304_Not_Modified &&
                            status!=HttpResponse.__204_No_Content &&
                            _response.getField(HttpFields.__ContentLength)==null)
                        {
                            if (_completing)
                            {
                                length=_outputStream.getBytesWritten();
                                _response.setContentLength(length);
                                _response.setField(HttpFields.__Connection,HttpFields.__KeepAlive);
                            }
                            else
                            {
                                _response.setField(HttpFields.__Connection,HttpFields.__Close);
                                has_close=_close=true;
                                _persistent=false;
                            }
                        }
                        else
                            _response.setField(HttpFields.__Connection,HttpFields.__KeepAlive);
                    }
                    else if (!has_close)
                        _response.setField(HttpFields.__Connection,HttpFields.__Close);
                        
                        
                    break;
                }
                default:
                {
                    _close=true;
                    _persistent=false;
                    _keepAlive=false;
                }
            }
        }
        
        
        // Mark request as handled.
        _request.setHandled(true);
        
        _outputStream.writeHeader(_response);
        _outputStream.flush();
        
    }
558984
public void commit() throws DBException, RemoteException
    {
        BaseTransport transport = this.createProxyTransport(COMMIT);
        Object strReturn = transport.sendMessageAndGetReply();
        Object objReturn = transport.convertReturnObject(strReturn);
        this.checkDBException(objReturn);
    }
255234
@Override
  public void commit() throws IOException {
    try {
      LOG.info("Flushing pending insert.");
      this.commands.flush();
      LOG.info("Commiting transaction.");
      this.conn.commit();
    } catch (Exception e) {
      this.failed = true;
      throw new RuntimeException(e);
    }
  }
215922
private void commitAndRun(Substream winningSubstream) {
    Runnable postCommitTask = commit(winningSubstream);

    if (postCommitTask != null) {
      postCommitTask.run();
    }
  }
480109
public function commit()
    {
        if (!$this->recv) {
            $this->receive();
            App::error('You forget to getResult() before commit !');
        }
        $this->connection->query('commit;');
    }